I have a question- How do you create this Fresnel Edge in ShaderForge? I want to apply it to a texture that dissolves over-time similar to the image below. AFAIK, the Fresnel network will be different depending on whether its a texture or a mesh.
I think I may have figured it out actually (thanks to a small suggestion)!
Instead of using power (which is expensive) I used step. It gives a harder edge and does what I want it too. Input A seems to dictate how thick/thin the edges are. Also, the Smoothness Slider will affect the Edge. If you want it smoother, you need to adjust the Stepping as well. Cool!
The Slider is just there for testing. I use the Z channel from the UV Coordinates to make the effect work real-time with Custom Vertex Streams in Shuriken.
Oh, you figured it out while I was typing an answer But Iāve got some more relevant information for you:
From what I can tell the effect in your youtube link and these 4 purple ones on your reference images work differently.
The glow of the dissolve shader only works āwithinā textures, while the purple ones use a glow thatās probably created by a post-processing effect, also called screen shader or image effect.
I once saw this asset from the unity asset store which is said to enable per object glow - havenāt tried it by myself though. Unfortunately I donāt know how to create a post-processing effect which can do this kind of selective glow. So if thereās a shader genius stepping by who knows how to do this, Iād like to know too
However these glow effects have nothing to do with fresnel. The fresnel effect depends on the normal direction of a surface in relation to the camera position, which in case of e.g. a sphere leads to a gradient along the outline. On a flat surface a fresnel effect doesnāt work, thatās why in your case a dissolve shader should be the best way to go.
Yep! Thanks for the info. Fresnel was what came to mind when talking about edge lighting/coloring.
Yea Itād be nice to know if thereās another method (more efficient) since this is for a mobile application. There are certain operations that are more expensive (i.e. use step instead of power) and instruction count is very important.
Not a shader genius at all, but selective postprocessing might have something to do with the stencil buffer. You can set a different stencil value for different objects and then apply different effects based on the stencil buffer value. Iāve seen it done that way in Unreal and Iāve used the stencil buffer in Unity before but not for that, so I canāt tell for sure.
Summoned! On the hand mesh thereās an outline shader, on the rest of the parts its nothing as fancy, 2 textures/meshes stacked atop of eachother with one being black and the other pink, the black ones have slightly less Start Alpha. Also some render offset on the pink part so itās under the black. And Itās all alpha erosion.
Cheers!
Iāve never quite understood precisely what people are talking about with Fresnel. Thereās a whole suite of equations for how light is reflected and refracted and I donāt think the Unreal node is perfectly faithful? (could be totally wrong.)
Iām pretty sure itās grossly simplified but i haveneāt cracked open the node to see. And maybe i donāt need to.
Any time someone says āfresnelā i just assume they mean edge glow.
So, Fresnel equations describe how much light would be reflected under a certain angle between two different volumes?
I always use it as a dot between camera angle and vertex normal.
Not just edge glow, but the fact that the value depends on the angle between the surface and the viewer. If the Unreal node is simplified itās probably for performance reasons, but the resulting effect is similar.
Can you share how your initial texture was made? Your Alpha Erosion effect looks so nice. I can guess that there are gradients from black to white, but how you actually made it? Draw by hand or generated in photoshop?
Itās a hand-painted texture in the alpha channel.
You can use a combination of Gaussian blur, smudge tool and brushes to create small pockets in the texture. If you create small dots the texture will open up from that point like a hole. The more small details you create, the more complex itāll erode. Smudging can create small ramps too.
Hereās an example of the alpha texture.
The Diffuse is white. You can make it detailed if you want additional noise.