Jump to content

Generating bounding box inside Shape Editor crashes


saindd

Recommended Posts

When trying to generate a bounding box for a shape inside the shape editor, the editor crashes. Select fit type "box" then fit target the model itself. Boom. It also crashes if you change the fit type to anything other than box.

Link to comment
Share on other sites

Normally it is done by collision meshes, but the player collisions seem to be done by the bounds. But I think I once made a player and doing no bounding box and it worked.

If you really want or need it create one in a modeling app and call it "Bounds"

Link to comment
Share on other sites

That's what i'm referring to. Look:

http://torque-3d.readthedocs.org/en/latest/artist/playercharacter.html#bounding-box


Without them, the engine is not able to create the collision properly and the player ends up falling through terrain and so on. However, i'm not creating one with the character and wanted to generate that inside the engine. The docs say it's fine, but the engine crashes.

Link to comment
Share on other sites

The bounding box and the collision meshes are 2 different things, and each serves a different purpose. What Duion says is true, in a way, but only when dealing with the actual player character that the client controls. As I recommended in your other posting @saindd you should setup the player's bounding box dimensions in the player's datablock file. There are fields there for the bounding box and crouching bounding box, etc.


The player is an exception to the rule, in that the bounding box dimensions setup in the player's datablock will also be the player's collision box. Other objects actually use bounding boxes and collision meshes as they 'normally' should be - The bounding box determines visible bounds and the collision meshes determine actual collision. You can see how this works pretty easily:


• Create a large cube taller than the player in size.

• Create a bounds box for the cube, say half the size of the cube so that the bounds box is too small and fits inside the cube.


Toss the cube into a scene and look at it. If you turn the camera to the side, the cube will disappear when the bounds box goes out of view. This is totally incorrect because you'll notice when the cube is not in view and you turn to look at it again it won't render until the bounds box is on screen again. So you end up with a cube that should be rendered but isn't until you're looking closer to its center.


Collision meshes are pretty self explanatory, quite simply they are what you actually collide with. I just wanted to point out the functional differences between the two.

Link to comment
Share on other sites

How do you determine them in the datablocks?

 

• Navigate to art/datablocks/player.cs

• In the datablock PlayerData(DefaultPlayerData) (this is the player datablock...), find the line:

 

   boundingBox = "0.65 0.75 1.85"; 

 

• Adjust to your heart's content. The first number is the x value (from the center), the second the y, and lastly the z.

• Profit

 

Also, wouldn't that be bad, due to differently sized player models?

Of course not, since you'd want a different datablock for every different model!

Link to comment
Share on other sites

  • 2 weeks later...

if u have your heart set on creating a bounding box this way then u would have to code in the ability to draw a bounding box, most people dont bother with this in a shape editor though just create your bounds in an art package like 3ds max or maya or something? like duion said.

Link to comment
Share on other sites

No. One unit in your modeling application is one unit in Torque. So if your model is two meters tall in Max, the bounds should be about "2.2 2.2 2.2" in Torque to start (tweak to fit expected behavior).


On the other side of this - the Shape Editor shouldn't crash. This would be pretty handy if it worked right....

Link to comment
Share on other sites

Would you mind talking me through what u are using to create the meshes and how they are exported and brought in to torque?


It works for me on my build of torque, although i have messed with the torque code on shapes quite a bit i don't think i have changed any code that controls how bounds are generated, i will try it again on a fresh torque build and see what happens. Are you using the EXE files you download separately? and are u using 32bit or 64bit?

Link to comment
Share on other sites

Collada file formats are not the same throughout art programs due to collada being a totally open file format, to get mesh files to work inside torque 3d i had to use Open Collada's exporter instead of the one native to max, could you try that and see if it fixes the problem?


Heres a link just incase https://code.google.com/p/opencollada/downloads/detail?name=OpenCOLLADA_3ds_Max_1.3.1_x64.msi


http://i.imgur.com/wcR8OsY.png


http://i.imgur.com/wFMVjGY.png


http://i.imgur.com/BVZNgA4.png


http://i.imgur.com/QX6zFZi.png


These were all done one after the other and not a single crash =/, some pretty uncanny results but thats cos the mesh isn't centered in the dae file i think

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...