com.unity.demoteam.digital-human icon indicating copy to clipboard operation
com.unity.demoteam.digital-human copied to clipboard

Get IDs for vertices being used in a SkinAttachmentTarget

Open pauldrummond opened this issue 1 year ago • 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.

pauldrummond avatar Mar 27 '23 07:03 pauldrummond

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.

mikko-alaluusua-unity avatar Apr 24 '23 16:04 mikko-alaluusua-unity

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

pauldrummond avatar Apr 25 '23 19:04 pauldrummond