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
  Spline Shape not centering around Spline Path tfunitydev 3 104 25 minutes ago
Last Post: _Aka_
  Get position on spline relative to world position Mos Def 5 75 05-10-2021, 07:35 PM
Last Post: _Aka_
  Circle shape spline normals are not straight ? VincentAalbertsberg 8 264 05-07-2021, 07:32 AM
Last Post: VincentAalbertsberg
  Create spline at run time AnAppGames 2 168 04-20-2021, 07:14 PM
Last Post: _Aka_

Forum Jump: