Hello.
I'm trying to implement a collada reader for my game, with the aim to :
- edit mesh from 3ds max
- export the mesh in a .dae
- read the .dae by my game engine
- create the mesh in the game engine by translation of the file to one or more vertex array
- export the mesh in optimized binary file.
I'm having issue to understand how to read the collada file for mesh. I'm trying to export a random mesh from 3ds max wich have 3 materials assigned to it.
BUT, in the .dae, I have 3 <triangles>, one per material, with the exact number of indices! Also, the indices of the triangles are all the sames for each 3 <triangles>. If I understand right, each <triangles> should have the indices of the triangles using the corresponding material. Do I understand it right? Should I use a particular option in 3DS max to have my <triangles> correctly composed?
With regards, SpidyyCode:<triangles count="388" material="Concrete"> <input semantic="VERTEX" offset="0" source="#Terrain-VERTEX"/> <input semantic="NORMAL" offset="1" source="#Terrain-Normal0"/> <input semantic="TEXCOORD" offset="2" set="0" source="#Terrain-UV0"/> <p>...</p> </triangles> <triangles count="388" material="Road"> <input semantic="VERTEX" offset="0" source="#Terrain-VERTEX"/> <input semantic="NORMAL" offset="1" source="#Terrain-Normal0"/> <input semantic="TEXCOORD" offset="2" set="0" source="#Terrain-UV0"/> <p>... </p> </triangles> <triangles count="388" material="Grass"> <input semantic="VERTEX" offset="0" source="#Terrain-VERTEX"/> <input semantic="NORMAL" offset="1" source="#Terrain-Normal0"/> <input semantic="TEXCOORD" offset="2" set="0" source="#Terrain-UV0"/> <p>...</p> <triangles>


Reply With Quote
