Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Russian Roulette on July 29, 2008, 06:13:04 PM

Title: Polygon collision boxes
Post by: Russian Roulette on July 29, 2008, 06:13:04 PM
I was wondering if battlezone supports polygon collisions, as in: a collision box that fits the overall shape of an object, this is mainly used for a 'tight fit' on an object for improved realism.
Or does it only support the normal 'cube' style collision boxes(fyi: the four sided collision box)?


|^[{(*RR*)}]^|
Title: Re: Polygon collision boxes
Post by: Warfreak on July 29, 2008, 07:16:40 PM
BZ2 supports overall shape, but only for buildings and to get that to work correctly you have to make the collision yourself, as the BZ2 generated ones are a bit sketchy.
(Dont put a collision on it at all, put it to own terrain and ram into it ingame, you'll see what i mean.)
Title: Re: Polygon collision boxes
Post by: Nielk1 on July 30, 2008, 12:28:56 AM
There is Square and Bubble for units and Square, Bubble, or collision mesh for buildings. Building collisions meshes are glitchy if not super simple, that is why auto generated ones are not good.
Title: Re: Polygon collision boxes
Post by: General BlackDragon on July 30, 2008, 02:06:46 AM
auto generated ones also don't take deploy animations into account. (I.E. Extractor/Gun Spire/Matriarc)
Title: Re: Polygon collision boxes
Post by: bigbadbogie on July 30, 2008, 03:53:00 AM
I have never had a problem with auto-generated building collisions.
Title: Re: Polygon collision boxes
Post by: GreenHeart on July 30, 2008, 08:05:18 AM
Quote from: bigbadbogie on July 30, 2008, 03:53:00 AM
I have never had a problem with auto-generated building collisions.

Well one of the Scion buildings had an invisible wall at times for some odd reason.  Commando found it during the private beta & i was asked to add a colision__hc to it.  The invisible wall was 200-300meters away & when the scion building was destroy the invisible way was gone.
Title: Re: Polygon collision boxes
Post by: Nielk1 on July 30, 2008, 05:47:27 PM
Did debug.collisions show the invisible wall?
Title: Re: Polygon collision boxes
Post by: Zero Angel on July 30, 2008, 07:46:29 PM
Just FYI: vehicles use a sphere collision by default, not a box collision. Which is weird, because a box collision is much more accurate and tighter fitting for units like the scout and tank. You have to add boxCollide = 1 somewhere under [GameObjectClass] to get a box collision.
Title: Re: Polygon collision boxes
Post by: GSH on July 30, 2008, 08:15:15 PM
It's the old speed vs accuracy tradeoff. Spheres are *fast* to collide. Boxes, especially rotating boxes, are not so fast.

Remember: box specs for BZ2 say Pentium 200.

-- GSH
Title: Re: Polygon collision boxes
Post by: AcneVulgaris on July 30, 2008, 09:49:41 PM
Bah...I ran it on a 166 for a while.  In the snow. Uphill.  Both ways.

Title: Re: Polygon collision boxes
Post by: VSMIT on July 30, 2008, 09:58:47 PM
But it was an arduous journey, right? :-)

VSMIT.
Title: Re: Polygon collision boxes
Post by: AcneVulgaris on July 31, 2008, 12:26:40 AM
Yes.  And when we got home, dad would kill us all with an axe.  Then we had to get up the next morning and do it all again.
Title: Re: Polygon collision boxes
Post by: OvermindDL1 on July 31, 2008, 03:51:15 AM
I started running BZ2 on an old AMD (K6 I think... maybe earlier...) 200mhz, would not run on the 90mhz I had before that. :P
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: Polygon collision boxes
Post by: Nielk1 on July 31, 2008, 05:35:50 AM
I had to get a whole new PC to play BZ2.
Title: Re: Polygon collision boxes
Post by: GreenHeart on July 31, 2008, 05:39:12 AM
Quote from: Nielk1 on July 30, 2008, 05:47:27 PM
Did debug.collisions show the invisible wall?

Dunno, the debug.collisions came after the model was given a custom collision.
Title: Re: Polygon collision boxes
Post by: Commando on July 31, 2008, 02:09:11 PM
No debug.collisions did not show the invisible wall.

The problematic building was either fbkiln.odf or fbforg.odf. I can't remember which.
Title: Re: Polygon collision boxes
Post by: TheJamsh on August 18, 2008, 10:45:37 PM
i would have thought spheres would taken more calculation for collisions? so many more points in a sphere than a box surely, although i guess its not done like that.

is it just a check to see if the vehicle is within a certain radius in all directions from an object? or does it calculate every point on the sphere... i think i answered my own question :D
Title: Re: Polygon collision boxes
Post by: Nielk1 on August 19, 2008, 12:29:39 AM
Jamsh, its just a radius and a center point. Rather, 3 radii.
Title: Re: Polygon collision boxes
Post by: OvermindDL1 on August 19, 2008, 06:01:11 AM
Correct, the sphere calculation does require much fewer computer calculations then calculating whether 8 points are within 2 points (assuming the box is always level and never rotated, if it can rotate then you need another calculation per point to get them back to the same relative space).
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: Polygon collision boxes
Post by: TheJamsh on August 20, 2008, 09:24:16 PM
yeh that makes sense... but do box collisions really have that bigger an effect on performance in game?
Title: Re: Polygon collision boxes
Post by: mrtwosheds on August 20, 2008, 10:16:43 PM
Yes they do, buildings that are likely to get built in large numbers like GT's and pwrgens should have low poly collision boxes, its not so important with singular buildings but still desirable.