01-19-2023, 06:11 AM
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
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