Hard Light Productions Forums
Community Projects => The FreeSpace Upgrade Project => Topic started by: Shivan Hunter on October 09, 2010, 09:24:01 pm
-
[22:18] <DarthGeek|FS> oooooooooooooooooooooooooooooooooooooookay, problem
[22:18] <DarthGeek|FS> the missile turret on the Fenris can't be shot
[22:18] <DarthGeek|FS> no collision
[22:18] <DarthGeek|FS> bounding box problem?
[22:19] <SDM> :( Since when?
[22:19] <SDM> Wait, that might explain something...
[22:20] <DarthGeek|FS> since 3.6.12 I think
It can still technically be damaged if you fire at the top part or the bottom part of the cruiser, where your shot's impact is in the bounding box of both the turret and the cruiser. Otherwise your shot passes right through.
:/
-
I seem to remember a thread or bug report on this... basically, since the turret itself is outside the bounding box of the main hull, it won't register hits.
-
Did how the game handle objects outside the bounding box change?
I recall being able to have weapons collision with them, but that physical collisions would cause crashes.
The whole bounding box thing is a little stupid IMO...
I'm no coder, but the way the game handles it is kinda...bad, especially when it requires hackish solutions like placing invisible polies on a model to extend its bounding box...
Hackish solutions are terrrrrrible.
-
I don't really like bounding boxes either but they, along with radius, are a quick way to check for things involving model size. Iunno. This could be either a MVPs or SCP problem- if it's the latter, I should note that this actually happened with Ant6d. Dunno about 3.6.12 final.
-
Well, if you want to check the size of something wouldn't it be...kinda necessary to count subobjects as well?
Otherwise its a pretty ****ty estimate, especially for more detailed models which need to be split into chunks to avoid the polies-per-object limit, as well as models with big destructable chunks.
Basically, it isn't good to just assume that the detail0 object...is big enough to cover everything, because it really does not have to.
-
Well, if you want to check the size of something wouldn't it be...kinda necessary to count subobjects as well?
Otherwise its a pretty ****ty estimate, especially for more detailed models which need to be split into chunks to avoid the polies-per-object limit, as well as models with big destructable chunks.
Basically, it isn't good to just assume that the detail0 object...is big enough to cover everything, because it really does not have to.
But it does have to be, because FSO says so.
What you want a "better" answer? Okay, the issue is that to do collisions the algorithm is fundamentally a Big-Oh N squared algorithm, that is every object that needs collision math done for it needs to be checked against every other object that needs collision math. The engine has a max object limit of 2000, this means that if we are at max objects that would 4,000,000 checks that needs to be done every physics tick (which IIRC is around 10 per second. Obviously, the engine doesn't do all of these checks; it has various tricks to avoid doing a lot of the math.
One such trick is to only check the subobjects of an object when something collides with the detail0 object's bounding box. This means that bits that hang outside the bounding box do not get collision detection. But is also means you have a physics engine that can handle 200 ships shooting at each other on a modest machine.
Is it the best solution, no, but it means that we have a usable game engine. This is why SCP will not (dare I say, never) fix this "bug". To be clear this is considered to be working as intended.
Thus, from SCP point of view, this is a data bug, and thus FSU's problem.
I would also like to note that FSO does not calculate the models bounding box, FSO reads the bounding box from the POS and thus assumes the person that generated the POF knows what they are doing and set the bounding box appropriately.
Also, this is not a "feature" exclusive to FSO, basically every game engine ever has done something similar.
-
Eh, that wouldn't be so much pf a problem if you could control the bounding box in any way other than hacking it with phantom polies. (UNGH that's a really ****ty hack, seeing as if you set "Collide Invisible" for whatever reason you may need it all goes to hell.)
Probably something PCS2-side I guess. (It should set detail0's bounding box to include all subobjects and subsubobjects automatically, and allow manual editing of the bounding box as well...)
Off to the PCS2 suggestion board I guess.
-
If hacking extra invisible polies is indeed the only way for PSC2 to generate a POF that has a correctly sized bounding box, then go complain about it in the The FreeSpace Tools Project forum (http://www.hard-light.net/forums/index.php?board=193.0).
-
Looks like esarai has already done that for me.