Extra space" around models
by Lee Latham · in Torque Game Engine · 01/17/2007 (8:17 am) · 3 replies
Hello,
I'm in a bit of a pickle, and I'd be grateful if anyone can point me in the right direction. A lot of the meshes I'm working with are 3rd party art 3ds files. They generally import into Milkshape fine and look great, BUT, recently I've noticed that they often have a fair amount of "extra space" around them. This space, in turn is wreaking havoc in Torque throwing the physics of the models off.
I'm not even sure what to call this, which makes it tough to look for an answer. It is most easily seen when I use the Torque Exporter+ to create a bounding box. What you'll see is that the bounding box is created curiously significantly larger than the actual mesh, and sometimes even off center. I can fix the bounding box easily enough, but apparently Torque is still using this "extra space" for its physics, which is causing me problems.
Any ideas? Terminology? Any help would be appreciated! I don't feel like it's a Milkshape specific problem....
Lee
I'm in a bit of a pickle, and I'd be grateful if anyone can point me in the right direction. A lot of the meshes I'm working with are 3rd party art 3ds files. They generally import into Milkshape fine and look great, BUT, recently I've noticed that they often have a fair amount of "extra space" around them. This space, in turn is wreaking havoc in Torque throwing the physics of the models off.
I'm not even sure what to call this, which makes it tough to look for an answer. It is most easily seen when I use the Torque Exporter+ to create a bounding box. What you'll see is that the bounding box is created curiously significantly larger than the actual mesh, and sometimes even off center. I can fix the bounding box easily enough, but apparently Torque is still using this "extra space" for its physics, which is causing me problems.
Any ideas? Terminology? Any help would be appreciated! I don't feel like it's a Milkshape specific problem....
Lee
#2
However, I think the automatically generated one is simply symptomatic of the issue. When it creates it automatically, it often makes it much larger than the mesh itself. I think it is adjusting it to this "extra space" that I think I'm seeing. Sometimes it is off center as well.
The reason I think it's a problem is that even though I may then adjust the collision box nicer, when I applyImpulse in Torque, the models don't move in a straight line, but get tilted. This only happens on the models with the described behavoir. Other models, where the auto-magical bounding box was perfect without any tweaking, get impulsed in a straight line.
So it's not a bounding box issue, per se, but a thing with the imported models, some kind of parameter, perhaps?
You know, it's kind of weird to describe, so here's a screenshot of the auto-generated bounding box:

Now if you look carefully, you'll see that it's mysteriously off-center (left to right). I can adjust this back, make a more sophisticated bounding box, whatever, but it doesn't help. The physics engine seems to be using this "extra space" that the exporter sees, which I think must be in the imported 3ds file. What WILL work is if I move the whole mesh so that this goofy bounding box is centered over the skeleton, and the applyImpulses work just fine, but now of course you've got a screwy looking car in the game. Make sense?
01/17/2007 (11:37 am)
The answer to your question is "both". I often let the exporter auto-magically make it, and then adjust it.However, I think the automatically generated one is simply symptomatic of the issue. When it creates it automatically, it often makes it much larger than the mesh itself. I think it is adjusting it to this "extra space" that I think I'm seeing. Sometimes it is off center as well.
The reason I think it's a problem is that even though I may then adjust the collision box nicer, when I applyImpulse in Torque, the models don't move in a straight line, but get tilted. This only happens on the models with the described behavoir. Other models, where the auto-magical bounding box was perfect without any tweaking, get impulsed in a straight line.
So it's not a bounding box issue, per se, but a thing with the imported models, some kind of parameter, perhaps?
You know, it's kind of weird to describe, so here's a screenshot of the auto-generated bounding box:

Now if you look carefully, you'll see that it's mysteriously off-center (left to right). I can adjust this back, make a more sophisticated bounding box, whatever, but it doesn't help. The physics engine seems to be using this "extra space" that the exporter sees, which I think must be in the imported 3ds file. What WILL work is if I move the whole mesh so that this goofy bounding box is centered over the skeleton, and the applyImpulses work just fine, but now of course you've got a screwy looking car in the game. Make sense?
#3
I was a little unclear on the difference between the two, and had done some experimentation in the past that didn't seem to show the bounding box doing anything. However, adding it has fixed the problem!
01/18/2007 (5:09 pm)
Ok, I've learned a little more. I wasn't using a bounding box, just a collision box. Adding a bounding box has fixed the problem!I was a little unclear on the difference between the two, and had done some experimentation in the past that didn't seem to show the bounding box doing anything. However, adding it has fixed the problem!
Associate David Montgomery-Blake
David MontgomeryBlake