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).
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😁👍
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.
For anyone who doesnt have emission outline(i got it in HDRP) You gotta add Emission Node by yourself, connect Multiply Out to Emission Node (Color and Intensity), then the output connect to Emission property in Fragment section
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!
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.
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.
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
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?
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
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 ^^'
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.
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.
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 UA-cam.
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 ?
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 .
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
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!
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?
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!
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.
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.
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?
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!
@@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?
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
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.
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!
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?
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!
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).
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.
Please pin Marc's comment @@danielilett
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!!
I really hope this channel blows up!
It appears that it has!
Thank you, straight to the point, everything works even on complicated geometry
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😁👍
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.
For anyone who doesnt have emission outline(i got it in HDRP)
You gotta add Emission Node by yourself, connect Multiply Out to Emission Node (Color and Intensity), then the output connect to Emission property in Fragment section
Short and informative. Great job!
Just found you and immediately subscribed. Excellent tutorial. Thanks
This was super helpful, thank you!
Short and on point. Would be nice to have an updated version for this for the new unity versions/shader graphs/
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!
Doesn't work in HDRP. Can't seem to get the outline colour to pop up. It dissolves without any outline or edge colour.
If you have trouble with transparency, the alpha clip also get set to .5 from 0.
wow good video i found out late! keep it up!
thanks dude!! useful lesson
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.
Im getting the same issue too, how did u add your customizable direction?
Hi Daniel, is there any way to rotate the shader? if i rotate the object, the shader continue applying the effect in vertical
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.
@@danielilett We got it!! thanks man, works really good, you have new active sub ^^
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
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?
@@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 ❤
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
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
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 ^^'
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.
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.
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 UA-cam.
Another question: how to make the character not dissolve at the start?
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 ?
Found out what the problem was. I did not UV map my model
the problem is , material have texture
how to disable the dissolve keep repeating? I just want to dissolve once then stop
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?
I came here because of dani i hope your subscriber army sky rockets
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 .
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
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.
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!
@@danielilett Thank you so much Daniel. I appreciate your support.
will not appear when the game starts. It will appear when I go to it. how can i do that please help
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?
did u find your answer ?
i get a visible seam at the back of the sphere. how can i eliminate this?
You need to deselect "Preserve Specular Lighting" in Graph Inspector.
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?
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!
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.
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.
Can i add that in 3d text?
Can you share the shader? Huge thanks
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?
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!
@@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?
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
Nevermind, I figured it out, you just multiply the output from the maps and then output that into the alpha
well that is actually not it yet, but better than nothing, as that will also make the edge emission transparent too
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.
Can this PBR shader be triggered in Timeline?
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!
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?
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!
@@danielilett Finally it's working perfectly, thanks 🎉
@@PauloHF18 how did you get it to work? I did everything on shader graph but the material isn't even showing on the object
@@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.
@@PauloHF18 nvm, I managed to fix it.
Is this works for URP ?
Yep! This shader was designed specifically for URP, so it should work.
This is witchcraft