I am attempting to simulate neon inside a glass tube (a real neon light and not those florescent ones), and am having difficulty making the innermost portion of gas look brighter than the outermost portion. This is real neon. You can see that near the sides of the tube, the light is dimmer. That is not an illusion caused by glare, although the glare amplifies it. I have seen it up close, though, and inside the tube it does fade toward the edge.
…and this is what I have (yes it’s too dim, but I want it on low power for now). The neon is just plain Jane emission volumetric, and it of course does not fade near the side of the tube like real neon does: the edge is hard, as if I stuffed the tube with glowing paint instead of gas. There is a bit of fading, but that’s done with compositing via glare, and isn’t realistic enough for me.
The structure of this is two identical curves, both beveled, one larger than the other, and that larger one has a solidify modifier on it: A properly walled glass pipe is around a solid tube of neon, with some margin in between (that vacuum margin is not there in real life, but the neon probably won’t glow there anyway).
I have decided that if I can compare the incoming camera ray to the normal of the neon "gas" tube (not the glass), I can use that to control the emission strength: The greater the difference/angle between them, the dimmer the neon should be. This may not work on the flipside of the neon as the ray exits...
This solution probably comes down to a dot product, but there may be other solutions. Leave your suggestions in the comments! :-)
arccos( (a \dot b) / (||a|| ||b||) )
, based on solving the geometric defn of the dot product (en.wikipedia.org/wiki/Dot_product#Geometric_definition) for the angle between the two vectors? $\endgroup$