Bounding Box Questions

Started by
9 comments, last by Kest 16 years, 7 months ago
Hello out there in gaming land! I'm very new to the gaming industry, as such I have questions about level design and development (of which I'm very fortunate to have found my first job doing this!) But, there is some debate right now between the developer and myself in trying to figure out where a problem lies. The problem being the character running out of the world that I created. He keeps asking me to add more random boxes here and there, but I want to know if it's really my geometry, or a problem with the engine.. anyway, here's the three specific questions I need answered for now. When you make a "Bounding Box for a level, A: Is it required, or is the geometry for the walls sufficient? B: If it's one piece of geometry for the bounding box with all verts welded, but with no floor or ceiling will it allow characters or cameras to pass through it? (side to side) C: If there is a geometry ceiling, but the camera still goes through the roof, is that an issue with the collision detection or my model? The ceiling is a separate piece of geometry. Do I need to create a ceiling and add it to the bounding box? Thank you !! PS. I'm sorry if there is a problem with posting in a couple of separate areas, I'm just not sure where to post this questions. :)
Advertisement
Quote:Original post by techcoast
When you make a "Bounding Box for a level,
A: Is it required, or is the geometry for the walls sufficient?

Usually both. The box serves as a failsafe. But it's often just a bottom floor plane instead of an inverted box. The game can reset falling objects that touch the untouchable plane back up to where they should have stopped.

Quote:B: If it's one piece of geometry for the bounding box with all verts welded, but with no floor or ceiling will it allow characters or cameras to pass through it? (side to side)

Not with a perfect collision detection system. But even then, an object can be mistakenly launched into the air and fly out of the geometry, if the physics engine is complex enough to have that happen.

Quote:C: If there is a geometry ceiling, but the camera still goes through the roof, is that an issue with the collision detection or my model? The ceiling is a separate piece of geometry. Do I need to create a ceiling and add it to the bounding box?

It depends. It should never matter if two collision geometry objects are welded or not, as long as the vertices are very close in the final transformed game world. But most collision detection systems don't bother to collide objects on both sides of a polygon. So perhaps that's why the camera is going through. If yours doesn't, you'll need to make the ceiling double-sided.
So, it's possible that it's just a fluke of the Reality Builder that we're using? Mk.. So, geometry walls with a bounding box SHOULD theoretically take care of this issue. I guess I should go ahead and build a ceiling and floor to go along with it too. If there are still issues I don't know what else I'll do. :)

Oh, you mention that I should make the ceiling two sided, does that mean a face going up and one going down?

Thanks for the reply!! If anyone else has a comment on this I'd like to hear it!
Quote:Original post by techcoast
Oh, you mention that I should make the ceiling two sided, does that mean a face going up and one going down?

If the camera needs to be kept above the ceiling, and the collision system only collides polygons on the normal-face side, then that would work. However, if the camera is always kept above a specific height, it would be easier to just program that into the engine.
Right, I understand that, but the camera is supposed to be right along with the player under the ceiling. I'm just trying to keep the camera below the ceiling and within the walls.
Ah, you didn't mention below or above before. I assumed the camera was above the ceiling. If it needs to stay on the same side of the ceiling as the player, then you don't need to do anything special. If the camera is going through, then there's something wrong with the model or the collision detection. If you know what you're doing as a modeler, then it's most likely the programming code that needs fixed.

The camera does have collision detection enabled, right? It collides correctly, but slips through on some occasions?
That's right.

As I've said before, I'm a green-horn to game modeling, but I do have some level of common sense. That's why I'm just making sure I'm thinking along the right lines by asking the professionals! :)

The walls are all welded no "Gaps" happen on the bounding box. So, if I need to make sure the bounding box ceiling is say 3" above and the floor bounding box is 3" below to act as a "catch" for objects slipping above or below the level geometry, then that's what I'll do. Beyond that, I think I've done as much as I can do as a modeler/level designer. Oy, I think I'm wearing too many hats. :) But I'm digging the experience!!!
Are you building a single model for rendering and collision?

It depends on how complex the rendered model is, but generally speaking, the collision models for games are usually extremely simplified compared to the model that's rendered. Often even structurally different than the visible model.

The most important reason is to remove tiny protrusions and gaps. Even a sophisticated collision detection system can allow the player to get stuck (or maybe even slip through) when models have tiny protrusions or narrow passages.
The bounding box I created is one single piece of geometry with welded edges. Now, one thing I am curious about is this. Is it better to have 6 sided boxes become the walls and outside edges, or is it okay to have a box with the normals flipped and have the walls generate from open edges? (If this makes sense) I've looked through the Mastering Unreal book and that's how they suggest making the levels.

Basically if it's not closed geometry will the collisions have an issue?
I probably should mention this too. My programmer tells me that when there are multiple characters within the scene that each character "ticks". If there are too many "ticks" going on then the collision detection becomes late and that's what allows the character to fall through the world. I have one scene that was a "bar scene" and it's basically a landing and a box for a room. Nothing fancy at all. Yet, the character will slip through when there are several enemies running around.

The level that i'm currently working on is much more complicated with several rooms, stairs, etc.. and this is becoming a real issue.

This topic is closed to new replies.

Advertisement