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
  Nested Spline Volume Spot Instantiation merobbins5 3 7 07-26-2024, 09:58 AM
Last Post: _Aka_
  Left-right movement, and spline follow shihaya 3 9 07-12-2024, 12:50 PM
Last Post: _Aka_
  How to start volume spots at the end of spline instead of front j95677 1 5 07-07-2024, 04:58 AM
Last Post: _Aka_
  How to get length starting from one spline to connected nth spline Dragon-3623 1 4 05-14-2024, 04:52 PM
Last Post: _Aka_

Forum Jump: