Animating a non animated mesh in code?

Blitz3D Forums/Blitz3D Programming/Animating a non animated mesh in code?

Captain Wicker (crazy hillbilly)(Posted 2011) [#1]
Hi,

I have had quite the time animating my mesh through fragmotion and 3ds max and is it possible to animate a mesh *.X by programming it to do so? The bb3d documentation isn't much of a help with this.

Thanks friends,
Austin H.


Guy Fawkes(Posted 2012) [#2]
No. U would have to manipulate AND save TO the static mesh, each of the vertices positions. Because the vertices are the ONLY way to manipulate an object.


Yasha(Posted 2012) [#3]
No. U would have to manipulate AND save TO the static mesh, each of the vertices positions. Because the vertices are the ONLY way to manipulate an object.


Rez, that answer is almost entirely the opposite of accurate.

Blitz3D treats .X files more or less identically to .3DS files: it supports loading keyframe animations with object position/scale/rotation out of them. It does not support loading vertex animation or bones from an .X file.

Aside from this, file formats are largely irrelevant to programmatic animation, as .X, .3DS and .B3D files are all loaded into exactly the same internal structure, which is a standard Blitz3D hierarchical mesh entity; created or loaded, all Blitz3D meshes support keyframe animation (and in fact, they also all support bone-based deformation, but there are no builtin commands to add that).

The only built-in file format which can load any kind of vertex-based animation is MD2, which uses a different animation engine and isn't actually represented internally as a Blitz3D mesh, meaning you have no access to its surfaces or vertices once loaded. Even then, an MD2 is still a subclass of the basic Entity and can be manipulated with standard entity commands.

It is of course possible to implement vertex animation using the vertex position commands - see the code archives, there's one by me and several better ones by other people, including support for MD3 files - but this isn't something that you really need to think about unless you want to do some very specific advanced things. Doing this requires reimplementing a lot of the animation system though, which has no support for vertices at all.

(Also, this question was already answered, in a parallel thread on a related topic.)


Ross C(Posted 2012) [#4]
The horsemen of the Apocalypse.