simulate
simulate

Reputation: 1263

Which Mesh Data Formats provide Indices for Positions, Normals and UV Coords separately?

My game is going to use a lot of Low poly Meshes with hard edges. That means many times, one vertex position is going to use more than one normal and UV Coordinate. Therefore it would make good sense for me to split Vertex Positions, Normals and UVs into 3 separate arrays and then use 3 indices per vertex to construct the mesh. Are there any data formats for meshes which support skeletal Animations, Lights, textures, materials and all that junk together with separately indexing positions, normals and UVs? Or is it rather a question of the way I save the data in the 3D editor (Blender)?

Upvotes: 0

Views: 557

Answers (1)

SporreKing
SporreKing

Reputation: 485

Sadly, there is no efficient way of using different indices for position, normals, UV etc. Every combination would have to be a separate vertex.

This thread discusses the matter, but it's generally much more efficient to use individual vertices.

If you decide to export from a 3D-editor to a .obj format, each vertex will be provided in the file, along with it's data.

This video shows a full example of loading an .obj file, all the way from Blender to OpenGL.

Upvotes: 2

Related Questions