d4rkc0d3r / d4rkAvatarOptimizer

d4rkpl4y3r's VRChat Avatar 3.0 optimizer
MIT License
368 stars 16 forks source link

Some Skinned meshes should not be merged #84

Closed AngriestSCV closed 6 months ago

AngriestSCV commented 6 months ago

While testing your optimizer, skinned mesh merging I've found that it is incompatible with one of my tools. This tool bakes blend shapes into textures to use in the shader. I would still like to use your avatar optimizer it as I have skinned meshes that should be merged.

The issue almost certainly due to vertex numbering changes as my tool is sensitive to that.

If there was a way to exclude a mesh from the merging it would allow it to work unmodified.

Other options could include ordering some verticies as they were pre-optimization or providing a callback to re-bake the textures after merging, but the exclusion approach seems by far the simplest.

d4rkc0d3r commented 6 months ago

Yes, anything that relies on SV_VertexID to stay the same needs to be put into the exclusion list.

If there was a way to exclude a mesh from the merging it would allow it to work unmodified.

Thats literally what the Exclusion foldout is for? It stops the optimizer from touching anything thats in there.

AngriestSCV commented 6 months ago

I completely missed that. That feature fully satisfies my request. Sorry for the erroneous issue.