Mirrors with reflection in Godot 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024
  • In this tutorial I show how to implement mirrors with character reflection in Godot 4.
    Wishlist Dreamed Away on Steam: store.steampow...
    Join the Discord: / discord
    Follow us on Twitter: / dreamedawayrpg

ความคิดเห็น • 90

  • @ShaolinDave
    @ShaolinDave 3 หลายเดือนก่อน +43

    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 3 หลายเดือนก่อน +5

      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 3 หลายเดือนก่อน +1

      @@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 3 หลายเดือนก่อน

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

    • @connorkapooh2002
      @connorkapooh2002 3 หลายเดือนก่อน

      ​@@ShaolinDavesponsorblock ;)

  • @eugene_ynwa90
    @eugene_ynwa90 3 หลายเดือนก่อน +1

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

  • @Ninjakrom
    @Ninjakrom 2 หลายเดือนก่อน

    That looks awesome, Excellent job!
    you can make a tutorial in Godot 3 too plz?

  • @LazY_NerD
    @LazY_NerD 3 หลายเดือนก่อน +19

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

    • @idesys3135
      @idesys3135 2 หลายเดือนก่อน

      Woahoahoahoahoah, oahoahoahoah, oahoahoah story of Undertale
      I fell from the light
      Talk or should I fight
      Monster genocide
      This my Undertale

  • @ToastedGears
    @ToastedGears 3 หลายเดือนก่อน +3

    Could you do a tutorial for your lighting shader?

  • @CassyCodes
    @CassyCodes 3 หลายเดือนก่อน +23

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

  • @CholoRafael
    @CholoRafael 3 หลายเดือนก่อน +15

    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.

    • @giuwahdangelo102
      @giuwahdangelo102 2 หลายเดือนก่อน

      Did you use the same code for it?

  • @Govindhuujh
    @Govindhuujh 3 หลายเดือนก่อน +2

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

  • @anderson.brbrbr
    @anderson.brbrbr 3 หลายเดือนก่อน +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  3 หลายเดือนก่อน +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 3 หลายเดือนก่อน +3

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

    • @awfyboy
      @awfyboy 3 หลายเดือนก่อน +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  3 หลายเดือนก่อน

      @@awfyboy Yes, you're right.

  • @clecioespindolagamedev
    @clecioespindolagamedev 3 หลายเดือนก่อน +11

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

  • @randomjimbitz512
    @randomjimbitz512 3 หลายเดือนก่อน +1

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

  • @Argrouk
    @Argrouk 3 หลายเดือนก่อน +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.

  • @f.faucon6681
    @f.faucon6681 3 หลายเดือนก่อน +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  3 หลายเดือนก่อน +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.

  • @garya1809
    @garya1809 3 หลายเดือนก่อน +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.

  • @snakone
    @snakone 3 หลายเดือนก่อน +1

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

  • @jamesonwhite167
    @jamesonwhite167 3 หลายเดือนก่อน +5

    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!

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +1

      haha, awesome! Glad you found the channel!

  • @johneicher6683
    @johneicher6683 3 หลายเดือนก่อน +2

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

    • @johneicher6683
      @johneicher6683 3 หลายเดือนก่อน +2

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

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +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.

  • @hailee9683
    @hailee9683 3 หลายเดือนก่อน +1

    you deserve more subscribe bro

  • @ani7417
    @ani7417 3 หลายเดือนก่อน +2

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

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +1

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

  • @brigandpatrolworllvideos9
    @brigandpatrolworllvideos9 3 หลายเดือนก่อน +3

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

  • @JFran.
    @JFran. 3 หลายเดือนก่อน +1

    Awesome tutorial. Liked and subscribed. 😊

  • @tomek3633
    @tomek3633 3 หลายเดือนก่อน +1

    just WOW :)

  • @Joguhyik
    @Joguhyik 3 หลายเดือนก่อน +1

    looks so good

  • @p3ng00
    @p3ng00 3 หลายเดือนก่อน +1

    very nice

  • @Riodragon1
    @Riodragon1 14 วันที่ผ่านมา

    I tested the demo on the steam , I really liked it, and I was curious How did you make the girl follow the character?

  • @willd2609
    @willd2609 3 หลายเดือนก่อน +2

    make more of these! this is great!

  • @Jono1982
    @Jono1982 3 หลายเดือนก่อน +3

    thank you for teaching us

  • @SerPodrick
    @SerPodrick 3 หลายเดือนก่อน +2

    Thank you for sharing!

  • @alcionetauri
    @alcionetauri 3 หลายเดือนก่อน

    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?

  • @SOSmysteries
    @SOSmysteries 3 หลายเดือนก่อน +1

    Bravo

  • @H3_remix
    @H3_remix 3 หลายเดือนก่อน

    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.

  • @rohithreddy75
    @rohithreddy75 หลายเดือนก่อน

    I dont like to comment much but your art style gave me inspiration to get into game dev one day which is pipe dream currently

  • @pr3ttydum6
    @pr3ttydum6 3 หลายเดือนก่อน

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

  • @Plobx
    @Plobx 3 หลายเดือนก่อน +2

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

  • @kyoai
    @kyoai 3 หลายเดือนก่อน +2

    Absolutely beautiful, thank you!

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +1

      You're welcome! Glad it's useful :)

  • @ShenHibiki
    @ShenHibiki 3 หลายเดือนก่อน +1

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

  • @SuperDoomKing
    @SuperDoomKing 3 หลายเดือนก่อน +3

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

  • @slavakislov3675
    @slavakislov3675 3 หลายเดือนก่อน +1

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

  • @azrhyga
    @azrhyga 3 หลายเดือนก่อน +2

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

  • @kevinkowalski1
    @kevinkowalski1 3 หลายเดือนก่อน +2

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

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +2

      I'll make another tutorial :)

  • @scottwelfare9267
    @scottwelfare9267 3 หลายเดือนก่อน +2

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

  • @Barbichenko
    @Barbichenko 3 หลายเดือนก่อน +1

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

  • @jeanpantalleresco1859
    @jeanpantalleresco1859 2 หลายเดือนก่อน

    Smart solution, thank you!

  • @rabisgatos
    @rabisgatos 3 หลายเดือนก่อน +1

    You just got a new sub! Thank you so much for the tutorial, it's short, straight and easy to follow

  • @Silentstrike46_
    @Silentstrike46_ 3 หลายเดือนก่อน +1

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

  • @soirema
    @soirema 3 หลายเดือนก่อน +2

    ayy lets go

  • @curtisrogers7772
    @curtisrogers7772 3 หลายเดือนก่อน +1

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

  • @JoseLuisMirandaOrbe
    @JoseLuisMirandaOrbe 3 หลายเดือนก่อน +1

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

  • @HaZZmatDefender
    @HaZZmatDefender 3 หลายเดือนก่อน +2

    This is super interesting, thank you!

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +1

      You're welcome, glad you liked it!

  • @janus5177
    @janus5177 3 หลายเดือนก่อน +1

    Thank you for the great instructions.😊

  • @patlecat
    @patlecat 3 หลายเดือนก่อน +1

    Very cool function, thanks for the tut.

  • @eduardoddutra
    @eduardoddutra 3 หลายเดือนก่อน +1

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

  • @ElenaOcone
    @ElenaOcone 3 หลายเดือนก่อน +1

    Marvelous effect, thank you so much!

  • @fading-sun-studios
    @fading-sun-studios 3 หลายเดือนก่อน

    Simple maths,

  • @itsjanak6337
    @itsjanak6337 3 หลายเดือนก่อน +2

    paper lily mirrors, les go

  • @javiazo
    @javiazo 3 หลายเดือนก่อน +2

    Awesome tutorial!! Please keep making more like this!

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน +2

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

    • @slavakislov3675
      @slavakislov3675 3 หลายเดือนก่อน

      ​@@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.

  • @donaldkehler7029
    @donaldkehler7029 3 หลายเดือนก่อน +1

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

  • @shinin645
    @shinin645 3 หลายเดือนก่อน +1

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

    • @dreamedawayrpg
      @dreamedawayrpg  3 หลายเดือนก่อน

      Glad it was helpful!

  • @afrancis7475
    @afrancis7475 3 หลายเดือนก่อน +1

    PERFECTION.

  • @martinithechobit
    @martinithechobit 2 หลายเดือนก่อน

    YOOOO.

  • @derekthrupp6923
    @derekthrupp6923 2 หลายเดือนก่อน

    I feel like i just found a hidden gem tutorial page lol. cannot believe you dont have more views! Great job

  • @misterix6031
    @misterix6031 3 หลายเดือนก่อน +1

    you are the best!

  • @OppaHansi
    @OppaHansi 3 หลายเดือนก่อน +1

    awesome!

  • @FortbloxNET
    @FortbloxNET 3 หลายเดือนก่อน +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  3 หลายเดือนก่อน +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 3 หลายเดือนก่อน +6

      This is such a negative and ridiculous comment.

    • @charlieking7600
      @charlieking7600 3 หลายเดือนก่อน

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