Correct way to update a dynamic spline mesh at Runtime

Hi there,

I’m trying to work out the best / most performant way of updating a spline mesh that’s being built at runtime, but I’m hitting some performance issues, likely down to clearing and rebuilding the array of spline mesh components.

I’m currently adding each spline mesh to an array of spline mesh components, then clearing the array and rebuilding it, this allows for the user to preview the mesh as they are moving their mouse around, but once splines get long it causes massive slow downs. Is there a better way I’m missing here?

Thanks!

Hi @Siqm8,

Your mention of dynamic spline performance reminds me of this thread.

It looks like there has been a regression in 5.1, so it may be worth trying to implement this system in 5.0, or Waiting until 5.1.1 or 5.2 (I’m unsure if this will be resolved in the hotfix)

I think the issue I’m having is that I’m not using the construction script to regenerate the spline mesh as its happening at runtime, therefor I’m having to remove all elements and rebuild them each frame. A solution I had was to set the rebuild event on a timer of say .1 so it doesn’t bog the engine too much, but it still has a large impact if you’re constantly clearing arrays!

1 Like