05-27-2024, 08:14 AM
Hi,
I would like you to give me more information to dive deeper into your use case. Can you send me a reproduction case, or at least the profiling data?
I suspect (but I can't be sure without what I asked above) that most the CPU load is from the actual mesh deformation. In other words, I suspect that mesh placement and mesh "creation" (I used quotes because at runtime, the meshes are pooled and not recreated) don't take that much CPU time compared to the mesh deformation.
If my suspicion is correct, that would mean that the solution to your problem can be:
I hope this helped.
Have a nice day.
I would like you to give me more information to dive deeper into your use case. Can you send me a reproduction case, or at least the profiling data?
I suspect (but I can't be sure without what I asked above) that most the CPU load is from the actual mesh deformation. In other words, I suspect that mesh placement and mesh "creation" (I used quotes because at runtime, the meshes are pooled and not recreated) don't take that much CPU time compared to the mesh deformation.
If my suspicion is correct, that would mean that the solution to your problem can be:
- Optimizing the mesh deformation code: I don't see any obvious significant optimization that can be done without a radically different implementation (more about this bellow). The mesh deformation is already multi-threaded, and the deformation code is quite optimized. Surely there is always room for improvement, but I don't think we can get that much improvement.
- Using simpler mesh: Less vertices => less time deforming meshes.
- Allow mesh deformation only x times per second. You can do this by disabling the Auto Update setting of the generator, and refreshing it via API only at some specific frames if it is marked as dirty.
- A radically different implementation: If the deformed mesh is used only for display (no physics, no gameplay logic), then a solution would be to do the deformation GPU side, using shaders. Shaders are perfect to apply the same operation (in this case deformation) on a multitude of mesh data.
Currently, I do not plan to implement GPU-side deformation. However, if you are interested in this feature, it may be possible to include it as part of a contract work arrangement.
I hope this helped.
Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Please consider leaving a review for Curvy, this helps immensely. Thank you.

