Primitives, collada and vertex sharing

why triangles in primitives like sphere and grid share vertices while a box doesn t? Collada imports from Blender also don t.

because of the normals

I don t understand… could you explain better? I tought it was more related to the mesh being a triangle strip or using a set of 3 new vertices each time to define the triangle…

a vertex combines several components, like:

  • position
  • normal
  • texture coordinate 1-8
  • colors,…

if in a mesh multiple vertices share all of their components you can optimize the buffer by just putting the vertex in once and reference the same vertex multiple times in the index buffer via its index.

this can be done easily in a quad or grid. and even in a sphere if you want it shaded smooth. but in a box e.g. though the corner vertices share their positions you’d want them to have individual normals (facing in different directsions) so you get correct shading. now that you want different normals at the same positions you cannot share vertices anymore (since every vertex can only have one normal) and use multiple vertices instead.

Thanks Joreg… still about collada export from blender, how can i have the triangles share vertices? I want that because when I do some vertex transformation, the mesh should deform evenly without having trinagles “jumping off” the mesh itself.

ai io,

that is more a blender question then…

alternatively you can try with Normals (EX9.Geometry Mesh) which throws away the meshs normals and creates new ones given a Smoothing Angel. see its helppatch…