Dissolve Effect in Unity Shader Graph

  Рет қаралды 67,212

Daniel Ilett

Daniel Ilett

Күн бұрын

We can create a dissolve effect in Shader Graph using a handful of nodes! Also available in text format here: danielilett.com/2020-04-15-tu...
💻 Get the source on GitHub:
github.com/daniel-ilett/disso...
🍕 See my new Bitesize Gamedev series on Twitter: / 1320515252098912261
--------------
📚 Get a copy of my shader book here: www.dpbolvw.net/click-10074214...
✨ Grab Snapshot Shaders Pro here: assetstore.unity.com/packages...
------------
💬 Join the Discord: / discord
💖 Support me on Patreon: www.patreon.com/danielilett?f...
☕ Or throw me a one-off coffee on Ko-fi: ko-fi.com/danielilett
#unity #dissolve #shader-graph

Пікірлер: 73
@MarcWithaC-BlenderAndGameDev
@MarcWithaC-BlenderAndGameDev Жыл бұрын
If anyone's trying to figure this out in 2023 (2021.3.16f1), here are my notes on what appears to have changed since this video was posted: PBR graph is now Create->Shader Graph->URP->Lit Shader Graph -Select graph inspector window -Select Graph Settings tab -Set surface Type to transparent (Makes the Alpha property show up in Fragment) Properties now show up in a separate window called Graph Inspector, not directly below the items in the shader graph Albedo is now Base color Vector1 is now Float Instead of selecting 2 sided rendering -Select Graph inspector -Select graph settings tab -Set 'Render face' to _Both_ in 'Graph Inspector' Main Preview sometimes shows all teal until you drag it and then it refreshes (at least for me it does).
@danielilett
@danielilett Жыл бұрын
This is a good summary of what's changed since I posted this video, thanks! Lots of small changes happened to Shader Graph over the years.
@billmolloy2264
@billmolloy2264 4 ай бұрын
Please pin Marc's comment @@danielilett
@mikemiller5543
@mikemiller5543 3 жыл бұрын
You only took 4.5 minutes to explain what other people take a full hour to explain. This is exactly how tutorials should be made. Great job!!
@johnes2337
@johnes2337 4 жыл бұрын
I really hope this channel blows up!
@johnes2337
@johnes2337 4 жыл бұрын
It appears that it has!
@TheKarchi
@TheKarchi 2 жыл бұрын
Short and informative. Great job!
@archmagesalamar1377
@archmagesalamar1377 3 жыл бұрын
Just found you and immediately subscribed. Excellent tutorial. Thanks
@camelmotion2685
@camelmotion2685 2 ай бұрын
Thank you, straight to the point, everything works even on complicated geometry
@VyvyanTheGreat
@VyvyanTheGreat 3 жыл бұрын
This was super helpful, thank you!
@NickM-dw2zc
@NickM-dw2zc Жыл бұрын
Love the tutorial! Some feedback though- might be a little easier to use if, at the end, you quickly zoomed out and showed the whole graph & expanded all the parameter tabs to show the default values. That way, if a viewer missed a step they wont have to dig back through the entire thing to be able to fix it.
@mk3suprafy
@mk3suprafy 3 жыл бұрын
If you have trouble with transparency, the alpha clip also get set to .5 from 0.
@xcrimson4017
@xcrimson4017 3 жыл бұрын
wow good video i found out late! keep it up!
@someonesomewhere1975
@someonesomewhere1975 2 жыл бұрын
Short and on point. Would be nice to have an updated version for this for the new unity versions/shader graphs/
@danielilett
@danielilett 2 жыл бұрын
A lot of my older videos were made just before Unity changed how Shader Graph works a bit, so I definitely agree. There are many ways to do a dissolve effect so I'd probably try to do something a bit different, or at least add to this effect somehow!
@kickcreator_dev
@kickcreator_dev 2 жыл бұрын
Yes, yes, yes, YESSSS! Thank you, random person of the internet, in unity 2021 its quite a bit diferent to make following your tutorial... BUT FINALLY!! (after 3 days) i learned how to add this cool efect on my game, thanks soooo much dude😁👍
@xsoniq344
@xsoniq344 2 жыл бұрын
thanks dude!! useful lesson
@beecee793
@beecee793 3 жыл бұрын
Is there a way to dynamically create the remap values so that they do not need to be edited based on the noise map if/when it is changed?
@2ksp235
@2ksp235 2 жыл бұрын
Great video thx. Can you pls make an example with code like on trigger this dissolve effect happens? i am learning to code and also unity
@anferrr
@anferrr 3 жыл бұрын
Hey, I have a question, first of great lesson. I spent all night looking up shader stuff and this is by far my favorite video. Second, how would one go about using an ellipse as a mask instead of a height value. I've had ideas but that addition of noise + y value gets me confused ^^'
@DRT-81
@DRT-81 2 жыл бұрын
I am using dissolve in a 2d project and the base player sprite & animation is a ghost when i add the dissolve material , any help would be appreciated to get the base sprite to appear correctly , i have the effect on script spacebar key .
@Coolkidstan
@Coolkidstan 2 ай бұрын
For me the emission either goes in the gaps where the alpha is or when i flip the last step node it will go in the opaque parts but not have an edge between the 2 layers
@ramkillnani8293
@ramkillnani8293 3 жыл бұрын
Doesn't work in HDRP. Can't seem to get the outline colour to pop up. It dissolves without any outline or edge colour.
@Kalahee
@Kalahee 3 жыл бұрын
Main issue here I have with this is position node in World mode if object moves above Cutoff Height it also gets dissolved. Changing to Object mode, Cutoff Height is on pixel's local position and somewhat goes from +height/2 to -height/2, but not perfect due to Edge width and Noise strength. Anyway, I've at least managed to add a customizable direction to this.
@pixitales5017
@pixitales5017 2 жыл бұрын
Im getting the same issue too, how did u add your customizable direction?
@yuriaugusto1084
@yuriaugusto1084 4 жыл бұрын
I'm trying for almost 4h to make this shader work but everthing he does it's dissolve when my Y is above or underneath 0 maybe unity changed something and that's why don't work... great tutorial however.
@GameGourmand
@GameGourmand 3 жыл бұрын
I was trying to use this for soldiers but I don't want to keep them transparent because their materials and shadows are glitching. Is there any suggestion? I don't want to replace after dissolve animation end it doesn't look good.
@GameGourmand
@GameGourmand 3 жыл бұрын
If someone wonder about the solution I fixed it by using AlphaTreshold and kept the material Opaque, for more information check Brackey's Dissolve example on KZbin.
@koniipinka7923
@koniipinka7923 3 жыл бұрын
Can i add that in 3d text?
@AMVWORLDYT
@AMVWORLDYT 3 жыл бұрын
Hi Daniel, is there any way to rotate the shader? if i rotate the object, the shader continue applying the effect in vertical
@danielilett
@danielilett 3 жыл бұрын
Yes! You'll notice I used the world position when defining where the cutoff point is. If you instead use the object position, then the dissolve effect will rotate with the object. You might need to tweak the values you use for the cutoff point though.
@AMVWORLDYT
@AMVWORLDYT 3 жыл бұрын
@@danielilett We got it!! thanks man, works really good, you have new active sub ^^
@AMVWORLDYT
@AMVWORLDYT 3 жыл бұрын
Hey Daniel, can I ask you another question? I implemented this on a 2D Project URP, but the material is not shining as your video, I did the post processing as well but not shine. Any idea? Thanks a lot
@danielilett
@danielilett 3 жыл бұрын
You should be able to add Bloom to your post processing effect list to make the material shine. But you're saying this is in 2D? I'm not sure how that will effect things. What does your post processing setup look like?
@AMVWORLDYT
@AMVWORLDYT 3 жыл бұрын
@@danielilett same as your proyect Maybe I need to have a look to my light settings or check the post processing again No problem, thanks ❤
@salihcakmak1391
@salihcakmak1391 4 жыл бұрын
will not appear when the game starts. It will appear when I go to it. how can i do that please help
@ng1048
@ng1048 3 жыл бұрын
Can you share the shader? Huge thanks
@sunnykwan5630
@sunnykwan5630 Жыл бұрын
Another question: how to make the character not dissolve at the start?
@WaiHanLim
@WaiHanLim Жыл бұрын
how to disable the dissolve keep repeating? I just want to dissolve once then stop
@stylie473joker5
@stylie473joker5 11 ай бұрын
For some reason the object i add this shader to becomes invisible Edit: I had to change Position from world space to Object space for it to work due to How Urp has changed
@gctk24
@gctk24 3 жыл бұрын
I even cloned your project to find out what I did wrong. but for some reason the shader turns the Object invisible in scene. but is working in shadergraph and the material preview. any help ?
@gctk24
@gctk24 3 жыл бұрын
Found out what the problem was. I did not UV map my model
@tinytea3323
@tinytea3323 3 жыл бұрын
Sorry I tried using the lit shader graph with URP but there is no option to set the shader to opaque and alpha. I tried using transparent and alpha instead but the shadow does not seem to change with the noise. Any idea how to fix this?
@expresso8760
@expresso8760 3 жыл бұрын
did u find your answer ?
@SBRSR.
@SBRSR. 2 жыл бұрын
Hi Thanks for this Tutorial, Super cool. But I do not have PBR graph in my 2020 Unity version. Could you please help how to get that please.
@danielilett
@danielilett 2 жыл бұрын
Later versions renamed some things. The equivalent to PBR Graph is Lit Graph, which both URP and HDRP should have. The outputs of the graph will look a bit different, but ultimately everything in the tutorial should work pretty much the same!
@SBRSR.
@SBRSR. 2 жыл бұрын
@@danielilett Thank you so much Daniel. I appreciate your support.
@jonahblack2000
@jonahblack2000 2 жыл бұрын
Hey, how can I make the undisolved part be semi transparent? I guess that there has to be some part of the code where you can change how intense the undisolved parts are, but maybe I am mistaken. Thanks
@jonahblack2000
@jonahblack2000 2 жыл бұрын
Nevermind, I figured it out, you just multiply the output from the maps and then output that into the alpha
@jonahblack2000
@jonahblack2000 2 жыл бұрын
well that is actually not it yet, but better than nothing, as that will also make the edge emission transparent too
@jonahblack2000
@jonahblack2000 2 жыл бұрын
Ok.. figured out how to do it. It is a bit more complicated but not really: 1) After we've created both the "edge map" and the "main body map" we multiply those to get a "only/true edge map". 2) After that we multiply the "main body map" by a vector1 "_alpha" (min 0; max 1) which is editable. That will create a "see-through main body map" 3) After we have that we add the "true edge map" and the "see-through main body map", which will ensure that the edge is always visible, while the rest of the body will be see through. 4) At long last we put that output into the alpha node.
@toysinjammies1613
@toysinjammies1613 2 жыл бұрын
the new? shader graph only gives me the option to start a blank shader, not PBR. Is there a package I can download that has the other options?
@danielilett
@danielilett 2 жыл бұрын
The options changed after this tutorial was published! Now you should see a Universal Render Pipeline drop-down alongside the option for Blank Shader Graph. In that drop-down, pick 'Lit Shader Graph' - that's the new name for PBR Graph. Hope that helps!
@shirokatake3285
@shirokatake3285 4 жыл бұрын
The caveat of this is it doesn't work for multiple objects separately. How would you make it so we can change the "dissolve amount" for each assigned object differently?
@danielilett
@danielilett 4 жыл бұрын
If you want to use a different dissolve amount per object, you can either assign separate materials to each object and tweak their properties accordingly, or use a single material and change the values on each instance through scripting, something like this: var material = GetComponent().material; material.SetFloat("_CutoffHeight", height); where 'height' is some variable you change per object. Hope that helps!
@xXYannuschXx
@xXYannuschXx Жыл бұрын
@@danielilett Doesnt this need to be done using a MaterialPropertyBlock, or else it will also just edit the material for all instances using the same one?
@hotsauce7124
@hotsauce7124 3 жыл бұрын
Can this PBR shader be triggered in Timeline?
@danielilett
@danielilett 3 жыл бұрын
I think so. I've not used Timeline before so I don't know if you can directly change the properties of a material using it, but you can certainly change materials in an animation clip, then use that clip in Timeline!
@sunnykwan5630
@sunnykwan5630 Жыл бұрын
I want to add this dissolve effect to the enemy, how can I keep the base color of the material? The character is from other asset and the color is already set up. Right now, when I apply this shader to the original material of the character, my character becomes transparent. How to solve this? Thank you. ps: I using URP and the original shade is URP/Lit.
@sunnykwan5630
@sunnykwan5630 Жыл бұрын
OK. I figured out. For anyone with same problem. You need to add a texture 2d node and add your texture of original material. Then link to a "Sample texture 2d" and link to the base color.
@PauloHF18
@PauloHF18 3 жыл бұрын
I'm trying to do this on Shader Graph 10.2.2, but there's no 'PBR' anymore, the best I did was with 'Sprite Lit Shader Graph', but there's no Emission and Albedo Input. Someone know how to do it?
@danielilett
@danielilett 3 жыл бұрын
I'm super late, but on later versions of Shader Graph you can add new shader outputs directly to the Fragment stage by right-clicking. You'll probably want to start with a Lit Shader Graph rather than Sprite Lit - Albedo is now just called "Base Color", and you can add Emission yourself!
@PauloHF18
@PauloHF18 3 жыл бұрын
@@danielilett Finally it's working perfectly, thanks 🎉
@risingmermo
@risingmermo 2 жыл бұрын
@@PauloHF18 how did you get it to work? I did everything on shader graph but the material isn't even showing on the object
@PauloHF18
@PauloHF18 2 жыл бұрын
@@risingmermo I just did what Daniel said, I'm not the best person to help you, but in my case, what Daniel said to do, solved my problem.
@risingmermo
@risingmermo 2 жыл бұрын
@@PauloHF18 nvm, I managed to fix it.
@Vundeq
@Vundeq Жыл бұрын
i get a visible seam at the back of the sphere. how can i eliminate this?
@TheWolfProd
@TheWolfProd 9 ай бұрын
You need to deselect "Preserve Specular Lighting" in Graph Inspector.
@blackjackmack4709
@blackjackmack4709 3 жыл бұрын
I came here because of dani i hope your subscriber army sky rockets
@gameplay_factory
@gameplay_factory 2 жыл бұрын
Is this works for URP ?
@danielilett
@danielilett 2 жыл бұрын
Yep! This shader was designed specifically for URP, so it should work.
@StickyLabDev
@StickyLabDev 4 ай бұрын
the problem is , material have texture
@JuanPablodelaTorre
@JuanPablodelaTorre 3 жыл бұрын
This is witchcraft
Give Your Sprites Outlines in Unity Shader Graph
7:07
Daniel Ilett
Рет қаралды 40 М.
Dissolve effect in Shader Graph
19:23
PabloMakes
Рет қаралды 30 М.
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 12 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 2,6 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 12 МЛН
10 Shaders in 10 Minutes - Unity Shader Graph
9:38
Daniel Ilett
Рет қаралды 96 М.
DISSOLVE Effect using Shader Graph (Unity Tutorial)
11:08
Sasquatch B Studios
Рет қаралды 14 М.
Pokémon's Terastallize Effect in Shader Graph
12:28
Daniel Ilett
Рет қаралды 3,9 М.
Unity VFX Graph - Disintegrate and Dissolve Effect Tutorial
20:45
Gabriel Aguiar Prod.
Рет қаралды 50 М.
Holograms in Unity Shader Graph
4:17
Daniel Ilett
Рет қаралды 41 М.
How to Make a Dissolve Shader Unity (Updated 2023)
8:05
Rigor Mortis Tortoise
Рет қаралды 7 М.
Where Do I Start?
9:38
Foxid
Рет қаралды 2 М.
MGS Stealth Camo in Unity Shader Graph
5:07
Daniel Ilett
Рет қаралды 2,3 М.
Unity Shader Graph - Liquid Effect Tutorial
11:40
Gabriel Aguiar Prod.
Рет қаралды 108 М.
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 12 МЛН