I have a spline that dynamically creates instanced meshes along its path. Everything works perfectly in terms of creating the instances, but I want each instanced mesh to have a different color. I’m trying to achieve this in my material using a Per Instance Custom Data, but my Blueprint can’t seem to update the material — no matter what I do.
Below, I’m attaching some screenshots.
In the Details panel for the Instanced Static Mesh Component, under Instances, make sure you have set Num Custom Data Floats to the amount of custom data you’re using in the material. In this case set it to 1
@ClockworkOcean is correct, you’re using the foliage version. Instead create a regular Scalar Parameter (Hold S and Left Click)and check the Custom Primitive Data checkbox
Yes, when I did it separately, everything worked. But what I actually need is something more like a video — I want to simulate a pipe where hot gas flows through and gradually cools down. That’s why I want it to start in red and fade into blue.
You’re right — what I want to do is a fade along the entire pipe, between two colors that I’ll set later. It could be from red to blue, or green to yellow, either one. What I was trying to show with the video is the type of BP_Pipe I’m using.
But it won’t work the moment you rotate the object.
You can make it happen in world space, independent of the object position and orientation, but its a bit more fiddly. This will work for object movement
Well, I used the video you’ve showed which doesn’t use an Instanced Static Mesh, so I’m not sure if it will work for you. If I find a solution for Instanced Mesh, I’ll publish it.