Mirrors with reflection in Godot 4

Поділитися
Вставка
  • Опубліковано 2 жов 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

  • @LazY_NerD
    @LazY_NerD 3 місяці тому +21

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

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

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

  • @ShaolinDave
    @ShaolinDave 3 місяці тому +44

    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 ;)

  • @CholoRafael
    @CholoRafael 3 місяці тому +16

    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.

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

  • @CassyCodes
    @CassyCodes 3 місяці тому +24

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

  • @jamesonwhite167
    @jamesonwhite167 3 місяці тому +6

    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 місяці тому +2

      haha, awesome! Glad you found the channel!

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

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

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

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

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

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

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

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

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

    Could you do a tutorial for your lighting shader?

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

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

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

    Marvelous effect, thank you so much!

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

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

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

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

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

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

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

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

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

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

  • @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

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

    you deserve more subscribe bro

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

    very nice

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

    looks so good

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

    just WOW :)

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

    Bravo

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

    Awesome tutorial. Liked and subscribed. 😊

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

    thank you for teaching us

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

    make more of these! this is great!

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

    Thank you for sharing!

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

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

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

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

    awesome!

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

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

  • @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?

  • @Riodragon1
    @Riodragon1 18 днів тому

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

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

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

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

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

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

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

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

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

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

    Absolutely beautiful, thank you!

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

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

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

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

  • @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

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

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

  • @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

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

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

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

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

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

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

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

    Thank you for the great instructions.😊

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

    This is super interesting, thank you!

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

    Smart solution, thank you!

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

    Very cool function, thanks for the tut.

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

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

  • @fading-sun-studios
    @fading-sun-studios 3 місяці тому

    Simple maths,

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

    paper lily mirrors, les go

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

    PERFECTION.

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

    you are the best!

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

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

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

    YOOOO.

  • @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!