Download

Linking Material Sine Animation to BP Light?

Hey all,

I feel like there has to be a way to do this, but I can’t quite figure it out. I have a sine animation in my material to animate an emissive fading on and off (Screenshot attached). I’ve also got a blueprint actor with the 3D model of my traffic light and a point light (screenshot attached). I’d like to animate the intensity of the point light to emit at the same frequency as my material animation. Is there a way to pull the frequency from my material (or material instance) and use that to set the intensity of my light? Currently, I’m just using a simple timeline to animate the intensity of the light, but that seems rather basic and I’d like to just link it to the material so if I change the frequency in the material, the light updates automatically. Thoughts?

There is no way to pull anything from the material. you have to recreate the functions in C++ to get the same timing on the CPU that can thereafter be used in just about anything.
You can do the same in BP probably.

Any thoughts on how to get started with that? I’m comfortable with BP, not with C++

Do the exact same thing in BP with nodes.
Time is Game Time.
if you didn’t offset it or mess with it it’s just that.
Sine is a sine that’s probably remapped (fed into a clamp remapped).
Constant bias scale is basically and addition and a multiplication - depending on how you set the node - you are using it to block or expand the range of the sine. So you can probably just set it within the clamp remapped sine function.