Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimum configuration for frame-by-frame updates
#1
I'm currenly using this generator to create a spline along a series of joints that can be curved, stretched, and compressed, much like a spring/slinky. This is an interaction the player can do ingame very often and there will be roughly 10 of them activated/awaken at any given moment, simultaneously. From some early testing, I fear that we're not hit the performance targets we were hoping for.
Using the 51_InfiniteTrack sample, I made this generator. Also see example of the spring behaviour.
   

When I duplicate this spring x10, we're getting as low as 16 frames per second.
     

I then dropped the resolution on the Shape Extrusion module to 1, but it had little effect. Eventually I opened the profiler and noticed there is a big garbage collector allocation.    

I'm assuming I'm perhaps missing something why the pooling isn't working properly?
However, it also got me wondering if it might not be better to just deform a single mesh along a spline every frame, instead of extruding dynamically and creating a new mesh. Due to the UVs, the texture will probably stretch/compress, but I can manage that. I'm just wondering if something like this will help and is possible with a Generator?

Thanks
Reply
#2
Hi
Can you send me your reproduction case, so I can see consumes so much memory?
Thanks
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
I eventually spotted the issue. I must have added a zero to the Max Points Per Unit property by accident. However increasing this value does increase the GC allocation. Perhaps it's something that can be pooled... Attached a stripped down version of my project.
   
Cheers


Attached Files
.zip   CurvySplineTestProject.zip (Size: 155.46 KB / Downloads: 1)
Reply
#4
Hi

Thanks for the reproduction case. Pooling is indeed a solution to that issue. Such pooling is already implemented in Curvy Generators*, but not yet in the splines themselves. It is on my todo list. Is this limitations already problematic for your use case.

Have a nice day

*to answer your previous question: I don't believe using mesh deformation would be more performant than mesh extrusion, but rather the opposite.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
The limitation is not problematic at the moment. If I keep the Max Points Per Unit low, then the spline doesn't look as smooth as we want, and there is still a bit of garbage, but it's fine. Looking forward to the pooling update.

Will stick to the extrude approach then.

Cheers
Reply
#6
A fix for this is now available in version 8.5.0. Thanks for your patience.
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
  CurvyGenerator not refreshing until next frame when created. Lupos 2 7 06-08-2023, 12:12 PM
Last Post: _Aka_
  Frequent runtime updates of Curvy Generator for simulating plant growth using Splines h4ck3rd4wg 6 2,437 10-02-2020, 07:57 PM
Last Post: _Aka_
Information New free asset: Frame Rate Booster _Aka_ 0 3,257 08-30-2018, 03:41 PM
Last Post: _Aka_
  CurvySpline.Interpolate() returns (0,0,0) on first frame freqout 6 9,530 04-20-2018, 03:27 PM
Last Post: _Aka_

Forum Jump: