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/performancetips/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
  Curvy Line Renderer for UI Spline? gekido 1 1 3 hours ago
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 3 hours ago
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: