.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old January 27th, 2007, 11:37 PM
Atrocities's Avatar

Atrocities Atrocities is offline
Shrapnel Fanatic
 
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
Atrocities is on a distinguished road
Default What Are Bounding Boxes and How Do I edit them?

I am in the process of setting up firing arcs for a new ship set and I have discovered that the shipset viewer has this options call Bounding Boxes.

I noticed that the ships I am working on have these boxes but they do not surround the ship like they do in other sets. The bounding boxes are oriented in a top down direct and not level with the ship. They share a common center point, but while the ships face say N and S, the bounding boxes face Up and Down. Very odd.

So does any one know anything about bounding boxes, what they are for, and how to adjust them?
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
Reply With Quote
  #2  
Old January 28th, 2007, 03:27 AM
Randallw's Avatar

Randallw Randallw is offline
Major General
 
Join Date: Dec 2003
Location: Tasmania, Australia
Posts: 2,325
Thanks: 1
Thanked 1 Time in 1 Post
Randallw is on a distinguished road
Default Re: What Are Bounding Boxes and How Do I edit them?

Up and down you say. Hmm, well if a ship flies into a planet it will move up, bound perhaps, and the same if it takes up the same space as another ship, except when ramming. I'd guess this bounding box is to tell it when to move up, or down, when it moves into another ship/planets bounding box area.
Reply With Quote
  #3  
Old January 28th, 2007, 04:16 AM
Atrocities's Avatar

Atrocities Atrocities is offline
Shrapnel Fanatic
 
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
Atrocities is on a distinguished road
Default Re: What Are Bounding Boxes and How Do I edit them

Aaron gave me some very helpful information. I would like to share it here with you all.

Quote:


Bounding boxes are the boxes which surround a ship that detect collisions (as a second pass). They are invisible in the game, and are just mathematical constructs. When a projectile is heading towards a ship, first I check to see if the projectile is within the radius of the object. If it is, I check to see if the projectile is within the bounding box (seond pass). The bounding box is a bit more form fitting than a huge sphere. If its within the bounding box, I then check vertices to see if the projectile has hit one of the polygons of the model (this is time consuming and is only done if all previous tests say we had a hit). Bounding boxes are also used to make sure that when a weapon misses its target, it fires close but does not hit.

The bounding boxes are computed based on the models maximum extents in all 3 planes.

Ship Set Viewer - Controls
==================================================
I: Toggle command listing.
W: Toggle weapon firing point glow display.
L: Toggle weapon firing point line display.
S: Toggle object spin.
E: Toggle engine glow display.
R: Toggle engine center lines.
G: Toggle engine glow realistic and symbolic.
C: Toggle showing model center lines.
M: Toggle background grid map.
H: Toggle ground combat hexes and squares.
O: Toggle object radius.
B: Toggle bounding box.
~: Enter Cheat Code.
F1: Top Down View.
F2: Skewed View (the view will rotates level at the plane).
F3: Skewed Reversed View (the view will rotates level at the plane).
F4: Skewed View (no rotation at the plane).
Arrow Keys: Move viewpoint.
Add: Zoom In
Subtract: Zoom Out

Ship Set Viewer - Cheat Codes
==================================================

list [Model #]
Show a list of all of the firing and engine points for model [Model #].

endlist
Hide the firing and engine point list.

changefiring [Point Index] [Element Index] [New Value]
Change a firing point on the model. (Applies to the model selected with "list").
[Point Index] = The firing point index.
[Element Index] = 1, 2, 3 indicating the x, y, z coordinate.
[New Value] = The value of the element.

cf
Same as changefiring.

changeengine [Point Index] [Element Index] [New Value]
Change an engine point on the model. (Applies to the model selected with "list").
[Point Index] = The engine point index.
[Element Index] = 1, 2, 3 indicating the x, y, z coordinate.
[New Value] = The value of the element.

ce
Same as changeengine.

changeengineradius [Glow Size]
Change the glow radius of all of the engines. (Applies to the model selected with "list").
[Glow Size] = the new radius of the glow effect.

cer
Same as changeengineradius.

changepos [Element Index] [New Value]
Change the start offset position of a model. (Applies to the model selected with "list").
[Element Index] = 1, 2, 3 indicating the x, y, z coordinate.
[New Value] = The value of the element.

cp
Same as changepos.

changescale [New Scale Value]
Change the scale of the model in all planes (x, y, z). (Applies to the model selected with "list").
[New Scale Value] = The new scale factor.

cs
Same as changescale.

changeradius [New Radius Value]
Change the radius of a model. (Applies to the model selected with "list").
[New Radius Value] = The new radius of the model for the xfile class. This does not change the
actual radius of the model, just the value of the radius stored in the xfile
class. This value is used in the game to determine the size of the model for
placement in the combat grid (so we can place ships before we actually load
the model itself).
cr
Same as changeradius.

NOTE:
When the program is shutdown, all of the values for the current ship set will be saved in the file
ShipSizes.txt (including any changes you made in the program).

Side Note: Don't make changes in the data files directly. Make them in the program using the cheat codes, then shutdown the program. Load up the file ShipSizes.txt and copy all of the changes to your Ship Set Class File.

Hope this helps!

Aaron
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
Reply With Quote
  #4  
Old January 28th, 2007, 12:16 PM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: What Are Bounding Boxes and How Do I edit them

Thanks for that info!
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #5  
Old January 28th, 2007, 12:53 PM
Slick's Avatar

Slick Slick is offline
Brigadier General
 
Join Date: Apr 2002
Location: Kailua, Hawaii
Posts: 1,860
Thanks: 0
Thanked 1 Time in 1 Post
Slick is on a distinguished road
Default Re: What Are Bounding Boxes and How Do I edit them

So it appears by reading this that smaller/sleeker models have an advantage.
__________________
Slick.
Reply With Quote
  #6  
Old January 28th, 2007, 01:19 PM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: What Are Bounding Boxes and How Do I edit them

Not anymore due to a fix in v1.24.

Whether a weapon will hit or not is decided before the animation is drawn. However there was a bug where a weapon fire that was suppose to miss would hits it target due to the target's movement and it would damage the ship - in that case your statement would be true. But now when that happens, it won't do any damage...
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:47 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.