I skimmed a tweet (I think it was a tweet?) from @tupper that mentioned how Blendshapes were computationally expensive and that they probably shouldn’t be used to hide geometry. I tried to go back to find that topic but I couldn’t so I figured I’d ask for more information here where posts are a lot less transient:
As I see it, there are three ways (Are there more?)
Blendshapes that deform the geometry such that it is hidden inside the model.
Separate Meshes that can be enabled or disabled through animations.
Material swaps that remove textures from the geometry that make it transparent.
What are the recommended methods for ‘hiding’ geometry for things like clothing pieces, jewelry and accessories?
I think maybe it was this post on here that I saw rather than on Twitter? (Would explain why I couldn’t find it!)
So maybe I just answered my own question - I suppose it would depend on how vertex-heavy the in-question geometry was. That’s still a little vague but maybe a good rule of thumb would be something like, 'It the thing you want to Blendshape out of existence has more verts than your actual avatar, maybe split that out."
Another random thought: If you did break out multiple clothing pieces but they all used the same material (Atlas texture), would that save on overall texture memory even though each mesh would need its own material renderer?
Overall, enabling/disabling renderers would probably be the best way to handle this. Since you will only have a few renderers enabled at once (one outfit), the others will just be skipped reasonably efficiently. This technique also has a fairly predictable computational cost.
The other techniques still result in geometry that must be processed by the video card at least per vertex. Transparent material swaps won’t work on Quest at all.
Another random thought
You can have different mesh renderers, and even different materials. As long as they all reference the same instance of a texture, it won’t be duplicated in VRAM.
This is correct! Even though the performance system (necessarily) counts disabled meshes, in the end, turning off a mesh is way more performant than using a blendshape to shrink it.
Blendshapes are applied during the GPU’s skinning call, so something that’s shrunk down is still rendered with all the costs that come with it, with the additional cost that’s brought along with the skinning itself.
This is one of the bigger failures of the performance system. As it stands today, there’s not really a great way around it-- you kinda just have to accept the potential Perf Rank downgrade that comes with using disabled meshes.
I just had possibly the silliest idea, it’s in two parts.
One: allow VRChat users to opt in to send avatar stats to VRChat. I see your avatar and my client sends all the performance value, including constraints. If there are disagreement in values, VRChat can use some computer time to determine the correct answer and react accordingly.
Two: for showing very poor avatar or not, let users route this to a program as a RPC, aka a local http request, either get the numbers from VRChat, or load the avatar and get the numbers and if the RPC program says no, unload it. Users can then evaluate the numbers as desired using whatever language they want.
Do you do more poly? or blend shapes? more meshes? but incur more materials?
Poly being the least intensive (compounds the blenshape issue).
But to answer your question I personally use Poiyomi shader (free version can do what am about to say)
Use the UV title discard dissolve option. In blender make a separate uvmap. this will be your row discard. turn on titles to 4by4
now move the mesh uv islands of the parts you want in any of these section titles. and in unity and with poiyomi if you only have 2 uvmaps. select uvmap 1 (not zero) you will have sliders in this that will now hide that mesh should you dissolve it.
Uv title discard actually removes that mesh from rendering too so until someone’s GPU ram fills up. it will still be discarded in trash collection when needed.
I think however. so basically I can have the least amount of mesh and least amount of materials this way
I try and avoid having as many materials as i can as they still impact draw calls (thus lag) same as separate mesh.
Poiyomi discord also has a guide on how to make your textures really good for dl and vram sizes. almost zero reason to have high texture uses and more then 4-6 materials for an avatar base body+Clothes.
also never use 8k textures. only use 4k textures for Atlas/merging (where a few resized uv islands are made into 2k and 1k textures on that 4k texture) as when you get in vr you cant notice anything really beyond 1080p or barely 1440p in quality anyway (add vr blur too)
The only real issue I see with using a shader as opposed to using a blendshape or separate material renderer to hide geometry is that if others have shaders disabled for your avi, everything potentially becomes visible anyhow.
Shaders are great for doing ‘whistles and bells’ but I wouldn’t trust them to do more ‘critical’ things.
I use quotes because it’s not really critical, just a much higher priority option.