Original Post
Hi,
I'm trying to work out how to convert the angles of a joint in a skelton that is stored in 3 shorts.
I've done a little reading and have found out it is common for 3D assets to store some of the data in shorts to save disk space etc.
The shorts(int16) have the following values.
[font="Times New Roman"]-6967, -6967, -22097[/font] (x,y,z)
These values when converted to double should equal these values.
[font="Times New Roman"]-90.00, -90.00, -55.00 (x,y,z)[/font]
I tried just converting them from shorts to float using the following code:
Which did not work correct. So I did a little more research and have come to the conclusion it has something to do with: atan2
But I've not been able to work it out / find any examples that seam to work correct.
And no this is not homework, I'm writing a converter that converts a binary format to .ma (Maya acsii)
Any help on this would be great, from documentation on how to do this or pointing in the right direction.
Thx Tom. (sorry if wrong section)
I'm trying to work out how to convert the angles of a joint in a skelton that is stored in 3 shorts.
I've done a little reading and have found out it is common for 3D assets to store some of the data in shorts to save disk space etc.
The shorts(int16) have the following values.
[font="Times New Roman"]-6967, -6967, -22097[/font] (x,y,z)
These values when converted to double should equal these values.
[font="Times New Roman"]-90.00, -90.00, -55.00 (x,y,z)[/font]
I tried just converting them from shorts to float using the following code:
inline double expandToFloat(short input) {
return ((double)input) * 1000 / 32,767;
}
Which did not work correct. So I did a little more research and have come to the conclusion it has something to do with: atan2
But I've not been able to work it out / find any examples that seam to work correct.
And no this is not homework, I'm writing a converter that converts a binary format to .ma (Maya acsii)
Any help on this would be great, from documentation on how to do this or pointing in the right direction.
Thx Tom. (sorry if wrong section)