Hello everyone, I´m struggling in a little problem.
I want load models exported from 3dsmax to my DX appllication.
but 3ds models have differents numbers of vertex, textureUV and normals.
like that obj file, a simple noise cube. 12 triangles, 8 vertex, 24 normals and 18 uv
I know how to load file with same size of vertex, uv and normals.
But how can I load diferent vertex buffers and combine them to a final indexed buffer to a mesh?
It is possible to do that in DX11?
Many model formats index each attribute separately, so you can have a different number of positions/normals/texcoords/etc in the file.
However, every graphics API treats a "vertex" as a unique combination of all it's attributes, so you've got to perform the conversion. Every model importer does this, yes.
I'm not familiar with that format so I'm just guessing, but the 'f' lines down the bottom seem to contain position/tex-coord/normal indices.
For each of those groups, you can get the corresponding attributes and output them to your vertex buffer.
e.g. for "4/23/16", write the 4th position, then the 23rd tex-coord, then the 16th normal into your buffer.