Тёмный

Unity Shader Graph - Clouds Tutorial 

Gabriel Aguiar Prod.
Подписаться 130 тыс.
Просмотров 49 тыс.
50% 1

Опубликовано:

 

6 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 88   
@GabrielAguiarProd
@GabrielAguiarProd Год назад
This is such a nice technique, not hard to get it right and can yield some interesting results. 👍 Btw, learn more about VFX for Games with this course: www.udemy.com/course/unity-vfx-graph-thunderlord-magic-effects/?couponCode=29.99_UNTIL_20-09
@KamranWali
@KamranWali 3 года назад
Excellent tutorial. Goes well with my game. Though I was facing one small issue which was that from the game view (FP view) the clouds directly at the centre of the view were always darker than the clouds outside the centre. There was always this darker to light gradient from the centre to outwards. My hunch is that since the material type is Lit a shadow was forming on the centre view which makes sense because from the point of the player there should be shadow there since it is a mesh object. Disabling the shadow of the cloud mesh did not solve the problem for me. Fortunately I fixed this issue by changing material type from Lit to Unlit in the Graph Settings in the shader and now it is working perfectly as expected with no dark to light gradient being formed. :) Just wanted to share my solution if anyone happen to come across the same issue as mine. Take care and again an awesome tutorial. Keep it up! :) K Out!
@GabrielAguiarProd
@GabrielAguiarProd 3 года назад
Great solution, thanks for sharing!
@chudochert
@chudochert 3 года назад
I just adore you! This is the kind of content that RU-vid needs!!!
@mondainthewizard8514
@mondainthewizard8514 4 месяца назад
Great Tutorial! Thank you! It reminds me to UniSky (one of the first weather plugins in Unity).
@ArthurGamer
@ArthurGamer 3 года назад
Vim pelos anúncios achei até que era um curso que eu iria comprar, mas quando vi que era aulas do RU-vid fiquei irado, até me inscrevi
@shiny_shoes5878
@shiny_shoes5878 2 года назад
great tutorial, really liked how in the first few minutes when you showed using the noise I could see the effect I was looking for. In some other shader graph videos the person takes a long time for the effect to be shown, but you showed it at each step so you could stop where you like.
@GabrielAguiarProd
@GabrielAguiarProd 2 года назад
Glad you enjoyed it!
@midorayo1149
@midorayo1149 Год назад
thanks alot you helped me make a cloud shadow shader for an isometric 2d game
@GabrielAguiarProd
@GabrielAguiarProd Год назад
Hey that's awesome! Glad I can help fellow game designers 👍
@westingtyler1
@westingtyler1 Год назад
9:38 we see the low-lying clouds clipping through the mountains. it would be cool to see how to make them fade out right around objects. I've seen beach water tutorials that add a seafoam rim around water. if that can work, the same principle can be applied here, using a depth test, I think, to make the clouds never "cut" through objects. would be a nice upgrade. also, it would be cool to see how to set up a plane above the player that is positioned above them each frame, yet is set to use world coordinates so the cloud layers move as it should.
@esmanuryldrm285
@esmanuryldrm285 2 месяца назад
That was awesome! :)
@GabrielAguiarProd
@GabrielAguiarProd 2 месяца назад
Thanks! 😄
@ssalovaa
@ssalovaa Год назад
Great clouds. For anyone disgruntled about the low resolution, you can apply some simple maths to create a crude fractal noise subgraph using tiling nodes and the simple noise node.
@westingtyler1
@westingtyler1 Год назад
0:00 this gives me real Goldeneye 64 vibes. makes me want to work on my own goldeneye game. there's already two coming out: Agent 64, and also S.P.I.E.S, but I want to make my own, and these clouds would be perfect.
@theimperialkerbalunion7568
@theimperialkerbalunion7568 3 года назад
Looks quite good! Thanks for an amazing video
@victorhugoka4378
@victorhugoka4378 3 года назад
Muito boa sua aula Gabriel, ganhou um inscrito e um fã.
@Northsolja
@Northsolja 3 года назад
Awesome, Love the shader
@Mendogology
@Mendogology Год назад
Very nice tutorial. Well done
@GabrielAguiarProd
@GabrielAguiarProd Год назад
Thank you! Cheers!
@tarriochu95
@tarriochu95 6 месяцев назад
Would you do Volumetric clouds? if possible?
@videoproject-jn7zu
@videoproject-jn7zu 2 месяца назад
Thanks
@pedropc5824
@pedropc5824 2 года назад
Espetacular. Amazing. Subarashī.
@peterdelgado698
@peterdelgado698 Год назад
Great Tutorial!
@westingtyler1
@westingtyler1 Год назад
the only thing I want to change is that in the distance, the clouds become dark instead of staying white. probably because it's affected by the fog color? i wonder if there's a way to make it use the sky color. Also, I set the cloud shader to additive mode and to where they do not cast shadows - I plan to make my landscape shader have the shadows built-in, like how Genshin Impact does it, which would be super performant over shadows. this tutorial is great for cirrus and stratus clouds. but now we need to figure out how to make the poofy cumulus and nimbus clouds!
@esmanuryldrm285
@esmanuryldrm285 2 месяца назад
Were you able to solvee distance problem? My clouds becomes gray and ı couldn't arrange them staying white
@westingtyler1
@westingtyler1 2 месяца назад
@@esmanuryldrm285 ah yes I'm sure I must have or I'd be constantly annoyed. ... checking my project, I settled on the procedural sky shader by Digvijaysinh Gohil, with another cloud plane above the world with its own shader. checking further, while my skybox is the Digvijaysinh Gohil one, my clouds shader is called Clouds of Aguiar, which means I AM using this shader without issues. I can't share a screenshot, but I can share settings. Surface Input: CloudCOlor: white Scale_LayerA: 111 Scale_LayerB: 111 Scale_LayerC: 555 Speed_LayerA: x: 0.01, y: 0.005 Speed_LayerB: x: -0.001, y: -0.0005 CloudPower: 0.62 CloudAlpha: 4.21 Fresnel Power: 1.14 Max Brightness: 1 Alpha Clip: 0 My cloud plane in my scene is not actually a plane but a very wide flat bowl that curves upward toward the edges, since the alpha blend is based on a fresnel curvature, and this way you never see a sharp edge with my settings. the "CloudPlane" in my blend file is 18000m by 18000 wide by 448.821 m high to give an idea, exported as an fbx another cool benefit of my settings is that as your character moves upward toward the clouds, the clouds appear to dissolve, so you never have a harsh clip through the plane, if you cross through it. the cloud plane is in my scene and tracks is itself with the player's movement each frame just like the sun and moon object, so they never appear distorted from the camera perpective. All this means my clouds never touch the low horizon, and I'm considering adding a second cloud cylinder that also tracks the player position, just to have "low on the horizon clouds." I can't see a full graph of what he made in the video, but I think my adding the fresnel to the Alpha channel could be it (Fresnel Power, Power a and b, into Fresnel Effect Power, into One Minus, into the b of two multiply nodes connected to final noise texture mix, then into the Alpha of Fragment.) right before these two multiply nodes on the other track is multiply with cloudAlpha as the B, and the CloudPower Power node right before it, that splits upward toward the tiling and offset section. I hope this helps a bit. If this does help let me know. To see it all in action, one of my most recent long videos showcases me walking around my jungle area, and the sky is this, changing per time of day. i use the wind waker method of having tables of colors per time of day and weather condition, and the materials for the sky, fog, clouds, and environment lerp between those color sets depending on the TimeProgression time. PS. this grey issue in his vid seems to be the fog color affecting the cloud plane. there's a small chance I was able to disable 'affect by fog' somewhere in the shader, but I don't know how I'd set that since it's shader graph, unless i added this material to the URP settings and told it to ignore fog, but I'm not sure if that's possible.
@westingtyler1
@westingtyler1 2 месяца назад
here's another comment I have on this video as well: Don't like the hard edge far away on a cloud plane? I added a fresnel effect so I can make the hard edge of the cloud plane in the distance, fade off, making it look flawless: Fresnel Power float goes into both of a Power node's inputs. The power node goes into the Power input of a Fresnel Effect node. then I send it into a One Minus node to flip it otherwise it keeps the far edges but make the clouds above you invisible - the opposite of the desired effect. Then I multiply the one minus node with the final result of our Alpha blended parts, then I multiply the result again with the one minus node. then send THAT into the alpha channel of the node. adjust the Fresnel Power in the inspector to about 2.16 - or set that to the default value, and boom. no more hard edge. WARNING: i could not get the AlphaClip to look nice with the fresnel. I'm sure it's must be possible, though. the normal transparency works great though. it has the added benefit that as you raise the player up near the cloud layer, is smoothly fades out, reducing the harsh SNAP appearance when you cross through it. in lots of games 2d planar light based things like god rays through a window, will fade out as you approach, to prevent clipping appearances. you can use a similar fresnel effect on an ocean shader to make the water clearer/less reflective directly below you, or even more greenish, which is realistic in my real life experience, depending on the waters.
@domin6168
@domin6168 3 года назад
Oh thanks Gabriel ;D It will come in handy. I'm new im Unity hello ;D
@letsmakegames947
@letsmakegames947 2 года назад
When i save the clouds shader tut pipeline thing the plane stays pink even though I have assigned the material to the plane. How do I fix this?
@harukaj8567
@harukaj8567 4 месяца назад
Thank you for the tutorial, is there any way to control shadows casting from the clouds to plane because rn it is casting very sharp and dark shadows preventing to see materials when covered in shadows?
@toehtetpotatoe7549
@toehtetpotatoe7549 Месяц назад
did u find the way?
@harukaj8567
@harukaj8567 Месяц назад
@@toehtetpotatoe7549 nah, we did play around with the URP settings on shadows but we just used the cloud as set piece and have it not cast shadows since it was difficult to see the environment and enemies.
@viba_dev
@viba_dev Год назад
How could I make this repeat if my sky consists of multiple planes?
@midorayo1149
@midorayo1149 Год назад
you could try to make the uvs relative to absolute world position , so the texture drawn will move depending on the position of the plane , this trick is useful in making seamless tiling between objects of the same material
@gopishankareppshankar
@gopishankareppshankar 3 года назад
Hey Gabriel, Awesome tutorial man, Can you please share how to use GPU instancing with materials that uses shaders made using shader graphs, if you know. I am really struggling to make it work.
@AETutsVids
@AETutsVids 2 года назад
I don't think shader graph supports it
@Z0MB1T
@Z0MB1T 2 года назад
You can make it use GPU Instancing but you need to make it not SRP Batcher compatible. Unity shows you how here: docs.unity3d.com/Manual/SRPBatcher.html#intentionally-removing-compatibility
@davidkallab2571
@davidkallab2571 25 дней назад
Thank you for this tutorial, I managed to use this shader so I can get cloud shadows in my 2D game. One question tho , is there a way to make the clouds (shadows in my case )edges less sharp ( more blurry ? )
@davidkallab2571
@davidkallab2571 23 дня назад
The alpha clipping is too sharp. Is there a way to make the edges blurry ?
@westingtyler1
@westingtyler1 Год назад
Don't like the hard edge far away on a cloud plane? I added a fresnel effect so I can make the hard edge of the cloud plane in the distance, fade off, making it look flawless: Fresnel Power float goes into both of a Power node's inputs. The power node goes into the Power input of a Fresnel Effect node. then I send it into a One Minus node to flip it otherwise it keeps the far edges but make the clouds above you invisible - the opposite of the desired effect. Then I multiply the one minus node with the final result of our Alpha blended parts, then I multiply the result again with the one minus node. then send THAT into the alpha channel of the node. adjust the Fresnel Power in the inspector to about 2.16 - or set that to the default value, and boom. no more hard edge. WARNING: i could not get the AlphaClip to look nice with the fresnel. I'm sure it's must be possible, though. the normal transparency works great though. it has the added benefit that as you raise the player up near the cloud layer, is smoothly fades out, reducing the harsh SNAP appearance when you cross through it. in lots of games 2d planar light based things like god rays through a window, will fade out as you approach, to prevent clipping appearances. you can use a similar fresnel effect on an ocean shader to make the water clearer/less reflective directly below you, or even more greenish, which is realistic in my real life experience, depending on the waters.
@polyfoxgames9006
@polyfoxgames9006 3 года назад
Amazing vid as always! Any way you think you could replicate brimstones pillar of fire effect from valorant?
@r.iyushofficial5318
@r.iyushofficial5318 3 года назад
Awesome 👌
@Marcoyt1111
@Marcoyt1111 Год назад
Hello, awesome tut! i put this to work in matter of minutes! but i have a problem, even scaling at 500 i can see in the distance the end of the plane and the skybox behind, any smart method to prevent that? :)
@GabrielAguiarProd
@GabrielAguiarProd Год назад
Well I would suggest turning on Fog, if possible. If not, in the shader you might need to use a mask. The mask would consist of white: visible, black or transparent: invisible. That mask would be a texture that is multiplied near the end of the shader.
@Marcoyt1111
@Marcoyt1111 Год назад
@@GabrielAguiarProd hey there, i managed to make it work nicely by increasing the plane and setting the max distance of my procedural world to half the plane width/height. Working nicely Thank you!!! :)
@frankblau3485
@frankblau3485 6 месяцев назад
I had the same problem, use in your cloud shader Blending Mode Additive instead of Alpha. this should fix this issue
@arrozk5365
@arrozk5365 2 года назад
Very good tutorial! It's unfortunate it doesn't work in lower Unity versions tho...
@GabrielAguiarProd
@GabrielAguiarProd 2 года назад
How so? As long as you have Shader Graph you can recreate this in URP or HDRP. Start with a Lit Graph or Unlit Graph. If you are in the standard render pipeline you can steel use Amplify Shaders, the nodes are similar and the workflow/idea is the same. :)
@arrozk5365
@arrozk5365 2 года назад
Gabriel Aguiar Prod. Unfortunately, the shader gets bugged. The textures don't work right and when trying to adjust to less clouds, the textures get black and orange
@leonardo56333
@leonardo56333 2 года назад
Não tem a opção two sided :/ fiz tudo igual, a unity deve ter tirado ou mudado de lugar essa opção ...
@GabrielAguiarProd
@GabrielAguiarProd 2 года назад
Two Sided is now called Render Face and you can set it to Both.
@phamhung2590
@phamhung2590 2 года назад
thank u so much
@ShubhamSarraf-i7k
@ShubhamSarraf-i7k Год назад
There is no shadow effect of cloud on the surface. Can you help for the shadow effect?
@yepom4854
@yepom4854 2 года назад
I selected the Surface Type to Transparent but it didn't work ( no matter how much i adjust the power or anything else). It's solid 😅
@GabrielAguiarProd
@GabrielAguiarProd 2 года назад
Not sure why it isn't working on your side. But try to connect to the last node to the alpha input. Or make sure the shader is saved.
@rehyotaku
@rehyotaku 3 месяца назад
is this expensive? can I use it for mobile project?
@666j1
@666j1 2 года назад
3:22 "two sided" not available in built in mode
@tristanvoulelis1422
@tristanvoulelis1422 2 года назад
There is a "Render Face" drop down. Choose both
@jim377
@jim377 3 года назад
nice
@rbarbeats
@rbarbeats Год назад
for some reason the clouds lag and the movement is not smooth but stutters
@stylie473joker5
@stylie473joker5 Год назад
In Editor window rick "Always refresh" right of sound icon
@syntax_error6882
@syntax_error6882 2 года назад
clap clap .. cleaver
@epicjoshy1485
@epicjoshy1485 2 года назад
the shader is working but it’s giving me warnings. pow(f, e) will not work for negative f. use abs(f) and so on. any solutions because i’ve never worked with shadergraphs that much
@GabrielAguiarProd
@GabrielAguiarProd 2 года назад
It's just a warning, you can't use negative values with a power node (pow) but the warning suggests to use an absolute nodde (abs) instead.
@epicjoshy1485
@epicjoshy1485 2 года назад
@@GabrielAguiarProd oh ok. thanks
@marcrem
@marcrem Год назад
Nothing is going on, thanks for asking
@666j1
@666j1 2 года назад
3:09 no universal available. only "built in"
@GabrielAguiarProd
@GabrielAguiarProd 2 года назад
Make sure you are in the Universal Render Pipeline (URP). You can create a new project with Unity Hub and select URP as the template, it will make your life easier when following this tutorial. Hope this helps.
@666j1
@666j1 2 года назад
@@GabrielAguiarProd thanks mate
@namesurname624
@namesurname624 3 года назад
Is there any way to make the silhouette edges have a smooth falloff? Fresnel doesn't work
@GabrielAguiarProd
@GabrielAguiarProd 3 года назад
Once you use the Alpha Clip it simply cuts the edges abruptly, unfortunately.
@joshuastevenson6962
@joshuastevenson6962 3 года назад
@@GabrielAguiarProd You might be able to use the dithering node to make some smoother shadow falloff.
@GabrielAguiarProd
@GabrielAguiarProd 3 года назад
That't a nice tip, thanks!
@PG13park
@PG13park 2 года назад
Can someone help me at 3:08 when he says to use universal I click that and save asset and my material stays pink. I also have another option for built in and when I use that target it works but I don't know if built in target is causing it but the clouds only move when I change the speed then they stop again.
@PG13park
@PG13park 2 года назад
Ok whenever I click on the cloud plane it moves just a bit I dont think its the problem above
@PG13park
@PG13park 2 года назад
nvm got it working
@divyeshsondagar4170
@divyeshsondagar4170 3 года назад
Can you make video on how to make plane reflection and shockwaves and screen distortion like Chameleon Run. It would be so grateful 😊.
@divyeshsondagar4170
@divyeshsondagar4170 3 года назад
And also reflected Poweups
@iDerp69
@iDerp69 3 года назад
What you want to achieve is WAY easier in HDRP. It has a built-in distortion effect that is very easy to use. I tried in URP, and while you can do some effects using the Scene Color node, the effects cannot stack and it's an enormous headache to setup.
@divyeshsondagar4170
@divyeshsondagar4170 3 года назад
@@iDerp69I'm learning unity so I'd not have that much Idea if you can help than its would be grateful
@iDerp69
@iDerp69 3 года назад
@@divyeshsondagar4170 HDRP is just the render pipeline bro, Unity has 3 render pipelines you can choose from, and HDRP might be a good fit for you.
@TheBlackbirdii
@TheBlackbirdii 3 года назад
does this work with hdrp ?
@GabrielAguiarProd
@GabrielAguiarProd 3 года назад
Yes, the nodes and techniques are the same.
@TheBlackbirdii
@TheBlackbirdii 3 года назад
@@GabrielAguiarProd what the difference between shader graph hdrp and standard one ... is it possible to create one shader and works automatically on both pipelines ?
@morphtek
@morphtek 3 года назад
@@TheBlackbirdii that is the whole point of shader graph ,tho standard (legacy pipeline) is a qustion still it will definetly work in hdrp and urp automaticaly if you use standard nodes
@TheBlackbirdii
@TheBlackbirdii 3 года назад
@@morphtek because i used shader graph but they never worked for me on hdrp
@nickdevprod3667
@nickdevprod3667 2 года назад
why it looks like shit for me lol
Далее
STYLIZED FIRE in Unity VFX Graph Tutorial
20:17
Просмотров 75 тыс.
Unity VFX Graph - Blood Tutorial (Procedural Shader)
18:26
POLI и Маша - Сигма бой
00:20
Просмотров 286 тыс.
How Big Budget AAA Games Render Clouds
10:45
Просмотров 275 тыс.
Unity Shader Graph - Waterfall Effect Tutorial
23:05
Просмотров 157 тыс.
Coding Adventure: Clouds
12:50
Просмотров 1,2 млн
Unity Shader Graph - Toxic Waterfall Effect Tutorial
19:27
Unity Shader Graph - Glowing Crystals Tutorial
13:15
Просмотров 58 тыс.
GRASS SWAY in Unity - SHADER GRAPH
16:56
Просмотров 730 тыс.