Download

Spline Mesh Components - Are they Instanced?

It’s possible that I’m completely misunderstanding the USplineMeshComponent, but I want to be able to specify a single mesh (basically a tube), and plot 512 points in an ellipse shape.

I was under the impression that the SplineMeshComponent duplicated a mesh across each point of the spline, allowing for instancing and fast rendering. By the looks of it, it absolutely doesn’t work that way. it seems like you need a USplineComponent to begin with, then you create a new USplineMeshComponent for every point on that initial spline. That seems not only insanely wasteful, but since USplineMeshComponent looks like it’s just a Static Mesh Component, but it’ll also be a LOT of draw calls!

Seems like the SplineMeshComponent isn’t really designed for anything realtime, but I’m kind of surprised by that. Is there anyway I can just loft a mesh around a bunch of points? I can’t have 512 new draw-calls for a mobile title, so I feel like creating a procedural mesh is the only real way to achieve this.

Unfortunately Spline Mesh Components are not instanced, there are a few feature request for that, e.g. HERE.

We can use experimental Actor Merge tool to merge all the spline meshes to one static mesh (but for now it’s bugged) - but obviously it won’t be a good solution if spline mesh components are generated dynamically in-game, as Merge Actors is an in-editor tool.