Godot Spatial Shaders - A Gentle Introduction

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024

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

  • @DigitalImpostor1
    @DigitalImpostor1 Год назад +17

    For those who fallow 3D Top Down Shooter Series and want recreate this in Godot 4.0.
    1* 13:26
    Now world vector is called "model_matrix"
    2* 18:53
    Now color uniform is called "ColorParameter"

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

    You should 110% come back and do an updated shader tutorial. There are not many resources and this seemed to be well received by your fans at 11k views. Much love

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

    This is a life saver. WIll be implementing all of this knowledge immediately - thanks. and you conjuring, confirming, and then continuing to use 'octant' through this was great.

  • @lukostello
    @lukostello 3 года назад +2

    Would never have guessed to use the vertex data to feed into the color input, thank you so much

  • @chrisfritz7545
    @chrisfritz7545 Год назад +2

    Holy #$@#! Please make more like this. You explained this so well.

  • @warrenpaul9858
    @warrenpaul9858 Год назад +3

    For those struggling in 4.0 to actually find the visual shader option. It wasn't an initial option. i had to add shader, then in the tooltip to save the file, there is an option of "type" select visual shader from there.

  • @SULTANVIDEOGAMES
    @SULTANVIDEOGAMES 2 года назад +1

    this is the best lesson on visual shaders

  • @phoboss950
    @phoboss950 3 года назад +7

    14:01 Pro tip: instead of using transform multiplication you can enable ShaderMaterial>Shader>Flags>world_vertex_coords to directly have the vertex input show the global vertex position.
    EDIT: if you want to do it by code:
    add "world_vertex_coords" to "render_mode":
    render_mode world_vertex_coords;
    heard it's suppose to save computation or something

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад

      Can that be done without code?

    • @phoboss950
      @phoboss950 3 года назад +2

      @@AgeOfAsparagus yes, using the inspector go and enable MeshInstance>Material/0>ShaderMaterial>Shader>Flags>world_vertex_coords
      EDIT: and just use the Vertex_Input as usual

  • @mch43856
    @mch43856 Год назад +1

    Amazing tutorial really well explained ty!

  • @AdredenGaming
    @AdredenGaming 3 года назад +3

    Oh man this was 90% of what I needed. Perfect Thank you so much sub

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад +2

      Thanks! I'm interested in doing more stuff like this. Please let me know if you have any ideas!

    • @AdredenGaming
      @AdredenGaming 3 года назад

      @@AgeOfAsparagus right on. my goal is a water column shader so like the deeper you go into the ocean the darker it gets. Haven't quite got a shader from this working yet. but it helped immensely. the alpha is a bit wired so not sure atm how to deal with that.

  • @tomgrimard8075
    @tomgrimard8075 Год назад

    Thanks a lot for the video! At first I had a bit of trouble because some of the nodes in visualshader changed their name and looks but I was able to do everything lol. I'm just starting using it but I want to do some insane blocks before doing some programmation (because I know C# kind of correctly already) hope to see more can't wait to see everything you did already :)

  • @guustavols
    @guustavols 3 года назад +1

    very good tutorial, please go further into this topic

  • @EeVeE3D
    @EeVeE3D 2 года назад +1

    Great tutorial.. Very well explained.. Thank you...

  • @GaryParkin
    @GaryParkin Год назад

    Holy crap this was cool. Thank you and please do more. In my head I was thinking of a 3d printer where you'd use the alpha value to make the cube appear when a node was moved up over it. I'm going to see if I can make this while it's fresh in my head. I'd assume the moving node could be just that LERP with the value changing over time from 0 to 1.
    In Godot 4.101 there's s little arrow in the Input so you can break out the red,green, and blue.

  • @NOPerative
    @NOPerative 3 года назад +1

    Neato!

  • @jeffg4686
    @jeffg4686 3 года назад +1

    really good explanation.

  • @alvinmrobles
    @alvinmrobles 3 года назад +1

    Great explanation. Thx for the help.

  • @dueddel
    @dueddel 3 года назад +2

    Haven't even seen 4 minutes of this video as of writing this, but enough to instantly subscribe to your channel. :) Thanks for sharing. I'd love to see more about spacial shaders (using the visual shader tool).
    Everytime I stumble upon shaders in general (as long as it's about using them in Godot) I notice that most people use the scripted shaders and I'm asking myself why don't they use the visual shaders? They're so much easier…
    I once played with visual shaders in Unity and it's a great tool. I wished more people would go that way in Godot as well. I get the impressen they go for the scripted shaders for some reason I don't understand, like is the visual shader buggy or something? … It seems to be one of the reasons I personally didn't start to finally learn more about shaders in Godot. Because there are (almost) only tutorial videos out there where scripted shaders are used, but I just don't want to use'em (for whatever strange reason, I'm a programmer for a living for about 18 years, I know I CAN learn shaderscript but I don't WANT to ;)).
    Furthermore, most shader tutorials are related to 2D, but I am interested in 3D. I think that kind of information is rare.
    That being said, I'd be happy to see more of videos like this one where someone can learn how to implement visual effects like wobbly vanishing objects and distorted portals and such stuff using visual spatial shaders in Godot.

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад +1

      Thank you! I was curious if there would be interest in this, which is why I pulled it out from the main series I'm doing at the moment. If there's enough interest, I'll do more for sure! If you have any examples of scripted tutorials you think would be interesting to recreate as visual shaders, drop me the links!

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад +1

      Funny that you mention a resistance to scripting shaders, I felt the exact same way! I dont know why, I think I felt dirty going back to a C style syntax, lol.

    • @dueddel
      @dueddel 3 года назад +1

      @@AgeOfAsparagus There's tons of videos I love to watch but never dare to implement myself in shader script (not even thinking of that :D). Have a look here, for example (look out for the "shader" and "effect" keywords on that video listing):
      ruclips.net/user/arleyutivideos
      Other than that:
      ruclips.net/user/results?search_query=shader+godot
      Just found that one on the above search result page (which is kinda exctly what I meant by vanishing objects effects, I could also imagine a few other effects of how appearing and vanishing could look like, but this is a good one already):
      ruclips.net/video/sf_Dc4ew3eM/видео.html

    • @dueddel
      @dueddel 3 года назад

      To have that said, you can access the code for all shaders made by that "きのもと結衣" (however that's being pronounced) user here:
      bitbucket.org/arlez80/workspace/projects/GE
      …or just see the video descriptions of whatever shader video you find in the listing (ruclips.net/user/arleyutivideos). As far as I can see the shader scripts are all published under the terms of MIT license.
      Nevertheless I didn't download any of them… It's still shader script. ;-)

  • @OLIV3R_YT
    @OLIV3R_YT Год назад

    Thanks❤

  • @davidmurphy563
    @davidmurphy563 3 года назад +2

    You know, I've been scripting in godot's shader language but the visual language looks very convenient. I should give it a whirl.
    Does the visual shader come with an overhead compared to just scripting do you know?

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад +1

      If you click the right most icon in the visual shader panel, you can see that it's just writing the shader code for you.

    • @NeZversSounds
      @NeZversSounds 3 года назад +2

      @@AgeOfAsparagus Not only that but also ANY shader gets compiled on GPU no matter how or where you write it. The only overhead visual shader has is that it is put together not manually and not use some optimal code you could write yourself.

  • @b3daz
    @b3daz 3 года назад +1

    Great one. I still wish for having a plugin that will copy the blender shaders workflow.

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад

      That's an amazing idea and I'm surprised that doesn't exist yet?

    • @b3daz
      @b3daz 3 года назад

      @@AgeOfAsparagus Dont know.

    • @alvinmrobles
      @alvinmrobles 3 года назад

      Your wish may come true soon

    • @b3daz
      @b3daz 3 года назад

      @@alvinmrobles Nice.

  • @QqQq-bf8bd
    @QqQq-bf8bd Год назад +1

    my version is godot 3.5.1 stable mono, i know some shaders code but how to connect any shaders script (2d or 3d) to gdscript, some suggestions is "set_shader_param()" or "set_uniform()" use gdscript, but i didn't know this proper code please help, i can not use any shaders

    • @AgeOfAsparagus
      @AgeOfAsparagus  Год назад

      See the suggested video card at the end of this one, that's where I use this material in a project.

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

    what if you then want the mesh to maintain the color generated after moving? There a way to parent the shader to a node's position?

  • @Speed-TV
    @Speed-TV Год назад

    PLEASE... DESELECT THE CUBE 😭

  • @martirexanimation2217
    @martirexanimation2217 3 года назад +1

    Can you make a AI friend for the player

    • @AgeOfAsparagus
      @AgeOfAsparagus  3 года назад

      Woah, cool idea!! What should it do? Should it be like a pick-up/power-up? I'm adding this to my list of possible future tutorial ideas! =D

    • @martirexanimation2217
      @martirexanimation2217 3 года назад

      yeah you can make a AI friend that protects you