SixWays / FacePaint

Simple per-poly vertex painter for Unity
MIT License
58 stars 9 forks source link

Add support for SkinnedMeshRenderer #3

Open yosun opened 7 years ago

yosun commented 7 years ago

Is there a reason why SkinnedMeshRenderer isn't supported (?) and just MeshRenderer is?

SixWays commented 7 years ago

Yes - put simply, MeshRenderer has the additionalVertexStreams property and SkinnedMeshRenderer doesn't. To support SMR requires a completely different approach - namely, making a completely new copy of the mesh in question and altering its vertex colours.

That said, I do keep meaning to implement something along these lines for regular meshes (to improve batching at runtime, at the cost of higher memory usage). The problem for SMRs is that I don't yet know how I'd do this in-editor without a fairly complex system of creating, assigning, un-assigning and destroying copied meshes whenever you save anything.