Mirrors with reflection in Godot 4

Sdílet
Vložit
  • čas přidán 6. 06. 2024
  • In this tutorial I show how to implement mirrors with character reflection in Godot 4.
    Wishlist Dreamed Away on Steam: store.steampowered.com/app/19...
    Join the Discord: / discord
    Follow us on Twitter: / dreamedawayrpg
  • Věda a technologie

Komentáře • 80

  • @ShaolinDave
    @ShaolinDave Před 18 dny +23

    Short, to the point, and easily understandable. You e got a new sub,
    I think Godot devs might be the only people online who know how to get straight to the point. People posting recipes online could learn something.

    • @EvenTheDogAgrees
      @EvenTheDogAgrees Před 16 dny +3

      Today we're going to make scrambled eggs. Eggs are nutricious, affordable, a good source of protein, and so much more than just a breakfast staple. There are so many ways to prepare an egg, that no matter the occasion, you'll find there's an egg recipe that's totally suitable to the occasion.
      I can still remember the first time I tasted an egg as a 4 year old, when my grandmother made us breakfast on one of those seemingly endless summers, when me and my sister had a sleepover on her farm. They had chickens, so they had an abundance of fresh eggs, and one morning she took us out to the chicken coop to...
      And by that time I've already switched the channel. 😂

    • @ShaolinDave
      @ShaolinDave Před 16 dny

      @@EvenTheDogAgrees if it’s a text site, you forgot a bunch of on-page ads breaks.
      But “change the channel” means it’s a video, so you forgot the unnecessary theme song and logo, “please like and subscribe for more recipes”, and finally “but first, a word from this video’s sponsor…”

    • @EvenTheDogAgrees
      @EvenTheDogAgrees Před 16 dny

      @@ShaolinDave Nah, I just didn't feel like being dragged before a tribunal for crimes against humanity. 😂

    • @connorkapooh2002
      @connorkapooh2002 Před 14 dny

      ​@@ShaolinDavesponsorblock ;)

  • @CassyCodes
    @CassyCodes Před 20 dny +22

    That's genius! The effect looks amazing over the aquarium, too. Thank you

  • @CholoRafael
    @CholoRafael Před 15 dny +6

    Thanks for this. In my version, i added an area2d to the mirror that creates a sprite for the body that enters the mirror’s area2d. This way it should make a reflection for all players or npcs that enter the area.

  • @jamesonwhite167
    @jamesonwhite167 Před 4 dny +2

    Thank you dude! Didn't even realize what the project was or what the channel was until I realized. "Wait. This looks like Mother 3. Wait. The channel is called Dreamed Away. Wait. I've seen them in a Mother Direct." You've earned a Sub!

  • @SuperDoomKing
    @SuperDoomKing Před 16 dny +3

    I love your art style. Looks very earthbound-y.

  • @clecioespindolagamedev
    @clecioespindolagamedev Před 20 dny +11

    Wow... Amazing, Just loved the game, nos seeing this tutorial Just have to thank you for the result Dreamed Away achieved. Congrats.

  • @kevinkowalski1
    @kevinkowalski1 Před 16 dny +2

    Top Tutorial. I really liked to see how you make those ingame lights. They look very good!

  • @Plobx
    @Plobx Před 16 dny +2

    You're an excellent communicator. I hope you have time for more of these tutorials!

  • @brigandpatrolworllvideos9

    wow. awesome music. good content. great execution. well done!

  • @eugene_tkachenko90
    @eugene_tkachenko90 Před 15 dny +1

    Even though I don't use Godot, this tutorial looks pretty neat.

  • @Argrouk
    @Argrouk Před 2 dny +1

    Brilliant, thank you. I'm thinking you could also reduce the reflection in size (by a small percentage) as it moves further away too.

  • @kyoai
    @kyoai Před 16 dny +2

    Absolutely beautiful, thank you!

  • @willd2609
    @willd2609 Před 19 dny +2

    make more of these! this is great!

  • @Silentstrike46_
    @Silentstrike46_ Před 15 dny +1

    Brilliant guide! Thank you for sharing, definitely going to use this idea :D

  • @LazY_NerD
    @LazY_NerD Před 5 dny +2

    After everything, It's still you.....

  • @janus5177
    @janus5177 Před 17 dny +1

    Thank you for the great instructions.😊

  • @patlecat
    @patlecat Před 17 dny +1

    Very cool function, thanks for the tut.

  • @shinin645
    @shinin645 Před 15 dny +1

    This is very easy to follow! Thank you very much!

  • @SerPodrick
    @SerPodrick Před 19 dny +2

    Thank you for sharing!

  • @scottwelfare9267
    @scottwelfare9267 Před 19 dny +2

    Great tutorial. Short, to the point, and easy to follow. Just subbed. I hope you keep making videos like these!

  • @donaldkehler7029
    @donaldkehler7029 Před 19 dny +1

    Thanks for the awesome tutorial! Can't wait for Dreamed Away to come out!

  • @eduardoddutra
    @eduardoddutra Před 19 dny +1

    Amazing tutorial! Short, easy to follow and cool effect! Subscribed!

  • @azrhyga
    @azrhyga Před 21 dnem +2

    Great tutorial!! Thanks for making it, it is really appreciated

  • @ElenaOcone
    @ElenaOcone Před 19 dny +1

    Marvelous effect, thank you so much!

  • @Jono1982
    @Jono1982 Před 21 dnem +3

    thank you for teaching us

  • @JoseLuisMirandaOrbe
    @JoseLuisMirandaOrbe Před 16 dny +1

    You make life easier, thank you!!!
    At the point, no innecesary waste of time, easy to understand!!! OMG!!!

  • @slavakislov3675
    @slavakislov3675 Před 16 dny +1

    wow, just amazing, beautiful and well explained. Instant subscribe!

  • @kailashdiengdoh
    @kailashdiengdoh Před 18 dny +1

    This is amazing

  • @curtisrogers7772
    @curtisrogers7772 Před 19 dny +1

    Great tutorial! I just liked and subbed. Hope to see more amazing material like this. Thanks!

  • @ToastedGears
    @ToastedGears Před 18 dny +3

    Could you do a tutorial for your lighting shader?

  • @anderson.brbrbr
    @anderson.brbrbr Před 19 dny +8

    Great video! I have some questions. Why did you use a light to make the clip mask? Did you notice any advantage in using a light instead of placing the "Reflection" as a child of the "Sprite" and using "Visibility->Clip Children->Clip only" on the "Sprite"? Thanks for the video.

    • @dreamedawayrpg
      @dreamedawayrpg  Před 19 dny +2

      Initially this was implemented in Godot 3, where's clipping children doesn't exist (AFAIK). But also, I don't want to clip using the entire mirror sprite.

    • @anderson.brbrbr
      @anderson.brbrbr Před 19 dny +3

      @@dreamedawayrpg Portability, I get it. Thanks for answering.👍

    • @awfyboy
      @awfyboy Před 18 dny +2

      @@dreamedawayrpg You can still use the sprite resource you used for the Light2D and clip the sprite within that sprite. Should work the same.

    • @dreamedawayrpg
      @dreamedawayrpg  Před 17 dny

      @@awfyboy Yes, you're right.

  • @Joguhyik
    @Joguhyik Před 18 dny +1

    looks so good

  • @hailee9683
    @hailee9683 Před 16 dny +1

    you deserve more subscribe bro

  • @ShenHibiki
    @ShenHibiki Před 16 dny +1

    ... I've been wondering how to make masks in Godot. Just for that I'm already thankful! XD

  • @HaZZmatDefender
    @HaZZmatDefender Před 21 dnem +2

    This is super interesting, thank you!

  • @afrancis7475
    @afrancis7475 Před 19 dny +1

    PERFECTION.

  • @randomjimbitz512
    @randomjimbitz512 Před 17 dny +1

    +1 Sub.... love it... right to the point. Appreciate the knowledge sharing as well 👍

  • @javiazo
    @javiazo Před 20 dny +2

    Awesome tutorial!! Please keep making more like this!

    • @dreamedawayrpg
      @dreamedawayrpg  Před 19 dny +2

      I will! If there are topics you'd like me to cover, please let me know :)

    • @slavakislov3675
      @slavakislov3675 Před 16 dny

      ​@@dreamedawayrpg maybe something about shadows, lighting, shaders or just any cool trick to simplify things.
      I think more basic stuff like "how to work with tilemap" already explained by other guys.

  • @tomek3633
    @tomek3633 Před 14 dny +1

    just WOW :)

  • @p3ng00
    @p3ng00 Před 15 dny +1

    very nice

  • @misterix6031
    @misterix6031 Před 21 dnem +1

    you are the best!

  • @OppaHansi
    @OppaHansi Před 20 dny +1

    awesome!

  • @SOSmysteries
    @SOSmysteries Před 16 dny +1

    Bravo

  • @Barbichenko
    @Barbichenko Před 19 dny +1

    👍 + Subs!
    Very Nice Tutorial, Thank you!
    Make more of this!!!

  • @soirema
    @soirema Před 21 dnem +2

    ayy lets go

  • @garya1809
    @garya1809 Před 19 dny +1

    I'm very new to Godot and game dev but I like to have notes on different ways to do things, so thank you for this video and how you did things. Would this be a good use case to learn how to use shaders? TIA.

  • @ani7417
    @ani7417 Před 19 dny +2

    Amazing. How do you get the light halo particle effect around the player?

    • @dreamedawayrpg
      @dreamedawayrpg  Před 19 dny +1

      That might be the topic for my next tutorial! :D

  • @snakone
    @snakone Před 16 dny +1

    great! can you do the same with water reflection on the ground? using tilemap, autotile water

  • @johneicher6683
    @johneicher6683 Před 19 dny +2

    Excellent video. Thank you. What is the name of the background music?

    • @johneicher6683
      @johneicher6683 Před 19 dny +2

      Interested in hearing more from the composer. The few songs of the OST that seem to be available are amazing.

    • @dreamedawayrpg
      @dreamedawayrpg  Před 19 dny +1

      @@johneicher6683 Thanks! I'm working mostly solo on the game and I've composed all tracks except for a few ones in the second chapter.

  • @f.faucon6681
    @f.faucon6681 Před 18 dny +2

    Great tutorial, thanks. One detail as I guess that's the issue: the reflection is lagging just a bit, is it possible that in your code you calculate the reflection before calculating the new frame for the main character? If you watch the video at 0.25 speed it becomes noticeable enough. Thanks!

    • @dreamedawayrpg
      @dreamedawayrpg  Před 18 dny +2

      Good catch! You're totally right, that's exactly what's going on. You need to order the nodes so that the mirror's process function is called after the character.

  • @itsjanak6337
    @itsjanak6337 Před 20 dny +2

    paper lily mirrors, les go

  • @Govindhuujh
    @Govindhuujh Před 18 dny +2

    Please can you make car mechanics in godot 4 like how to drive car and enter exit
    In car😊.

  • @alcionetauri
    @alcionetauri Před 16 dny

    Love the tutorial!
    I have one question, does this means the "mirrored sprite" is always rendered?, or the mask avoids it from being rendered?.
    I would love to be able to use this trick for all character sprites and reflect them on different stuff, like water bodies, mirrors and even metalic surfaces, but I'm a bit worried about the rendering cost of this.
    I guess the mask is a post-processing thing, but maybe godot has optimizations to know if he has to render something or not 🤔
    any opinions?

  • @pr3ttydum6
    @pr3ttydum6 Před 9 dny

    how would i add a shader to the reflection aswell as the canvasitemmaterial needed to clip?

  • @sloppyglizzy8313
    @sloppyglizzy8313 Před 16 dny

    I need someone more skilled with coding than I am to integrate pixel editors into godot. Having to switch between aseprite or GameMaker to create sprites is so frustrating and pulls me out of productivity mode.

  • @voidipoyo
    @voidipoyo Před 18 dny

    Simple maths,

  • @FortbloxNET
    @FortbloxNET Před 19 dny +3

    For a small room, okay but what if you have a huge map and hundreds of mirrors. That would mean you have hundreds of reflections and move them? And why fade out when walking away? No mirror does that in real life. I mean it’s okay for that small room but scaling it up will crash that game probably 🥹

    • @dreamedawayrpg
      @dreamedawayrpg  Před 19 dny +4

      I use a variation of this in Dreamed Away, not hundreds of mirrors but quite a few in some maps, and while it does run on the CPU it scales really well for my use-case.
      Regarding the fade out, as I said it's optional and obviously stylized, if you don't like it just don't do that :)

    • @kaizen9451
      @kaizen9451 Před 16 dny +6

      This is such a negative and ridiculous comment.

    • @charlieking7600
      @charlieking7600 Před 4 dny

      ​@@kaizen9451Yeah, everything that asks limitations of Godot is considered negative in Godot cult.
      Don't forget to donate to Juan!