Unity-Technologies/com.unity.demoteam.digital-human

Get IDs for vertices being used in a SkinAttachmentTarget

pauldrummond opened this issue · 2 comments

How would I get the Vertex ID for all vertices being used in a SkinAttachmentTarget? If I toggle 'Show Resolved' in the Editor I can see which parts of the mesh are being used to bind attachments. What I'd like to do is get the Vertex IDs for these and use them in my custom shader. This would allow me to hide the parts of the SkinAttachmentTarget mesh that are occluded by the attachment mesh.

In SkinAttachmentData, the SkinAttachmentItem contains all the poses used by that attachment item (vertex if the attachment is a mesh), and these poses contains the vertex ids of the target mesh that it uses. So if you would gather all the vertex indices used by the poses, you would have all the vertices that are used by the attachments.

Thanks for the info. I'll look into this.