Extracting triangles of multiple materials
I'm having trouble extracting the submesh data from the <triangles>
Before when I exported a collada file from 3DS Max 2011 I got exports with <polygons>. Everything worked just fine, I was able to extract the triangles from the
without issues. Now when I export from Max 2012 I have the option to use <triangles> or <polylist>. I choose to use triangles, but I don't understand how it's exporting the data. For each material of the mesh (which have completely different vertex positions and are all separate meshes) I get the exact same copy of <triangles>
array across all materials of the mesh. Before when I was working with <polygons>, each different material had
lists which each contained the triangles for just that material.
I've read the Collada documentation and did not see anything in there regarding this. How do I separate out the various materials or "submeshes" from these new <triangles> nodes?
See Attached DAE file.
Re: Extracting triangles of multiple materials
Assuming nothing is wrong, that just means each set of triangle primitives is indexed in the same order. The
element is just a list of indices. The difference is that each one has inputs to different sources (that contain the actual vertex attribute values).