Is there any way to reindex vertices in the bones of a loaded .b3d?

Blitz3D Forums/Blitz3D Programming/Is there any way to reindex vertices in the bones of a loaded .b3d?

GrumpyOldMan(Posted 2003) [#1]
Hi

The topic pretty well says it all, we can do just about anything else using standard commands but I was just wondering if anybody had found a way of doing this.

Cheers

GrumpyOldMAn


Beaker(Posted 2003) [#2]
You can't do it without saving out (and re-loading) a new B3D. So, the answer is YES.


Ricky Smith(Posted 2003) [#3]
When you say 're-index' the vertices in the bones - I am assuming you mean vertex re-assignment - I can't see the point of re-indexing all the verts in the mesh ?!

If it is vertex assignment then there are 2 methods:

When you load a .b3d animated mesh with LoadAnimMesh() the animation data including the vertex assignment is stored internally with no access for the user. To gain access to this nfo you would need to parse the .b3d file and then read the data into a type structure or a databank. You could then edit this info but it would not take effect on the current model you have in memory. You would need to re-write the .b3d file with the new vertex info and then reload the model to see the changes.

The other way is to write your own animation routines so that you have full control over what is happening. Load the .b3d and then parse the .b3d file reading the joint/vertex assignation and animation key data into a type/bank.
You can then custom animate your model using this data. The advantage of this system is that any changes you make to the anim/vertex data will be immediately visible without having to reload - the disadvantage is that this is a LOT more coding.

I am currently writing an animation tool for Blitz3d that uses both these methods for specific purposes.