Download

Curved LED tube static mesh, how to make it turn on left to right with an emissive glow?

Hi everyone

I’m curious how to create a ‘turn on’ effect for a static mesh curved tube where it lights up from left to right when turned on, and reverses when turned off. I have found a few tutorials that describe how to create a similar material like https://www.youtube.com/watch?v=cq6f…ature=youtu.be however, I haven’t been able to make it work because of the unusual shape of the static mesh. I’m relatively new to working with material nodes so any help is appreciated.

Let me know if I asked the question in a dumb way and I can perhaps clarify, I don’t know the domain enough to really know what to ask for specifically.

Thanks

You could do it in UV space if your UVs are laid out horizontally left to right/right to left, which is what the video is covering. If not, you could do it in object space in a similar method by using the ObjectBounds node and masking it by the R(vertical) or G(horizontal) channel. If you need to flip it, use the 1- node

Thanks for the reply. I tried using ObjectBounds node instead of the TexCoord node but was not able to get the effect to work. With this switch, I was still not able to make it work - it would toggle between making the static mesh totally visible and emissive and completely masked when going over 26 points in the scalar parameter…

Oops, sorry, it’s a BoundingBoxBased_0-1_UVW function node. Weird name, I know. You would pick the R, G, or B channel depending on the direction you wanted.

After actually setting this up I realize this probably won’t be what you want though, unless the curve isn’t that strong. Otherwise it’ll be obvious that this isn’t following the shape. For that, you’d want to do this through the UVs and make sure it’s laid out evenly in a rectangle. Unless there’s something else I’m not thinking of that someone can add

Thanks that worked, here’s the final ‘loading material’. I use a timeline that goes from 0-1 over a certain amount of time and updates the ‘Progress’ parameter.