Populating lights along a spline

Hey everyone,

I am currently trying to create a spline blueprint to drag out a chain of lights. Here is my mesh in use, with a blueprint I’ve created after a tutorial:

r/unrealengine - Populating lights long a spline

r/unrealengine - Populating lights long a spline

So far it works as intended, but it’s only a mesh without emitting light sources.

Here is a screenshot of the construction script of my blueprint:

r/unrealengine - Populating lights long a spline

Please note that I’m a complete noob working with blueprints, so to be honest, I maybe understand half of what I did there. I just followed a tutorial.

Now I want to add actual point lights along the same spline, ideally at the exact positions where a light bulb in the mesh is.

I really have no idea how to do that, so I would appreciate if someone here could tell me how to approach this. Please ELI5, because, as I said, I’m a complete noob regarding blueprints in Unreal.

also I want to add: please don’t worry about performance too much here. I know having so many lights isn’t the best thing to do, but It’s only second priority in this case. However at a later point I want to make it switchable in the blueprint, so you have the option to either enable the lights or just use the emissive material.

Thanks a lot in advance

You could use a socket for it.

  1. Add a socket to your Static Mesh asset and set the desired location.

  1. Get the socket in every spline mesh component and place the light source in its location.

I hope it’ll be helpful.

My Products

2 Likes

Thanks a lot!
I think we’re on the right way. I have one more questions though: I’ve added 3 sockets for testing, “LightSourceLocation”, “LightSourceLocation1” & “LightSourceLocation2”

Here’s how I integrated them into the blueprint:


When I add the spline to the scene, so far so good.
But, when I drag out the spline, the lights will remain in their position and also won’t deform or duplicate with each mesh segment:

what do I need to change here?

Hey did you get a solution for this? I’m trying to do something similar.

Light Spline Construction Script

Here you just need to get the location at distance along spline and plug that into the relative transform of the point light component. I’m using spot light and I added location and rotation offsets as variables.