Dissolve Effect in Unity Shader Graph

preview_player
Показать описание

💻 Get the source on GitHub:
--------------
------------

#unity #dissolve #shader-graph
Рекомендации по теме
Комментарии
Автор

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).

MarcWithaC-BlenderAndGameDev
Автор

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!!

mikemiller
Автор

For anyone that wants to prevent the Emission Color and Base Color from being blended, use the output of the Step node, invert the colors through a Invert Colors node, multiply the output with a Color and use that as the Base Color. This way there will be no overlap between the Emission and Base Color.

For anyone that wants to use Object space instead of World Space, change the space in the Position node to Object. Personally, I wanted a slider that goes between 0 and 1 to represent the process/interpolation of dissolving. To do this, I changed Cutoff Height to such a slider. The problem here though is that the Height in Object space doesn't go from 0 to 1 for all meshes. To fix this, instead of adding Cutoff Height at 2:12, connect Cutoff Height to a Remap node and set "In Min Max" to 0 and 1. For "Out Min Max, " add a Vector2 which will represent the Lower and Upper bounds for the Mesh. These will unfortunately have to be put in manually. Good Default values would be -1.1 for Lower and 1.1 for Upper. It's possible to use a "Object" node to automatically set Lower and Upper bounds, but it will also break shadows, so I don't recommend it.

WideWalkinMenace
Автор

Thank you, straight to the point, everything works even on complicated geometry

camelmotion
Автор

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

kang
Автор

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.

NickM-dwzc
Автор

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😁👍

kickcreator_dev
Автор

Doesn't work in HDRP. Can't seem to get the outline colour to pop up. It dissolves without any outline or edge colour.

ramkillnani
Автор

Short and on point. Would be nice to have an updated version for this for the new unity versions/shader graphs/

someonesomewhere
Автор

If you have trouble with transparency, the alpha clip also get set to .5 from 0.

mksuprafy
Автор

Just found you and immediately subscribed. Excellent tutorial. Thanks

archmagesalamar
Автор

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

Coolkidstan
Автор

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.

Kalahee
Автор

Hi Daniel, is there any way to rotate the shader? if i rotate the object, the shader continue applying the effect in vertical

AMVWORLDYT
Автор

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 ?

gctk
Автор

how to disable the dissolve keep repeating? I just want to dissolve once then stop

WaiHanLim
Автор

I followed this to a tee a few times here, Marc's comments were helpful for sure, but for whatever reason it is still not actually working. If it is an animated shader, shouldn't there be a time or loop function? It is a really cool emission but I would like the dissolve to work. Doing a Unity Learn tutorial, and their Example Dissolve shader graph is considerably more busy, including a timing group and an object texture group.

jasonglynn
Автор

i get a visible seam at the back of the sphere. how can i eliminate this?

Vundeq
Автор

wow good video i found out late! keep it up!

xcrimson
Автор

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