Re: Using TRAN in msh files
Posted: Fri Dec 21, 2007 12:36 am
If you look through a mesh file with a hex editor, there will be different MODL chunks. You can see these different MODL's in 3DOC via the scene explorer. After each MODL is a TRAN chunk. Inside the TRAN are (after the customary 4 byte long integer telling the size of the chunk) there are 10 floating point decimals. This is what they do:
Scale in X
Scale in Y
Scale in Z
Quat Rotation in X
Quat Rotation in Y
Quat Rotation in Z
Quat Rotation in W
Translation in X
Translation in Y
Translation in Z
You can use this chunk to "tweak" your models after export, if they're incorrect. What I do is import them via my importer, then move the different parts around, then type that transform value into this chunk. It's pretty simple to do actually, had a hard time, cause Riley's Mesh Reference was wrong about this whole chunk.
FYI: Refer to "Adding Cloth" in the "Everything You Need" to understand a little more how to read these numbers, where they are, and how to change them in msh files.
I put boba's cape on a magnaguard, and I needed to scale it up and move it, so this helps here. I also need it for my weapon models that are a little off-scale. This is a big time saver, hopefully.

EDIT
I'm having trouble with using the scale on weapons. When I tried to scale it up, it rotated it instead. It works fine as a prop though. I can't imagine why scale would work for props and not weapons, cause they use the same mesh.
Scale in X
Scale in Y
Scale in Z
Quat Rotation in X
Quat Rotation in Y
Quat Rotation in Z
Quat Rotation in W
Translation in X
Translation in Y
Translation in Z
You can use this chunk to "tweak" your models after export, if they're incorrect. What I do is import them via my importer, then move the different parts around, then type that transform value into this chunk. It's pretty simple to do actually, had a hard time, cause Riley's Mesh Reference was wrong about this whole chunk.
FYI: Refer to "Adding Cloth" in the "Everything You Need" to understand a little more how to read these numbers, where they are, and how to change them in msh files.
I put boba's cape on a magnaguard, and I needed to scale it up and move it, so this helps here. I also need it for my weapon models that are a little off-scale. This is a big time saver, hopefully.
EDIT
I'm having trouble with using the scale on weapons. When I tried to scale it up, it rotated it instead. It works fine as a prop though. I can't imagine why scale would work for props and not weapons, cause they use the same mesh.