Page 1 of 1

What about Bones?

Posted: Mon Oct 22, 2012 3:19 pm
by Valerian
I was searching in forum for bone information but i couldnt find anything.
What about the bones? how are they stored in a model? the same as vertices? with x,y,z coordinates and other things?
i would like some general information about it

Re: What about Bones?

Posted: Mon Oct 22, 2012 7:26 pm
by howfie
I've seen it two ways. First is a list joints along with their parents index and position and rotation transform. Second is an adjacency list representation where a list of joints where each joint stores position, rotation, and child indices. Sometimes names are present, sometimes not. Joint data, like vertex data, can be interleaved or non-interleaved. Positions and rotations can be relative or absolute.

And, some games joints are easy to extract; others hard. Depends on the engine and game developers.

Re: What about Bones?

Posted: Tue Oct 30, 2012 6:31 pm
by Valerian
howfie wrote:I've seen it two ways. First is a list joints along with their parents index and position and rotation transform. Second is an adjacency list representation where a list of joints where each joint stores position, rotation, and child indices. Sometimes names are present, sometimes not. Joint data, like vertex data, can be interleaved or non-interleaved. Positions and rotations can be relative or absolute.

And, some games joints are easy to extract; others hard. Depends on the engine and game developers.
okay thanks, but how are they usually stored in a model for example?
are they stored as shorts or floats? or anything else?
i can read the model in 3ds max, it works but i have 32bytes of unknown data in the model, maybe this is the bone data

Re: What about Bones?

Posted: Mon Nov 05, 2012 1:43 pm
by Satoh
Newer games are tending toward float32s as I recall (especially PC games) but older games, usually PS2 or similar console games, use float16s for most decimal data.

I have seen one game that used int16s and did some math on the values to turn them into decimals... but I'd say your best bet is to look for 32 bit floats in newer games and PC games, and 16 bit from ps2 era games.

Re: What about Bones?

Posted: Mon Nov 05, 2012 7:46 pm
by Demonsangel
The bone data can be parent-child relative or absolute.
I've seen bonedata stored as Quats, Vectors + Eulers and even the full 4*4 matrices .
Sometimes in quats/eulers you have to swap values with eachother or multipy the w value with (-1).