I'm a computer programmer, and I'm reaching out to help you fix a really easy and important problem in VAM.
The 800MB per-character instance memory consumption problem. It's not textures, it's morph data, and it's trivial to fix.
After fixing in my own DAZ/Unity project, character instances take < 80MB of memory each.
Let me first explain why the problem occurs.. Unity blend shapes are always for the "full mesh", because Unity has no "partial blend shape" support. Which means a DAZ morph that moves 100 verticies in the nose, gets expanded to a morph for all ~20k vertices in the mesh. This makes 70MB of DAZ morph data bloat into 800MB of unity blend shape data. Also, Unity doesn't have a way to share blend-shapes across multiple loaded mesh instances. Each one gets its own copy of the blendshape data. (Thus the 800MB per-instance, instead of per-gender) Not only that, but using Unity's morph system for this causes it to recompute all active morphs for the character every frame, which is a huge waste of CPU/GPU time, and the 800MB is a huge bloat that Unity puts in GPU ram for GPU morph computation.
It took me several days to find this problem, but only four hours and only about 60 lines of code to fix it. All I did was stop using Unity blend-shapes for DAZ character morphs. Instead I extracted the DAZ moprhs into my own "partial morph dataset" onto a "per gender morph proxy", and then wrote my own morph application code (which is tiny). The code re-generates a unique per-instance character mesh for each character-instance when that character's morph state changes. This way, each instance only takes the size of the post-generated mesh, which is quite small. The DAZ morph data is also only stored once (per gender), no matter how many character instances there are.
I'm happy to point you to my example code, or talk about this further to explain.
The 800MB per-character instance memory consumption problem. It's not textures, it's morph data, and it's trivial to fix.
After fixing in my own DAZ/Unity project, character instances take < 80MB of memory each.
Let me first explain why the problem occurs.. Unity blend shapes are always for the "full mesh", because Unity has no "partial blend shape" support. Which means a DAZ morph that moves 100 verticies in the nose, gets expanded to a morph for all ~20k vertices in the mesh. This makes 70MB of DAZ morph data bloat into 800MB of unity blend shape data. Also, Unity doesn't have a way to share blend-shapes across multiple loaded mesh instances. Each one gets its own copy of the blendshape data. (Thus the 800MB per-instance, instead of per-gender) Not only that, but using Unity's morph system for this causes it to recompute all active morphs for the character every frame, which is a huge waste of CPU/GPU time, and the 800MB is a huge bloat that Unity puts in GPU ram for GPU morph computation.
It took me several days to find this problem, but only four hours and only about 60 lines of code to fix it. All I did was stop using Unity blend-shapes for DAZ character morphs. Instead I extracted the DAZ moprhs into my own "partial morph dataset" onto a "per gender morph proxy", and then wrote my own morph application code (which is tiny). The code re-generates a unique per-instance character mesh for each character-instance when that character's morph state changes. This way, each instance only takes the size of the post-generated mesh, which is quite small. The DAZ morph data is also only stored once (per gender), no matter how many character instances there are.
I'm happy to point you to my example code, or talk about this further to explain.
Last edited: