Volumetric Clouds in Unity + Time of Day lighting

Поділитися
Вставка
  • Опубліковано 13 вер 2024
  • Making a Volumetric Cloud Shader in Unity.
    You can read a more detailed write-up of this approach at my Patreon: / 21646034
    If you'd like access to the source files (shaders and Unity Project) that you can freely use in your own games, please consider supporting me on PATREON - / pucklovesgames
    Keep up to date by following me on TWITTER - / ed_dv
    -----------------------------------------------------
    I'm using Amplify Shader Editor to put together these shaders. You can find out more about it here:
    amplify.pt/unit...
    -----------------------------------------------------

КОМЕНТАРІ • 82

  • @johnjackson9767
    @johnjackson9767 5 років тому +20

    This is actually a very creative way to do a fairly cheap version of volumetric cloud rendering ( at least when compared to the traditional ray-marching method ). Kudos for the ingenuity!

  • @JadonBarnes
    @JadonBarnes 5 років тому +7

    These videos are incredibly well done... how do you not have 100,000+ subs!?

  • @swanijam
    @swanijam 5 років тому +7

    this is great! amazed at how fast you went through this without me getting lost for a second. I'm looking forward to more videos from you :D

  • @macro3751
    @macro3751 2 роки тому

    literally the first vid i've seen from this channel
    and now i need more
    you just got a new subscriver, this is both informative and very fun to watch

  • @garywood97
    @garywood97 4 роки тому +1

    Excellent concept. This is going to be so much faster than using particles.

  • @user-rg9rd5cb7u
    @user-rg9rd5cb7u 6 місяців тому

    bruh, I love you. this is exactly what I need now

  • @Discipol
    @Discipol 3 роки тому +8

    You can use this tutorial and apply it to Shader Graph, it has similar nodes (often named differently but otherwise identical)

    • @westingtyler1
      @westingtyler1 Рік тому +1

      but what about the quad stacking to get volume? can that also be done in shader graph?

  • @Keatosis_Quohotos
    @Keatosis_Quohotos 5 років тому +22

    Well my mind is blown.
    There is no way I can follow this

  • @JWILD-S
    @JWILD-S 6 років тому +5

    This is fantastically creative. You, sir, have gained a follower!

  • @dreamfractures
    @dreamfractures 3 роки тому +1

    Thanks a ton for sharing your work! You've saved my project!

  • @Hyphen3372
    @Hyphen3372 2 роки тому +1

    i made it in shader graph and it looks awesome.

  • @VictorMoneratto
    @VictorMoneratto 6 років тому +2

    Your tutorials are fantastic!

  • @truenosolitario4184
    @truenosolitario4184 3 роки тому +2

    Hi! Great shader!!
    Only two questions:
    Could I edit this shader (created in Amplify) in Unity Shader Graph?
    Works in Unity scene even if I haven't Amplify shader?
    Thanks a lot

  • @martingrof1685
    @martingrof1685 5 років тому

    Subscribed because of high quality content.

  • @eobet
    @eobet 6 років тому +1

    Utterly amazing. Every game should start using this now.

  • @saaamoth
    @saaamoth 5 років тому +1

    Excellent tutorial !

  • @red_velvet_0w0
    @red_velvet_0w0 2 роки тому +3

    is there any way to optimize this so I can get more that 1 fps in my game?

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

    I am using the latest unity 2022.3.30f1 and I can't either find something called "Noise Texture" nor the same "Noise Generator", not even the Append you used...

  • @christianweatherley8069
    @christianweatherley8069 5 років тому +3

    The results are cool, but I was simply unable to recreate anything past the 2:20 mark. You seem to skip a lot of parts halvway through the video (I did check out you "Subsurface Scattering for Foliage, in Unity (WITHOUT RAYTRACING!)
    " video as you recommended), and it became impossible to follow what you where doing at that point. Consider slowing down and explaining in detail what it is you are doing in future videos.

    • @eggheart
      @eggheart 5 років тому +2

      That's fair! I do go through a lot of info very quickly, sorry about that. I do want to keep the length of the videos down, and there is a lot to cover, so it might be better to split it up into multiple videos next time? Perhaps have a look at the write up here - www.patreon.com/posts/21646034 - it might help to fill in gaps a little. If you have any specific questions though, ask away and I'm happy to answer anything. Thanks so much for taking the time to give me feedback - I'll keep trying to improve these videos going forward!

    • @stormAster720
      @stormAster720 4 роки тому +1

      @@eggheart well the patreon post even has some gaps, but I would like him to show the whole shader or atleast, where he connects the nodes.

  • @DNMusicdimas
    @DNMusicdimas 3 роки тому

    Amazing bro, thank for tutorial

  • @catafest
    @catafest 3 роки тому

    I guess a similar idea would be to fill the water with the foam of the waves, but you will have to get the geometry of the upper vertices ...

  • @glannho5459
    @glannho5459 3 роки тому

    love it

  • @Diamond-yn4nu
    @Diamond-yn4nu Рік тому

    Very good, but I have a question, how will this affect the frame rate?

  • @RenderAndReviews
    @RenderAndReviews 3 роки тому

    Thanks u, u are great!!!

  • @TheARTY50
    @TheARTY50 2 роки тому

    how do i get started , which shader should i create in the Assets folder to start following along to this?
    This is going to b super noob...but i made a defualt scene, spent afew hours on level designing the terrain. now i wanna make clouds following this tutorial as my first shader editor tutorial. If i need to make an HDRP scene, could i somehow port this terrain and scene to a new HDRP setup scene?

  • @abhishekshrivastava1494
    @abhishekshrivastava1494 4 роки тому +2

    Will this cloud asset will work for HDRP or not? If I take pateron membership.

    • @stormAster720
      @stormAster720 4 роки тому

      it will not work with the patreon shader. you got to remake it in HDRP

  • @LouiseChib
    @LouiseChib Рік тому

    I cant seem to make mine work, it's just white on the plane mesh :/ anyone have the same problem?

  • @Blessy4543213
    @Blessy4543213 5 років тому +1

    i love game too

  • @adrienhoule7713
    @adrienhoule7713 2 роки тому

    I juste found your tutorial and I love it but i am unable to make the change the opacity with the middle y value and i don't know why any idea ? I tried looking at your patreon but still couldn't succeed. Thanks in advance.
    edit : I finally succed after a couple hour I was multiplying it with my noise after power and step node, you need to multiply it before

  • @FirestarterWG
    @FirestarterWG 2 роки тому

    Which Render Type and Render Queue settings does this shader use?

  • @AnthonyMagdelaine
    @AnthonyMagdelaine 4 роки тому +6

    it looks more like a demonstration than a tutorial.

  • @unrealdevop
    @unrealdevop 3 роки тому +3

    Is there no way to do this without spending $100 on the Amplify Shader Editor? I didn't understand what was going on the first time I saw this but now I'm beginning to think that either it's too hard too do it without the Amplify Shader, you can't do it without it, or the people releasing these video's are trying to convince people to buy it.....Either way UE4.26 will be out soon and they don't require you to buy a $100 asset to make Volumetric Clouds....They give you the power too for free.....Along with other assets that are twice as good as any of the free assets you can find on the Unity Asset store, so if you were trying to convince me to buy the Amplify Shader....You really just convinced me to switch over to the Unreal Engine.

    • @talanock
      @talanock 3 роки тому +2

      While I agree, imo the worst thing about Unity is that it lacks basic features it competitors have. It's pretty sad actually how long Unity has gone without adding in a shading graph editor. With that said, Unity does indeed have a 'official' shader editor which you can probably do something similar. You need to use one of the newer render pipeline to be able to use it though and it's still new compared to unreal or amplify so might not have as many bells and whistles.

    • @unrealdevop
      @unrealdevop 3 роки тому

      @@talanock Yeah, Unity is cool I like it but trying to learn it seems to me to be quite a bit harder then the Unreal Engine...Maybe this wasn't true in the past because I have seen a few posts saying UE is harder too learn. UE has a pretty thorough training program and each window is explained fairly well within the program. The thing that I think is most confusing is the fact that Unity has 3 different pipelines too choose from and I haven't quite figured out what the specific purpose is for any of them. All I know is that I can only do 1/3 of the UA-cam tutorials in each of the pipeline, so if I want clouds and water in my scene I may only be able to find tutorials for two separate pipelines and moving them from one too the other breaks them. It's frustrating when your trying to learn something but you can't use all the techniques between pipelines. I look forward to the day the newer pipelines become well developed but for now I think my best bet for learning this stuff would be to stick with a program that's not split 3 way's

    • @UltromanTheTacoman
      @UltromanTheTacoman 2 роки тому

      Great assumptions based on your own answer to your own question :P You can implement this in Unity's built-in node-based shader, so you do not need Amplify. Look, there are certain types of games that are easier to make in UE and the same for Unity, heck, the same for RPG Maker. In UE, it's much easier to get started with realistic-looking first- and third-person games, but you still need as much work as in Unity to get a customized look (you don't want your game to "look like the engine"). In Unity, it's really easy for beginners to get something simple going, until they hit the steeper slopes on the learning curve and want to push their games more, and it's more set up so you have a blank slate, and can then pull in the assets you want to use for this particular project. UE has a lot more bells and whistles showing off, but they're showing off very specific things targeted at specific types of games, and you won't find all genres represented equally in terms of ease of implementation across the different engines.

    • @unrealdevop
      @unrealdevop 2 роки тому +1

      @@UltromanTheTacoman I hear you, and you make a some pretty good points. I think Unity just didn't have enough documentation on doing things at the time to convince me to stick with it. It's a decent engine.

    • @UltromanTheTacoman
      @UltromanTheTacoman 2 роки тому

      @@unrealdevop I hear YOU on that! I find that Unity has a LOT of documentation, but sadly there are several small "gotchas" all over the place that aren't documented, which will trip anyone up (especially with their new render pipelines, which all have steep learning curves). I have many things to complain about with Unity, especially with how long it takes for a new system to become stable enough to use, and abandoning systems to make a new version of the same system before making the first system stable, and of course just the reality of how an asset store works, in that you can't assume that the assets you buy are ever going to get updated again, so using it as a crutch to embellish the functionalities of an engine, makes for an unstable development cycle. But hey, that's game development ;) And a lot of games ARE made in Unity, so surely you could do it, too, especially since you already know UE.

  • @ProfGustavo
    @ProfGustavo 4 роки тому +1

    Congratulations.
    How to open this (0:24) unity windows?
    Thank you.

    • @edo6192
      @edo6192 4 роки тому +2

      Basically when you select type of project while making it, select Universal Pipeline, then you can make a new shader by right clicking in the file manager in assets folder and clicking Create -> Shader -> PBR Graph. From there you just double click the file you created and you can start editing the nodes

    • @unrealdevop
      @unrealdevop 3 роки тому +1

      These videos with the odd looking shader graphs are being created using the Amplify Shader Editor asset that sells for $100 on the unity asset store....Wait a couple of months and Unreal Engine 4.26 will be out and you'll be able to make the without buying a $100 asset, Besides that the Devs will release expensive assets every month for people to download for free till the end of the month. The people selling these expensive assets on their store get paid directly from the Devs when they give them away for free. Just the other month there was an asset that was givin away for free that sells at around $350.

  • @placebo_yue
    @placebo_yue 3 роки тому +2

    pretty cool results but the tutorial is too rushed, it's quite complex, i don't think i'll be able to follow. Anyone made it and is willing to share it? i'm about to make a flying on top of a dragon amid the clouds and these clouds would be perfect for it, without adding unitypackages and bloating the project even more

  • @llporpammep
    @llporpammep 6 років тому

    Could you please describe a method of making them flying through? You said on twitter that it need vertical quads, but how do I need to sample noise texture with a vertical quad?

    • @PuckLovesGames
      @PuckLovesGames  6 років тому +1

      If you use the shader in that video, where the middle position and cloud height are fed into the shader (via SetFloat()), and the vertical gradient is calculated by the worldPosition.y difference from the middle position, (rather than using baked vertex colours for example), then any quad overlapping the area and using that shader will correctly draw the 3d cloud, from any angle, even vertical quads. You can use the same Graphics.DrawMesh to draw vertical wall strips in front of the camera (and locked to the cloud position). It should 'just work'. I will do a more thorough write-up soon and go over it in more detail!

  • @EliasPauloDaSilva
    @EliasPauloDaSilva 3 роки тому

    can you please update this.... all the node have changed name... impossible to follow in 2021

  • @StarOnCheek
    @StarOnCheek 3 роки тому

    Pog

  • @Alan742
    @Alan742 2 роки тому

    In which program did you make the noise

  • @synisterau
    @synisterau 4 роки тому

    What would be the equivalent of a circular gradient in Shader Graph?

    • @LemonMontage420
      @LemonMontage420 3 роки тому

      Just make a regular gradient that has a sphere mask attached to it, the sphere mask should have the world position.y input, you can get this by using a position node, setting it world, connecting it to a split node, and connecting the green (g) channel to the sphere mask (red is x, green is y, and z is blue)

    • @Player-fx3vt
      @Player-fx3vt Рік тому

      get a Fresnel effect node and connect it to a one minus node
      and then the output you have is the exact same with a circular gradient

  • @alicewithalex
    @alicewithalex 6 років тому +3

    Nice tutorial do more

  • @giulianoscalamandre1555
    @giulianoscalamandre1555 3 роки тому

    Is it possibile to reproduce this shader in the standard unity shader graph?

    • @Player-fx3vt
      @Player-fx3vt Рік тому

      Yes, but you will need a custom node for the world light direction. In rest all the nodes are the same except for the circular gradient where you will need a Fresnel effect node that you then invert (chuck it into a one minus node). For the custom node, search the internet for one the just follow the steps there.

  • @blackpowerentertainment2281
    @blackpowerentertainment2281 5 років тому +1

    Just started making games in Unity, been learning really fast but now I see that ive been very arrogant and overconfident because I have absolutely no idea what is going on is this video and now im leaving, goodbye smart people.

    • @PuckLovesGames
      @PuckLovesGames  5 років тому

      No no, come back! This is pretty complicated stuff really, and I also go over it sooo fast just to fit it into a short video - it's really more of a summary in many ways, so don't feel bad if it doesn't make sense. Even if you don't get everything that's happening, there's still value in getting a broad idea of how things are done, so if/when you do get up to doing stuff like this you'll have an idea in place. Also, nobody really ever feels like they know what they're doing, that's the joy of gamedev - learning new things constantly. Keep at it! And let me know if you have any questions and I might be able to help or point you in the right direction.

    • @blackpowerentertainment2281
      @blackpowerentertainment2281 5 років тому

      @@PuckLovesGames Maybe if you could make the video again but like really break it down for the noobies? Because most tutorials I watch they break down absolutely everything they do, theyll be like "Okay so now were gonna make a cube, to make a cube you click create in the hierarchy and choose 3D object and then select cube" where as as soon as I started watching this video I saw an interface that looks like the node editor in blender but Ive never seen that in Unity before so I didnt know how to pull it up on my own screen and follow along. I think its just that this type of thing is more for intermediate developers where as I just got the basic syntax down.

    • @rubenlevidias
      @rubenlevidias 4 роки тому

      @@blackpowerentertainment2281 The "Blender like node editor" is the Shader Graph. Just in case :)

  • @raynerhandrian1486
    @raynerhandrian1486 5 років тому +1

    I wonder if you can add volumetic light too on that cloud

    • @hugokostic9107
      @hugokostic9107 4 роки тому

      It's just a lighting transmission function to add, but with some depth calculation too

  • @saiyerreddu2669
    @saiyerreddu2669 3 роки тому

    Is this same effect possible using shader graph in URP??

    • @LemonMontage420
      @LemonMontage420 3 роки тому

      This tutorial is in URP

    • @saiyerreddu2669
      @saiyerreddu2669 3 роки тому

      @@LemonMontage420 gotcha, but it's using amplitude, does it fully translate over to shader graph??

    • @LemonMontage420
      @LemonMontage420 3 роки тому

      @@saiyerreddu2669 if you mean "amplitude" as in the amplify plugin for shader graph, I'm not sure since I didn't use that to make my clouds (was just using this tutorial to get the basic concepts to make my own cloud shader)

    • @saiyerreddu2669
      @saiyerreddu2669 3 роки тому

      @@LemonMontage420 right sorry I meant amplify, but thx for the reply

    • @LemonMontage420
      @LemonMontage420 3 роки тому

      @@saiyerreddu2669 you're welcome!

  • @lexiekun1443
    @lexiekun1443 4 роки тому

    What programm do you use and what shader?

    • @stormAster720
      @stormAster720 4 роки тому

      Amplify shader editor, and you are seeing the tutorial rn

  • @diego9469
    @diego9469 5 років тому

    Ohh shaval :v

  • @MatrakenKEN
    @MatrakenKEN 5 років тому +3

    I wanted code, I got lego pieces... :'C

    • @PuckLovesGames
      @PuckLovesGames  5 років тому

      Yep, this video just covers the approach and ideas behind the shader. If you want the code, all the files, including the mesh generation code and shader code (and many other shaders) , they're available on my patreon here: www.patreon.com/pucklovesgames
      You can get a glimpse at the mesh generation code at 1.30 in the video ua-cam.com/video/LLUUIAKFgWg/v-deo.html
      If you want to code your own shader from what's shown in the video, let me know if you have any questions about parts that are unclear, and I'm happy to help!

  • @alexfedz7739
    @alexfedz7739 3 роки тому +1

    you go too fast, i cant follow this

  • @MonstrumReborn
    @MonstrumReborn Місяць тому

    tf is this, this aint no shader graph or anything

  • @GR--cy3pj
    @GR--cy3pj 5 років тому

    60 dollars for this particular shader. meh

    • @PuckLovesGames
      @PuckLovesGames  5 років тому

      Only $5 on my patreon - plus you get a lot of other shaders and effects included as well.

  • @ue4friendly151
    @ue4friendly151 4 роки тому

    make this for Unreal Engine

  • @ronjart
    @ronjart 6 років тому +1

    Fantastic tutorial!