# Thread: Vertex Weights, for what vertex?

1. ## Vertex Weights, for what vertex?

Hello

I am currently implementing skinning in my collada importer.

When creating the vertex data when parsing the geometric collation <polygon> for example, you are given a list of vertex indices to which the vertex samentics( position, normals, ect ) apply to. However, with when parsing <VertexWeights> , I dont see any information reguarding to what vertex a joints influence applies too. <VCount> is equal to the "total amount" of vertices which for a cube would be 8. But technicly, there can be more than 8, these "vertex groups" seem to share the same position, but have differing normals, or other samentics that differ.

So my question is, how do I know what vertices, in total, to apply a joints influence to.

I appreciate it,
Thanks

2. ## Re: Vertex Weights, for what vertex?

If that cube had more vertices - le't's say 14 after a subdivision - you'd simply manage those 14 in the respective <skin> section.

Code :
```<skin source="#mesh">

<vertex_weights count="14">
<input semantic="JOINT" source="#Joints"/>
<input semantic="WEIGHT" source="#Weights"/>
<vcount></vcount>
<v> </v>
</vertex_weights>
</skin>```

Originally Posted by MichaelWojcik
So my question is, how do I know what vertices, in total, to apply a joints influence to.
There are 2-Tuples in the <v> section, so for a given vertex n (zero-based)
Code :
`(sum from i=0 to i=n-1(vcount[i])) * 2`
yields the start index for the n-th vertex influences.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•