Common VFX Shader Techniques ft. Godot

Поделиться
HTML-код
  • Опубликовано: 1 авг 2024
  • A couple of shaders that I use a lot when I make VFX :) A project containing all my samples is available over at my patreon for free :D
    Patreon:
    / onetupthree
    Polar Coordinates:
    www.mathsisfun.com/polar-cart...
    00:00 - 00:25 Intro
    00:25 - 01:22 Tiling & Offset
    01:22 - 01:51 Masking
    01:51 - 02:18 Distortion
    02:18 - 02:54 Erosion
    02:54 - 04:19 Polar Coordinates
    04:19 - 05:38 Depth Fade
    05:38 - 06:43 Particle Lifetime
    06:43 - 07:06 Outro
    #godot #godot4 #vfx #shaders #gamedev #realtimevfx #gaming #visualeffects #tutorial #indie
    BGM:
    Artist: Lakey Inspired
    Track Name: Chill Day
    Artist's Socials:
    - SoundCloud - / lakeyinspired
    - Instagram - / lakeyinspired
    Artist: KevinMacleod (Incompetech)
    Tracks:
    - Awesome Call
    - Long Stroll
  • ИгрыИгры

Комментарии • 144

  • @onetupthree
    @onetupthree  8 месяцев назад +6

    update!
    WhtLotus (discord: whtlotus) very kindly made a visual shader version of the project from this video 🥳 It's also up for free in my latest Patreon post (along with some life updates)
    Cheers everyone! 🥂

  • @DevLogLogan
    @DevLogLogan 10 месяцев назад +65

    Community definitely needs more great VFX/Shader centric content like this! Great stuff!! ^^

    • @onetupthree
      @onetupthree  10 месяцев назад +4

      thank you so much! 🙇‍♂🙌

  • @PrecisionRender
    @PrecisionRender 10 месяцев назад +22

    This channel is a hidden gem. I hope this knowledge reaches a large audience!

    • @onetupthree
      @onetupthree  10 месяцев назад +3

      thank you so much 🙇‍♂

  • @Nilski
    @Nilski 10 месяцев назад

    YES! Been looking for high quality Godot VFX content. Very appreciated!

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you for the kind words ! 🙌

  • @LisaDaugesVFX
    @LisaDaugesVFX 10 месяцев назад +5

    Absolute banger of a video !! I learned a lot and it made shader programming not as scary as it used to be !!

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you ! 🙇‍♂ i hated writing shaders in unity 😭 godot's is way easier to approach + so well documented it's crazy

  • @artemouse4133
    @artemouse4133 8 месяцев назад

    You've saved my life thank you so much! I'll need to do some tooling around with this info to suit what I'm trying to do but this has been incredibly helpful.

    • @onetupthree
      @onetupthree  8 месяцев назад

      that's awesome ! good luck with the tooling 👌

  • @Wo0dY101
    @Wo0dY101 8 месяцев назад

    Take my subscription! Damn that was well explained. You made some stuff click that I have been trying to understand for a while now.

    • @onetupthree
      @onetupthree  8 месяцев назад

      thank you so much ! glad i could help out 🥳

  • @Archeia
    @Archeia 10 месяцев назад

    I learned a lot with this! Thank you :3

    • @onetupthree
      @onetupthree  10 месяцев назад

      im glad it helped ! 🙌

  • @jijigri9224
    @jijigri9224 10 месяцев назад +2

    Great video! We definitely need more Godot VFX tutorials!

  • @SuperMario9080
    @SuperMario9080 9 месяцев назад

    I love this, thanks for the video!

    • @onetupthree
      @onetupthree  9 месяцев назад

      thank you so much ! im glad you liked it 🥳

  • @user-lz8wl8gl2s
    @user-lz8wl8gl2s 6 месяцев назад

    This was fantastic - thanks!

  • @AnotherByteData
    @AnotherByteData 9 месяцев назад

    Really good and easy to understand! Kudos!!!!

    • @onetupthree
      @onetupthree  9 месяцев назад +1

      thank you :D glad it was helpful !

  • @agriasoaks6721
    @agriasoaks6721 10 месяцев назад

    Whoah!
    We need more things like this, Sensei! ☝️

    • @onetupthree
      @onetupthree  10 месяцев назад +1

      i'll do my best 🙇‍♂

  • @RecreationalProgramming
    @RecreationalProgramming 10 месяцев назад

    Thank you, this is very helpful!

    • @onetupthree
      @onetupthree  10 месяцев назад +1

      thank you! im glad to hear that 🙌

  • @godotShaderBoy
    @godotShaderBoy 3 месяца назад

    Cool to see we share the same passion about shaders, keep it up!

  • @WiseNoodleOfficial
    @WiseNoodleOfficial 5 месяцев назад

    Very well explained good sir! You've earned yourself another sub :)

    • @onetupthree
      @onetupthree  5 месяцев назад +1

      thank you so much ! 🙌

  • @ShinSpiegel
    @ShinSpiegel 5 месяцев назад

    This is an amazing video, thanks for sharing.

  • @GameDevGeeks
    @GameDevGeeks 9 месяцев назад

    insanely informative video!

    • @onetupthree
      @onetupthree  9 месяцев назад

      thank you ! im glad it was helpful 🙌

  • @bencepaul3497
    @bencepaul3497 8 месяцев назад

    Great examples!

    • @onetupthree
      @onetupthree  8 месяцев назад

      thank you so much ! :D

  • @SirPigeonz
    @SirPigeonz 10 месяцев назад

    Amazing tutorial bro!

  • @baoinh2968
    @baoinh2968 10 месяцев назад +1

    These tips are really useful

    • @onetupthree
      @onetupthree  10 месяцев назад

      glad they were helpful ! :D

  • @snaker90
    @snaker90 8 месяцев назад

    Wow, this's exactly what I need!

    • @onetupthree
      @onetupthree  8 месяцев назад

      glad to hear it ! 🥳

  • @Nayckron
    @Nayckron 10 месяцев назад

    I can see the channel exploding in views in the future, videos like this are bangers, keep it up.

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you so much for the kind words ! 🙏

  • @thygrrr
    @thygrrr 10 месяцев назад

    That was pretty good ^^

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you so much ! :D

  • @PureAsbestos
    @PureAsbestos 9 месяцев назад +3

    1:40 you can also write UV.x and UV.y which would be more semantically accurate

  • @pipeliner8969
    @pipeliner8969 6 месяцев назад

    I am addicted to Godot videos lol

  • @bjarkibjarkibjarki
    @bjarkibjarkibjarki 9 месяцев назад

    thx for the subtitles i appreciate it

    • @onetupthree
      @onetupthree  9 месяцев назад

      of course! 👀 we gotta have em 👌

  • @Rankao
    @Rankao 8 месяцев назад

    I think you finally got VFX shaders to click for me. I haven't come across anything where people broke it down into atomic effects before so it makes a lot more sense.

    • @onetupthree
      @onetupthree  8 месяцев назад

      that's great to hear ! good luck w/your VFX 🥳

  • @Boildroid
    @Boildroid 9 месяцев назад

    thanks a lot!

    • @onetupthree
      @onetupthree  9 месяцев назад

      glad to help ! 🙇‍♂

  • @daniridao
    @daniridao 9 месяцев назад

    wow wow wow, stop for a second. What is this channel and why didn't I know of it already? FOLLOWED!

    • @onetupthree
      @onetupthree  9 месяцев назад +1

      very kind of you to say 🙇‍♂️
      thank you!

  • @Shiromaru.
    @Shiromaru. 4 месяца назад

    epic!

  • @pietraderdetective8953
    @pietraderdetective8953 10 месяцев назад +1

    wow this is great content!
    would be awesome if your turn this into a series.
    Liked and subscribed!

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you so much ! 🥳 i do have a couple more shaders i use but I want to understand them enough first before i can make a video about those
      the next videos will be breakdowns of the last 2 godot vfx i made 🙇‍♂

  • @veecks
    @veecks 6 месяцев назад +1

    Great video, but i think the distortion part was kinda rushed, but well i am a begginer in shaders

  • @danielsndgamevideos
    @danielsndgamevideos 10 месяцев назад +1

    Great info! Thank you for the video, if I may ask, in a future video can the background music be less distracting? Made it hard to focus on the voice/explanation in some parts, otherwise great video ^^ thanks again.

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you ! and gotcha on the background music 👌

  • @pythonixed4448
    @pythonixed4448 Месяц назад

    Could you implement an open ocio lut as a shader? I use Linear values for film vfx. If my sprites were 16k Lin images could a shader act as a 2D lut on the whole screen?

  • @zzzzzzzzzzzzzzzzzzzzzzzzzzzz__
    @zzzzzzzzzzzzzzzzzzzzzzzzzzzz__ 9 месяцев назад

    MOOOOREEEEE

  • @xxidbr9
    @xxidbr9 10 месяцев назад

    ah finaly godot 🎉

  • @CristianAvellino
    @CristianAvellino 10 месяцев назад

    thanks

  • @xdanic3
    @xdanic3 Месяц назад

    Polar coordinates is a bit unintuituve until you know atan is a function used for everything, if you want to get the direction of your joystick controller, you use atan(2) as well.
    However the erosion shader is quite unintuituve, feels like those off by one errors when programing, and I don't think if programing languages arrays started at 1 would be easier either, sadly

  • @godofdream9112
    @godofdream9112 9 месяцев назад

    Finnally, some VFX on Godot...

    • @onetupthree
      @onetupthree  9 месяцев назад

      all thanks to a certain other engine's shenanigans 👀

  • @DylanCalaf
    @DylanCalaf 2 месяца назад

    is it just me or is this video above average good? Edit: you just earned a subscriber

    • @onetupthree
      @onetupthree  2 месяца назад +1

      i appreciate it a lot 🙏

  • @timaster18885
    @timaster18885 10 месяцев назад

    very good video

  • @paegr
    @paegr 6 месяцев назад

    For the Distortion shader, is there a way to make it so that increasing distortion_intensity doesn't move the albedo_tex away from the center?

    • @onetupthree
      @onetupthree  6 месяцев назад

      hi ! you can add a -0.5 to the float noise_tex i showed in the video 👌this just remaps the noise value from (0 -> 1) to (-0.5 -> 0.5)
      code:
      float noise_tex = texture(noise, noise_uv).r - 0.5;

    • @paegr
      @paegr 6 месяцев назад

      @@onetupthree That fixed it, thanks!

  • @doohp
    @doohp 10 месяцев назад +1

    banger video made me switch to godot

    • @onetupthree
      @onetupthree  10 месяцев назад

      eyy i appreciate it man 😭🙏

  • @luskarian4055
    @luskarian4055 8 месяцев назад

    I love you so much

    • @onetupthree
      @onetupthree  8 месяцев назад

      glad i could help 🙇‍♂

  • @kobedev
    @kobedev 6 месяцев назад

    Do you know if there is a way to do an effect similar to the galaxy skin from fortnite (idk how else to explain it lmao)

    • @onetupthree
      @onetupthree  6 месяцев назад +1

      havent tried making that but I imagine it has something to do with screen-space UVs 🤔 you can search it up on google images to see what i mean
      sample with screen-space UVs on a separate scene with your galaxy environment

    • @onetupthree
      @onetupthree  6 месяцев назад

      to add to the last part i imagine you put the galaxy on something like unity's render texture and sample from that

  • @apoc519
    @apoc519 9 месяцев назад

    How is the visual shader editor in Gadot?

    • @onetupthree
      @onetupthree  9 месяцев назад

      haven't tried it so im afraid I can't help with that one yet 😰

  • @viniciusantonio2253
    @viniciusantonio2253 7 месяцев назад

    so I basically need to add techniques on top of techniques?...
    for example, to make a 2d top-down clouds shaders I just adds erosion on top of tilling a nois texture?

    • @onetupthree
      @onetupthree  7 месяцев назад

      yes :D i haven't tried personally but that could be one way to do it !
      you could also even try layering noises on top of each other with different offset speeds so it doesn't look too uniform 🤔

    • @viniciusantonio2253
      @viniciusantonio2253 7 месяцев назад

      @@onetupthree Thanks for the insight! Your videos got me into shaders, but I found it quite difficult to glue math with visuals, but one day I'll wrap my head around it :)

    • @onetupthree
      @onetupthree  7 месяцев назад

      @@viniciusantonio2253 you got this 😤🙏 if you have any questions feel free to ask here !

  • @schmecklin377
    @schmecklin377 10 месяцев назад

    awesome

  • @scribblingjoe
    @scribblingjoe 10 месяцев назад +1

    At the time I’m watching this video upload time says “3d ago”. I thought that was cool. Just wanted to share.

  • @Boildroid
    @Boildroid 9 месяцев назад

    Please do not stop making videos

    • @onetupthree
      @onetupthree  9 месяцев назад

      and i'll do my best 😤👌

  • @ThisIsFez
    @ThisIsFez 9 месяцев назад

    please how do i make this work for canvas and not spatial. specifically the diagonal offset animation. total noob here

    • @onetupthree
      @onetupthree  9 месяцев назад

      hi ! if you mean the polar coordinates, if you follow the steps to get the polar UVs it should also work for CanvasItem shaders 🤔
      can you try this line after calculating for polar_uv?
      COLOR = texture(TEXTURE, polar_uv);
      TEXTURE is the dedicated texture variable for canvas items when a texture is assigned in a control node :D make sure to set Repeat as Enabled 👌
      hope this helps !

    • @ThisIsFez
      @ThisIsFez 9 месяцев назад

      @@onetupthree sorry for not being clear. For the first demo you showed, I wanted just an offset animation with a sprite with no tiling for cavas item. Thanks

    • @onetupthree
      @onetupthree  9 месяцев назад

      @@ThisIsFez normal offset will also work for CanvasItem :O with the same
      COLOR = texture(TEXTURE, base_uv)
      if that still isn't what you need, might be better if we talk on discord if you want :D you can shoot me an email of your username so I can add you :)

  • @mistouluf8518
    @mistouluf8518 4 месяца назад

    what is texture_albedo for "mask" shader ?

    • @onetupthree
      @onetupthree  4 месяца назад

      hi! :) that's just a sampler2d
      in the video, it was the godot logo

    • @mistouluf8518
      @mistouluf8518 4 месяца назад

      @@onetupthree The code still doesn't work, what declaration for ALBEDO & albedo & ALPHA? in godo 4

    • @onetupthree
      @onetupthree  4 месяца назад

      @@mistouluf8518 the source code is up in my patreon for free if you want to check it out :)

    • @mistouluf8518
      @mistouluf8518 4 месяца назад

      Thank you, but I still can't solve certain problems. In 2D with tilemap I would like to use clip children but it doesn't work. Would you like to create a shader?@@onetupthree

  • @khalilatay8058
    @khalilatay8058 Месяц назад

    Good but I need exactly "Tiling and offset" in 2d not 3d, can you make only this effect for 2d??

    • @onetupthree
      @onetupthree  Месяц назад +1

      you can use the same on a CanvasItem shader :D

    • @khalilatay8058
      @khalilatay8058 Месяц назад

      @@onetupthree your code is for 3d the shader type is spatial not canvas item
      So that means it will not work

    • @onetupthree
      @onetupthree  Месяц назад +1

      @@khalilatay8058 copying this from my response to another comment:
      A. spatial
      uniform sampler2D your_custom_texture;
      uniform vec2 tiling;
      uniform vec2 offset;
      void vertex() {
      UV = UV * tiling + offset;
      }
      void fragment() {
      ALBEDO = texture(your_custom_texture, UV);
      }
      B. canvas_item
      uniform vec2 tiling;
      uniform vec2 offset;
      void vertex() {
      UV = UV * tiling + offset;
      }
      void fragment() {
      COLOR = texture(TEXTURE, UV); // TEXTURE from inspector value
      }

    • @khalilatay8058
      @khalilatay8058 Месяц назад

      @@onetupthree bro thank you

    • @onetupthree
      @onetupthree  Месяц назад +1

      ​@@khalilatay8058 no prob !

  • @eivisch
    @eivisch 9 месяцев назад

    this video is very good if you can make things from theory into something real, sadly its not me

    • @onetupthree
      @onetupthree  9 месяцев назад

      heyy we all learn differently and that's ok! i believe in you :D

  • @PunCala
    @PunCala 9 месяцев назад

    Could you please make a tutorial on how to do cloud shadows with a shader? For a 2D pixel art game as well as 3D.

    • @onetupthree
      @onetupthree  9 месяцев назад

      not sure what you mean exactly but if you're talking about raymarching then cant help much bc I also gotta learn that 🤣😰

    • @PunCala
      @PunCala 9 месяцев назад

      @@onetupthree Cloud shadows shader is the one where the clouds cast moving shadows on the ground. Another very needed shader is the god rays shader.

  • @sinlee6064
    @sinlee6064 8 месяцев назад

    how to put it to 2D Sprite or MeshInstance2D? that is sooo cool !! Thank for your toturial!

    • @onetupthree
      @onetupthree  8 месяцев назад +1

      hi ! thanks for the kind words 🙇‍♂
      for 2D sprites it should be around the same but you're working with the 'canvas_item' shader_type as opposed to the 'spatial' type
      ALBEDO built_in would be replaced with COLOR and to access the texture you set in the Sprite2D Inspector, you use TEXTURE
      using the tiling and offset as example
      ---
      A. spatial
      uniform sampler2D your_custom_texture;
      uniform vec2 tiling;
      uniform vec2 offset;
      void vertex() {
      UV = UV * tiling + offset;
      }
      void fragment() {
      ALBEDO = texture(your_custom_texture, UV);
      }
      B. canvas_item
      uniform vec2 tiling;
      uniform vec2 offset;
      void vertex() {
      UV = UV * tiling + offset;
      }
      void fragment() {
      COLOR = texture(TEXTURE, UV); // TEXTURE from inspector value
      }
      ---
      there might be some mistakes in the code here but hopefully gets the point across ! :D hope this helps

    • @sinlee6064
      @sinlee6064 8 месяцев назад

      @@onetupthree Thank you!!!it's making my life easier ,your toturial is so useful,Thank again!

    • @onetupthree
      @onetupthree  8 месяцев назад

      @@sinlee6064 no prob ! glad i could help 😤👌

  •  10 месяцев назад

    Super Tut in Shader

  • @simonw.1223
    @simonw.1223 8 месяцев назад

    How do I know all the different stuff

    • @onetupthree
      @onetupthree  8 месяцев назад

      sorry not sure what you meant by that :O which other stuff?

    • @simonw.1223
      @simonw.1223 8 месяцев назад

      @@onetupthree like the whole shader language.

    • @onetupthree
      @onetupthree  8 месяцев назад

      @@simonw.1223 im afraid you won't find em here 😰 Godot uses GLSL if I remember correctly

    • @simonw.1223
      @simonw.1223 8 месяцев назад

      @@onetupthree what is GLSL?

    • @onetupthree
      @onetupthree  8 месяцев назад

      @@simonw.1223 it's short for OpenGL Shading Language :D can't say much about it tho because I haven't used it outside of Godot and VFX so I learn about it on the fly
      im sure there are lots of tutorials about there about it 🤔

  • @veecks
    @veecks 6 месяцев назад

    I did not get what the fuck is happening in distortion. I could make it work but how exactly is the noise defining the uv coordinates in the main texture

    • @onetupthree
      @onetupthree  6 месяцев назад +1

      yo let's calm down a bit 😭
      the base UVs are laid out as values that go from 0 to 1 from the upper left to the bottom right (as seen in 3:40)
      adding noise to the base UVs will offset our 0 to 1 values (and everything in between) by a little bit so when our texture is mapped to the modified UVs, it'll appear distorted
      if it still isn't clear you can DM me on twt and i can explain further with pictures :O

    • @veecks
      @veecks 6 месяцев назад

      @@onetupthree hey bro, thank u. After some tweaking I could kinda of figure this out! Yet it is kinda strange at first. Your explanation now is nice to close it all too, thanks!

    • @onetupthree
      @onetupthree  6 месяцев назад +1

      @@veecks no problem ! that's great to hear :D

  • @tangoconcorazon1861
    @tangoconcorazon1861 5 месяцев назад

    Bro writes 20 lines of code, talks about 2 and leaves us completely lost lol

    • @onetupthree
      @onetupthree  5 месяцев назад

      bro writes a comment like this and expects me to know how to help 💀💀💀

    • @Bread-qz3ht
      @Bread-qz3ht 3 месяца назад

      @@onetupthreenice tutorial, but how do you do erosion in particle effects?

  • @baron523
    @baron523 10 месяцев назад

    Excellent information. No jazz please.

    • @onetupthree
      @onetupthree  10 месяцев назад

      thank you 🙌 but i do be liking some kind of music in the background 🤔

  • @youranonymousyoutuber4051
    @youranonymousyoutuber4051 9 месяцев назад

    u need to make a bigger video man

    • @onetupthree
      @onetupthree  9 месяцев назад

      i try to keep my videos brief 🙇‍♂️