Godot 4: 3D scene in 2D environment (SubViewport tutorial)

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • 📖 Godot 4 book: filiprachunek.gumroad.com/l/g...
    💡 Get exclusive content on Patreon: / fencerdevlog
    🎮 Wishlist Whispers of Prague on Steam: store.steampowered.com/app/27...
    🚀 Space Shooter tutorial: • Godot 4 Tutorial: From...
    🖥️ Space Shooter source code: github.com/FilipRachunek/spac...
    #godot #godot4 #godotengine #3d
    Hi everybody! In this video, I will demonstrate how we can easily insert 3D models or complete 3D scenes into the environment of our 2D game in Godot 4. Let's see how this is done using the SubViewport node.

КОМЕНТАРІ • 18

  • @FencerDevLog
    @FencerDevLog  3 місяці тому

    www.patreon.com/FencerDevLog
    I have finally created a Patreon account. If you want to support the creation of further tutorials and gain access to exclusive content, you can do so there. Thank you. 😎

  • @pascalcasier959
    @pascalcasier959 3 місяці тому +1

    you are the best !!!!

  • @xyyx1001
    @xyyx1001 3 місяці тому +1

    Thank you for sharing. Whenever I watch your videos, I solve another problem I've been tinkering with.

  • @dr_nerdrage
    @dr_nerdrage 3 місяці тому +2

    Really nice and well explained subviewport example, thank you!

    • @FencerDevLog
      @FencerDevLog  3 місяці тому

      You are welcome! I am glad you found it useful.

  • @breakfastgun
    @breakfastgun 3 місяці тому

    You have the best channel for Godot development. Always easy to follow and well-explained. Thank you for what you do!

    • @FencerDevLog
      @FencerDevLog  3 місяці тому +1

      Thank you! I would like to create many more tutorials, including premium content for Patreon. There's always some topic to cover.

  • @pascalcasier959
    @pascalcasier959 3 місяці тому +2

    Yes, I want another video about the rotating meshes, please. And the logic behind th puzzle. Thank you

    • @FencerDevLog
      @FencerDevLog  3 місяці тому

      OK, no problem. Added to my agenda.

  • @xiaohu9201
    @xiaohu9201 2 місяці тому

    hello, thanks for your video! it's helpful! and i have a question about how does the subviewport accept the mouse input to Operation the 3d model? thank! :)

    • @FencerDevLog
      @FencerDevLog  2 місяці тому

      Hi, thanks for watching! In reality, the SubViewport does not respond to any events. It only displays the 3D scene in a 2D projection, over which ReferenceRect nodes are placed to handle mouse clicks. These events are connected to a callback that holds a reference to the 3D scene and calls its functions turn_left() and turn_right() to rotate the disks.
      I might record another video to explain these details.

    • @xiaohu9201
      @xiaohu9201 2 місяці тому

      @@FencerDevLog ok, thanks!

  • @longuemire748
    @longuemire748 2 місяці тому

    Thank you for these explications,
    I'm sorry but I'd like to use a lot of subviewports at the same time in a 3d scene for a floor of tiles to take advantage of the 2d nodes (anomationplayer, etc). Could this cause a slowdown problem if I use a lot of them?

    • @FencerDevLog
      @FencerDevLog  2 місяці тому

      It's hard to say. Every viewport that renders a scene in each frame consumes some CPU/GPU power, so a larger number of such elements can start causing problems after a while. But I'm not sure what the critical amount would be. Try it and see.

    • @longuemire748
      @longuemire748 2 місяці тому

      @@FencerDevLog Thank you :)