So I am working on creating a 3D modeling toolkit in javafx. In this toolkit people will be able to load in model files and try out animations on said models.
Currently I split up each model in groups of TriangleMesh objects, where each Mesh in the group uses the same material. Then I have an AnimationTimer that sequences frames of the loaded animation and for each next frame updates all changed points in each TriangleMesh. However performing frequent updates on the points lists is reducing the performance of the program considerably.
I am wondering whether this can be optimized?
I had some ideas, for one I thought it might help to have a single TriangleMesh for each model (though this is problematic because I cannot set the material of individual faces) but this still leaves me with the overhead of updating the observable points list so frequently.