Hi all!
We have observed an odd interaction between the maya2egg tool, the ObjectType egg tag, and the loader. I’ll walk the whole way through, hoping someone can shed some light on what causes what we’re seeing.
We created a box in Maya with a simple texture. When we went to implement collision detection, we decided to use the ‘tube’ object tagging (via the eggObjectFlags.mel script) to encapsulate our boxes. We wanted to preserve the visible geometry, so we added a new tube type, youtube, defined thusly:
egg-object-type-youtube <Collide> { Tube keep descend }
Applying the tube type to the model worked fine in terms of collision on this and many other models, with one problem: the resulting box is much smaller than it should be. Drawing the collision object shows it is the right size (relative to the original), but the visible geometry has been scaled down.
I cracked open the egg file, and this is what I saw a few lines down:
<Group> necessary_crate {
<Transform> {
<Matrix4> {
2.7182 0 0 0
0 2.7182 0 0
0 0 2.7182 0
-0.000335421 0 -0.00211186 1
}
}
<ObjectType> { youtube }
<VertexPool> recessary_crateShape.verts {
My modeler swears up-and-down that the transform shown isn’t his doing (though I’m going to have him dump Maya history as soon as he gets a chance to attack this problem again). When he removes the ‘youtube’ tag in Maya and eggs the file again, neither the transform statement nor the tube geometry appear. Additionally, if I manually delete either the transform or the youtube object-type directive from the egg file, the box is the correct size (of course, without the youtube, it doesn’t have its collision shell).
So I’m seeing two weird side-effects to using this tag:
- A transform is attached that I don’t think comes from our model (this has yet to be determined)
- Removing the youtube object type directive in the egg file—but not the transform—seems to remove the effect of the transform.
Can anyone shed light on these interactios? The more I play with egg files, the less I think I understand
Take care,
Mark