Bounding Box Manipulating

Topics relating to Modeling with Reality Factory.
Post Reply
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Bounding Box Manipulating

Post by metal_head » Mon Dec 07, 2009 10:28 pm

Hi! As you all know, I'm working on a mini project. THe actors in the game are made of simple planes, textured with TGA textures. The problem is that in the game, all boundingboxes are a little away from the actual meshes. BoxWIdth/Height commands won't help, cuz they only change the size of the boundingbox and my problem is this:
bbox.jpg
(163.26 KiB) Not downloaded yet
Anyone know how to fix this?

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Bounding Box Manipulating

Post by Jay » Mon Dec 07, 2009 10:31 pm

Use Equity to reposition the actors.
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 1:40 pm

Yeah, that's what I tough it could fix this, but when I did a reposition, the Bbox just got larger and moved away so that it was pretty much the same... :(

User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Re: Bounding Box Manipulating

Post by bernie » Tue Dec 08, 2009 2:23 pm

V6.1..0 of Equity will show the bounding box but repositioning the actor won't solve the problem you have there, it will move the bounding box with the actor. It looks as if you need to re-make that model altogether.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 3:55 pm

Yeah, but it's not only one or two models, it's all the models... all of my models are just planes with TGAs and all of them have this problem. How will I be able to remodel a model so that it aligns with it's bbox anyway?


PS. Jaaaay....you have access to the source code, right? Do you know what's going on?
Attachments
beast.jpg
(157.17 KiB) Not downloaded yet

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Bounding Box Manipulating

Post by Jay » Tue Dec 08, 2009 6:17 pm

Hm I don't think the problem are the actors anymore. How big is the general scale of the objects and how big is it? Maybe floating-point accuarcy is a problem (basically, the farther away you get from point (0,0,0) the more inaccurate it gets and it COULD happen that objects begin to 'bounce' when they move because all the values are rounded and there can be rounding errors.)
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 7:08 pm

You mean the scale definition in the Pawn.ini ?
Well, this is the player's one for instance:

Code: Select all

[PacBeast]
actorname = pacbeast.act
actorrotation = 0 180 0
actorscale = 0.4
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
ambientlightfromfloor = false
boundingboxanimation = pac_idle
shadowsize = 30
0.4, but almost everything in my RF projects so far has had a floating point scale definition and I've never had this problem before...
ah.... if there was a way to model the width and the lenght of the boundingbox as well as the position....

User avatar
animatrix
Posts: 134
Joined: Thu Jul 07, 2005 10:51 pm

Re: Bounding Box Manipulating

Post by animatrix » Tue Dec 08, 2009 7:46 pm

Have you tried not using a plane but using a thin box for your model?, since you will only see the faces it wont matter how thick it is, the box should treat it normaly, unfortunatly, per poly collision would be good for this type of game. But one question, why a 2d game in a 3d game engine? there are several 2d game design packages that you could do this in without any problems at all. It would still have 3d look to it. Ive got several 2d games that work well, just curious. :)
Also, model bones have somthing to do wth boxes I think. make sure that is centered.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 9:09 pm

It's not a 2D game, I just imagine the characters and the interactive world props to be cartoony, and a plane with TGA is the perfect thing. I also think that the problem could be the plane, I could try adding another invisible plane in one of the models and compile to see there are any changes

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 9:31 pm

OK.....the following just doesn't make sence:
I made an invisible box arround my pawn and that didn't change anything... than I made a new box model from scratch and the boundingbox was almost perfect, what the hell?!
Attachments
bbox2.jpg
(216.96 KiB) Not downloaded yet

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Bounding Box Manipulating

Post by Jay » Tue Dec 08, 2009 10:34 pm

And how big is the level? The important thing about the accuracy problem is the ratio between the level size and the actor size. If your level is really big it becomes a problem.

I have edited my post and sadly after that that bit of information got lost.
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 10:38 pm

It's happening on all of my levels and they have different sizes. Also the directions in the game are Y and Z, not Y and X
so my levels look like this in the editor:

Code: Select all

|  |
|  |
|  |
Rather than:

Code: Select all

--------
--------

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Bounding Box Manipulating

Post by Jay » Tue Dec 08, 2009 10:56 pm

Have you checked the animations and especially the boundingboxanimation (pac_idle)? I am running out of ideas now...
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 11:05 pm

well, nothing wrong with that animation, as well as all the others idle or not...
...would it be possible to manipulate the box with another program like Equity or something...
...tried also rotating the model in Equity and than rotating it back in pawn.ini....no effect.


**EDIT**
Oh yeah, found something nice:
When I set boundingbox = nocollide in Pawn.ini, the pawn just disappears and usually the pawn just get's it's collision removed and still get rendered.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Bounding Box Manipulating

Post by metal_head » Tue Dec 08, 2009 11:23 pm

Guys, funny, but putting a BoxWidth(35) in the Spawn order fixed the problem and now the box is completely and corectly covering the pawn.
Soooo, I think the problem here's solved

Post Reply