View Full Version : Mayas binary floating point numbers

10 October 2006, 10:44 AM
I'm trying to read some numbers from a maya binary file. But I can't figure out how maya stores floats. It seems not to use the ieee 754 standard for 4 byte floats.

For example maya writes 1.0 as 00 00 00 F0
and -1.0 as FF FF FF 10

:argh: Thats really strange. Maybe its a fixpoint representation?
Does anyone know which floating point representation maya uses? Or any other standard beside ieee 754, so I can compare them.

Robert Bateman
10 October 2006, 03:10 PM
It doesn't use floats. Try doubles. Of course, attempting to read anything from a maya binary is a complete waste of time - Create a polyCube, then save as a *.mb, and you will not find any mesh data in it - just info about the nodes that created the mesh.... To do it successfully, you'll need to re-write Maya...

10 October 2006, 05:18 PM
I`m only trying to read the startframe, endframe etc. from the binary. I know where they are stored, which 4 bytes make up the number. But I can`t make sense of those 4 bytes.
Doubles are floats, just floats with double precision. Usually they take 8 bytes to store. I do wonder why Maya only uses 4 bytes for their "Doubles".

CGTalk Moderation
10 October 2006, 05:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.