Is Blitz3d reindexing vertices on loading?

Blitz3D Forums/Blitz3D Programming/Is Blitz3d reindexing vertices on loading?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The surface indices of vertices in a single surfaced .b3d mesh will only be the same as the order index in the .b3d file in a single surface model but if there are multiple surfaces i.e. more than 1 TRIS chunk then Blitz sets the index of the first vertex of each surface to 0 incrementing the index no as it builds the mesh. Really the vertex in a .b3d file are not 'indexed' at all just read in the order they are written. Its the TRIS chunk that defines a surface - if there's only one surface then its index values will correspond to the order of the vertex in the file - if there's multiple surfaces then the vertex surface index is set to 0 for each surface created.The total count of the vertex should match unless there are any isolated i.e. not used by any of the tris.
An additional problem with working with vertex in an animated mesh is that there is no way to find the real world coordinates of a vertex when the mesh is animating - VertexX# ( surface,index )will always return the original starting position of the reference frame and not the current 'animated' position. To get around this you can create a pivot at the vertex start position and parent that pivot to the bone. You can then check the pivot to get the position of the vertex. This however will not work correctly if you have weighted vertex - you would then have to move the pivot according to the vertex weighting values which gets a bit more complicated.