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