# How to create an Inner Glow node effect

The Inner Glow effect is a filter that allows to soften the edge while keeping a clear line of the main silhouette at his center. It is heavily used by Blizzard and many other stylized studios to project decorations and text to an high poly sculpture with a stylized crack look like if a dagger was used to sculpt it. Michael Vicente has made a tutorial about this technique in a PDF: https://www.pearltrees.com/s/file/preview/139604217/OrbBevelTIP.pdf or in a video: https://youtu.be/eGHU8DI6fo4?t=5183

I try to achieve this:

It is important that we get only thin lines and not holes in more complex and wider areas. If we look at the displacement horizontally it should look like a V with a thin tipping point.

And here is what he gets by projecting it, as you can see there is just a think line at the center and the depth is flat:

The final result after using the Polish modifier of ZBrush:

The source image for your tests:

With the Inner Glow effect:

• Why can't you do it in photoshop, and then import the inner glow image to blender – 10 Replies Nov 20 '16 at 18:00
• I try to make my entire workflow inside Blender or at least in free software. Subscribing to Adobe just for one filter that I will use occasionally isn't worth it. – Danyl Bekhoucha Oct 28 '18 at 10:30

# Use the Erode Node

A simple Dilate/Erode node in Threshold mode with "Distance" set to the same value as "Edge" does exactly the right thing.

With the math node "Power" afterwards the result matches the image from the tutorial perfectly.

The Threshold mode of the Dilate/Erode node has a linear falloff. Here is a proof: In the viewer-result you see the texture above and the output of the erode node below.

## Congruence of the results

Here is a proof that the result of photoshop's inner glow effect is the same as the result of my proposed node graph above. The differences still visible are caused by different image formats and scaling blurriness.

• Thank you for your answer. Is there an easier way than using the RGB Curve? – Danyl Bekhoucha Oct 30 '18 at 14:03
• I think the yellowish colors are from the YouTube compression, I have updated the images from a PDF. – Danyl Bekhoucha Nov 1 '18 at 11:19
• Thank you for accepting the answer. I changed the node graph, so that the power node replaces the RGB node and the yellowish tint is removed. – quiliup Nov 4 '18 at 12:06

Use a Dilate/Erode Node to set the edges inward. Then just blur the image:

• Hi cegaton, you have the correct answer, just seeing it. The photoshop inner glow produces the same streaks on the source image as the Dilate/Erode node - it is a problem with source image jagged edges. So imho the blurring is not necessary on good source. When the Dilate/Erode is set to Linear fallof, it is exactly what is needed. – Jaroslav Jerryno Novotny Mar 27 '17 at 16:47
• Hi, thank you for your answer but as you can see in the reference the black values must only be used for thin likes. It must be projected like if it was a stylized crack cut with a dagger. – Danyl Bekhoucha Oct 28 '18 at 10:24
• Using the Dilate/Erode node is right but blurring will not keep the edges that sharp for displacement. – quiliup Oct 29 '18 at 20:21

This isn't the most elegant solution but I believe it gets the right result; combine the output from multiple Erode nodes to pare down the original image to successive layers and average them all together. This produces a (stepped) linear fall-off - the smaller the erode 'Step' at each stage, the more accurate the result but the more layers need to be generated. The 'stepped' result can be 'Blurred' at the final stage to remove the discrete steps.

The compositor nodes are as follows :

Continue the chain up to the required number of levels to handle the thickest part of the original image.

Note the Divide - set to the number of times the image/mask is combined (in this case 19), to produce the average. The whole node tree is as follows :

This produces the following result (negated (see Subtract node) and with Color Management disabled to make it clearer) :

Blend file included

• Your solution is like my first attempt: combining erode nodes with math. Later I realized that the Threshold mode of the erode mode gives exactly the same result... – quiliup Oct 29 '18 at 20:04
• Here is an image of the mathematical stacking I tried. Fortunately the solution can be compressed to only a few nodes. – quiliup Oct 29 '18 at 20:25
• ouh, yes you are right: removing it is not a good way. Yes, The Threshold mode uses a linear falloff. I'll put a proof in my post. – quiliup Oct 29 '18 at 21:59