Sign in to follow this  

Bounding Box Questions

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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!!!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Quote:
Original post by techcoast
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?

I'm not sure I follow you. Do you mean like this?

Free Image Hosting at www.ImageShack.us

If so, there wouldn't be any advantage to doing what's on the left.

Quote:
Original post by techcoast
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.

Eh, that's bad. That sounds like the collision system doesn't take motion into account. Meaning everything is checked as a static object, and when moving fast enough - or enough time flies by in one update frame, they can pass through walls. If [object velocity x time] is greater than the size/radius of the object's collision primitive, the object's movement through a wall won't be detected.

If that's actually what's happening, the only way to fix it without changing the detection system would be to restrict the speed of objects or the amount of time that can pass in one update. It would have nothing to do with the models.

Share this post


Link to post
Share on other sites

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this