Feedback wanted on cyclic glow material

25 February 2016 06:14 #7714
I've created a material that uses a texture of the color spectrum to push a glow around a torus cyclically.

View the HTML file

I thought this could be useful for creating animated electronics, panels, interfaces, and that sort of thing, without needing to rely on animated textures. I suppose it could be used for effects such as lightning or plasma as well.

One drawback is that my material relies on the Hue/Saturation node to do this, and that node is mentioned as having poor performance when animated. Performance seems acceptable on this one object I have now, but I have not tested it out in a large scene and I worry that it may use too much processing power to be practical.

One other issue I have observed is that the animation does not move at a steady constant pace. This may not be a problem for some types of objects, but it really depends on what is being textured, I think. I still don't know if this is because I need to prepare my color spectrum texture differently, or because of performance limitations of the Hue/Saturation node.

Here is the .blend file. Any feedback or suggestions for improving performance are welcome. Thanks.
25 February 2016 12:28 #7723
Is it the effect you're trying to achieve? This setup is way faster and optimized, also it will work for every object, depending on its form. It uses some vector math.


3D Generalist, contests administrator,
Blend4Web team.
art blog:
25 February 2016 13:43 #7726
Thank you, Pavel! This looks great! Exactly the effect I was going for.

How do you control it? In mine I used a color gradient to specify the direction of the flow, but yours doesn't use any textures. Is there a way to use a texture gradient to direct it (like a normal map - since you said it uses vector math)?

25 February 2016 14:37 #7728
I don't know how exactly it works, but there is this formula involved. I tried to replicate it using Math nodes and it worked

In other words I'm just firing vectors in needed directions. They are RGB (kind of), too, so you can separate their channels and use them as masks. Red will be X, Green will be Y and Blue will be Z. And every coordinate system (UV, Normal, Global, etc.) uses those vectors differently. You can achieve so many things using only Vector outputs and some math

All that math just replaces "Z Rotation" parameter of node Vector -> Mapping. And Smoothstep node in the end of the group helps to control how wide and smooth the mask will be. Since we are using only Glow settings, I just left only one parameter to be adjustable.
3D Generalist, contests administrator,
Blend4Web team.
art blog:
25 February 2016 15:56 #7732
That's awesome, haha! "Just firing vectors in needed directions"…

I appreciate you explaining more about your technique. I'll probably have more questions as I experiment with this. For now I'll just say - thank you!
25 February 2016 16:32 #7734
Oh, you're welcome!

Yes, feel free to ask, I like playing with vectors.

You may be interested in this thread, too :)
3D Generalist, contests administrator,
Blend4Web team.
art blog:
Please register or log in to leave a reply.