Reading/Getting the output from a light function in BP

So, I’m working on some prototypes for a universal light flicker BP that I can use for any fires, torches or candles.

The actual light flicker I like best comes from a light function material attached to a point light, however, I also want to change other aspects of the light component at runtime.

E.g. I want the light temperature to slightly go up or down based on the change in light intensity, I want the light to “dance” up and down a bit based on the flicker, and I want the radius to grow or shrink.

I could replicate some kind of flicker in BP that aims to mimic to the light function, but that would basically do the same thing twice.

So the question is:
Is there any way to read/get the output from a light function and pipe it into a blueprint functions?
Or is there a way to get some sort of custom variable output from a light function to drive blueprint logic?

Hey! I’m so sorry I can’t help with this… but I’m reaching out about the rope system post you made. I’m trying to recreate it in 3D, but am having trouble with the “Get Spline Mesh Extents” and “Get Static Mesh to Use” functions. I found your comment explaining it on a Youtube video, and that helped point me in the right direction, but I can’t seem to get the box extents from the rope. I’m not sure what I’m missing. If you still have the project, is there any way You could send screenshots of those pure functions?

I’m also working through the character BP side of it and would find it helpful to see the list of variables you had saved to the character vs in the set up and physics structs.

The system is really well designed, and is a great example of how to structure blueprints. I can’t thank you enough for the time you spent sharing it on these forums.

Heya…

been a while since I actually had time to work on this project (the Project that pays the bill is taking priority…), but I’ll try to answer the best I can.

So, basically, both functions deal with the custom meshes I use for my project, so simply copying what I did is likely gonna lead to more problems than answers…

But I can run you through, so you can adapt:

The first function (get extents) boils down to a “Get Bounds” node, using the static mesh as input.
Then I break the struct and return the box extents.
This is what tells the rest of the system how big the mesh is, so it can calculate how many segments will be added to the spline mesh component.

However, first it needs to know WHAT the input mesh is, and this is where it becomes very specific to your project and the assets you use.

If you only have one mesh for the rope, and no difference between the start/top, the middle and the end/bottom, then all you need is to use the “get bounds” node to grab the extents, set the rope mesh specifically and skip everything else in those two functions.

For my system, however, I have both a rope and a chain.
The rope is the same on each part, but the chain has a unique start, middle and end piece, and both rope and chain are of a different size.

So the first part of the “get extents” reads which material has been set in the BP (rope or chain), then sets that as the reference mesh from which to get the “get bounds”.

The second function deals with the start/middle/end, and is just a series of branches.
It takes in the index of the last element in the rope length, and the current index in the loop from which the function is called.
Then it checks:
is the current index 0, then use the “start” mesh
is the current index same as last index, then use the “end” mesh
anything else, use the middle mesh

That’s all there is to it