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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Filling a closed spline dynamically rickgplus 1 119 04-16-2025, 08:56 AM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 217 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 801 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 376 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: