.B3D Format Question
Blitz3D Forums/Blitz3D Programming/.B3D Format Question
| ||
Hi. Can somebody pls tell me what's the meaning of the "w_rot" Parameter in the NODE-Chunk in .B3D Files? b3dWriteFloat( 1 ) ;rot_w b3dWriteFloat( 0 ) ;rot_x b3dWriteFloat( 0 ) ;rot_y b3dWriteFloat( 0 ) ;rot_z Is it probably a Flag for Local/Global Rotation? |
| ||
I don't know about the "w_rot" parameter specifically (since I've not looked much at the b3d file format specifications) but usually in 3D graphics W refers to texture coordinates. UVW are analogous for texture coordinates to XYZ for mesh coordinates. |
| ||
excuse my bad english w x y z is a quaternion sytem for rotation angle bye bye |
| ||
thanks a lot! |
| ||
Ase mongia says, the B3D format uses Quaternion rotations rather than Euler angles. Quaternions are made up of a 3D vector in 4D space (or something along those lines) along with a 'remainder' rotation. |
| ||
Good to know. I'm thinking about writing a b3d exporter for Maya so this is important to know. I'm not sure I understand Michael's explanation. As I recall quaternion rotation gives a vector using XYZ coordinates and then the amount of rotation around that vector (with the direction of rotation as per the right hand rule;) is this correct? |
| ||
At least it is the way I understood quaternions as well. A link (by wavey) http://www.dscho.co.uk/blitz/tutorials/quaternions.shtml |
| ||
Something you might be interested/need: I just noticed the source code for the Milkshape exporter (download from the Specs and Utils page) includes a function to convert Euler angles to quaternian rotations. Whew, until I found that I was afraid I would have to figure out the math myself (and I haven't done any linear algebra since high school!) when writing an exporter for Maya. I think Maya stores rotation data as Eulers. |