I knew cloning a mesh from scene share the geometry and texture, which is memory friendly and cool. But when I clone more meshes with thousands of vertices, the memory still goes up rapidly.
From github, mesh.ts,
the clone function returns a new mesh,the constructor shows there is a bunch of deepcopy contents. which includes the material and geometry.
Heya, that third param to DeepCopy is the doNotCopyList, resulting in geometry and material not being copied for example. IDK about the overall memory issue thou…
Hi Blake!
Thank you for your reply. Oh you are right, that part is not deepcopied…
But I tested a mesh from a skined avatar with about 14k triangle and 5 textures(size 1024x1024) using mesh.copy() function. Which takes about 1.5MB memory and 7ms for loading time during the render loop. I wonder what else should be created and takes the memory if the geometry data is shared after cloning process. Because I want to create the avatar during the run time.
Hi carolhmj,
Thank you for your concern. I am using clones for playing some avatars different animations at the same time during the run time. But one clone function takes about 7ms which leads to a increase of the render time. In terms of performance, is there any way to speed up the cloning process?