I have this spline blueprint that instances a number of lantern meshes along the spline, and I would like for the whole thing to sway as if in the wind. Is there a way to do this? Using the simple grass wind was suggested, but it wasn't exactly what I was looking for as it only affected the lanterns and not the blueprint as a whole.
Replies
This is how this can work:
Your asset need to have some sort of a weight map that tells the material which area of the mesh moves, and which doesn't. Imagine a gradient that starts at the beginning of the spline as black, goes white towards the middle, and goes black again at the end of the spline. You can use a texture, UV channel, bounding box, or anything for this. Then, you can multiply that by some very low frequency noise and plug the whole thing into the world position offset. The noise coordinates also need to have time applied on it, so it pans the noise. The higher frequency noise you use, the more "waves" it will have. You will also need to multiply the whole thing by a vector, which tells the movement direction, and by a scalar, which tells how much to offset at maximum. Like using 100 would mean the fully moving area (middle) would move by 100 units. Hope this helps.
Doing this in the material isn't going to work as the lanterns and the rope are different materials, and they are instantiated along the spline. Is there a way to get this movement in the blueprint itself either through the construction script or the event graph? I have several of these splines with different numbers of lanterns and rope lengths, so using the world offset node in the materials isn't getting the swinging motion I want.
https://youtu.be/tjAEcof0RaI
I simply added the same thing to the lamp material too. The bounding box is the weight, this will work in your case too, as they are one actor. Its also used as the coordinates of the noise, but its made very big, so it distributes a very small area of the noise over the mesh, so it doesn't distort visibly. The transform at the end is used to make it working with rotated actor too (its made to be local y axis relative to the actor)
Okay So I added that graph to both the rope's material and the lantern's one, but the endpoints of the rope don't move, which is the part I've been having a hard time wrapping my head around figuring out.
It didn't work. Could it be because my spline is a child of the DefaultSceneRoot? Because I didn't find that checkbox on the spline itself, but it was on the root.
If that still won't do it, I'm sorry but yeah this isn't working with spline meshes. In that case, I'm not sure how you should approach this, because this is the standard way otherwise.
That still didn't work.
Okay I might be able to work with this as it is though. Thank you so much for all your help though! I really appreciate it!