Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smoothly animate spline growth.
#1
Question 
I've spent quite a bit of time drawing dynamic splines using the API and I have to say that this is a wonderful set of functionality!

Now that I have some sophisticated spline arrangements slowly developing during gameplay, I am wondering what the best way to smoothly animate their growth.

Should I make an invisible spline, that gets built in the background during runtime, and then animate a visible spline based on it.

Or should I try to do this entirely on the material side?

I think the easiest thing to imagine is smooth vine/root growth, right now each time I generate a spot for a new CP the spline "pops in" to that spot. But I would like to have it transition into that spot over time instead.
Reply
#2
Hi
Glad to know that you like it.
Updating splines at runtime can be time consuming. First, do some profiling. If the performance impact is significant, then the best scenario is probably to build the spline once, and then use its cache (that you can get via the CurvySpline.GetApproximation method. Warning, every call will allocate an array of vectors) to gradually build the visible entity, either via materials/shaders, or via mesh modification. The graphics part is not my forte, so I can't advise you much on this part.
I hope this helped
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
The splines are quite simple, between 24 - 48 CPs each, and a 4CP cross-section. Haven't had runtime performance degradation yet on my devices.

The material on them is the more complex part. I guess interpolating a martial animation along the path is the best option? The main downside is that any tapers wouldn't be animated, they would just appear on ether end.
Reply
#4
About performance if needed: https://curvyeditor.com/documentation/pe...tips/start

If having a fixed mesh and making it appear gradually via a shader is not ideal, and if performance is not an issue, then maybe just use the Curvy Generator to extrude a mesh every frame. Use the Shape Extrusion module's Ranger parameter and the Scale parameter to shape the mesh.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Control of an object that uses a spline ricke 5 165 09-16-2021, 10:30 AM
Last Post: _Aka_
  Problems with spline prefab topquarkone 3 122 09-15-2021, 08:47 PM
Last Post: _Aka_
  Change to Random Spline on End Reached Event ricke 10 246 09-14-2021, 12:31 AM
Last Post: ricke
  Spline Controller Flickering blabz2007 6 256 09-03-2021, 09:29 AM
Last Post: _Aka_

Forum Jump: