Author Topic: Bounding Box error in PCS2.1 Alpha  (Read 3547 times)

0 Members and 1 Guest are viewing this topic.

Offline esarai

  • 29
  • Steathy boi
    • Minecraft
Bounding Box error in PCS2.1 Alpha
Hey Gents, just wanted to let you all know that I found the PCS2.1 Alpha to incorrectly account for subobject bounding boxes.  The overall ship bounding box is too small for sections of the gun turrets, and thus half the barrels are not registering in collision detection.  Here's a link to the quasi-modpack that revealed this issue.

http://www.mediafire.com/?w52tt3d1joas18k

I guess I'll also ask in the features thread for manual editing of the main bounding box, just as a failsafe for any similar occurrences. 
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Bounding Box error in PCS2.1 Alpha
That's not a bug. The definition of bounding box is the smallest box all parts of an object can fit into.  Thus detail0 has a bounding box just big enough for all of it to fit into not it's subobjects.  This is true in modeling programs as well.  If any subojects are outside of that bounding box then they will not have proper collision detection. 

There are 2 workarounds.  First is to move the subobject to 0,0,0 in the modeling program then move it back in PCS2.  This only works if the subobject fits in the bouding box when moved.  The second method is to place a small invisible cube (invisible texture that is) at the extents of +- X,y,z of the farthest poly on each subobject to extend the detail0 bounding box. You then need "dont collide invisible" in the ships flags.  BTW if you look at some of V's shipt they did this so it's not a new thing.   

Still a way to resize the bounding box in PCS2 would be great.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline esarai

  • 29
  • Steathy boi
    • Minecraft
Re: Bounding Box error in PCS2.1 Alpha
Thanks for the workarounds!  You're a lifesaver!

If any subojects are outside of that bounding box then they will not have proper collision detection.  

Yikes, I don't know about you, but that feels like an incredibly broken definition.  It seems as if the working definition of the header bounding box is that of the entire ship, not just detail0, and hence why I view it as a bug, because it can break models. Since the practical application of the bounding box requires that it be modified anyways, it might be prudent to have PCS2 make the header bounding box the bbox for the entire model, not just for detail0.

Unless of course that would break something or be unfeasible to implement, at which point a header bbox editor/visualizer would be excellent.

Thanks again!
« Last Edit: September 13, 2010, 09:53:54 pm by esarai »
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Bounding Box error in PCS2.1 Alpha
Remember modeling programs don't care about hierarchy it's just an object to them.  Anything under it is another object.  If you show bounding boxes in the modeling program and highlight detail0 that is the same bounding box you get in game. 

I wouldn't go as far as the automatic detail0 and all subobject thing as that could have implications with object that aren't supposed to have collision detection.  A simple way to resize the bounding box would be best.  Of course an auto-calc would be icing on the cake. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Bounding Box error in PCS2.1 Alpha
It would have to take into account allowable subobject motion, at least rotation, as we don't have translation yet.  Is the rotation predictable without defining in its axis in the model?  You were telling me the other day it's not necessary, but it seems like this is a case where it would be helpful at least.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Bounding Box error in PCS2.1 Alpha
Well it would have to calculate it using uvec/fvec just as the game does as turrets do not necessarily have their rotation on the x,y, or z axis. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Kusanagi

  • A man, a van, a plan, Vanama!
  • 27
  • Enemy vessel captured
Re: Bounding Box error in PCS2.1 Alpha
Why not have an ability in PCS2 to define the bounding box or autogenerate it like it does with paths and MOI? You would just need to input two fields for the coordinates of the lower right point and the upper right point on opposite corners of the box.

I too am noticing this when trying to get the turanic ion frigate to extend its wings.
Cum historia
mutat valde Razgriz
revelat ipsum
primum daemon scelestus est.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Re: Bounding Box error in PCS2.1 Alpha
PCS2 should already be setting the bounding box for detail0 to fit all subobjects ...
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Bounding Box error in PCS2.1 Alpha
It never has as long as I've used it. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Bounding Box error in PCS2.1 Alpha
It doesn't but it really ought to...
* Droid803 points to errors cropping up in FSU models

"Hacking" it with phantom polies doesn't sound like a real solution.
(´・ω・`)
=============================================================

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Bounding Box error in PCS2.1 Alpha
You can also get around it by making any LOD contain the whole model.  Quite a few older models only worked because detail1, 2, or 3's bounding box was big enough for the model to fit.  There is a problem with this method as well.  The target box is determined by the detail0 bounding box so the entire ship does not fit in the box.

Another method that was used some time ago was setting the center of all objects to 0,0,0 then moving them back to the actual coordinates in PCS2.  This actually gave them proper collision detection even if they were outside the bounding box.  Drawbacks to this method were inverted bounding boxes if the same piece was on both sides of the model.  Symmetrical left and right turrets for instance. 

So there have been a lot of workarounds over the years.  Even :v: used the invisible box method.  So being able to specify a bounding box would be almost a dream feature.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Bounding Box error in PCS2.1 Alpha
Well, the bounding box is just a bunch of numbers stored in the POF file right?
It's not like it's calculated by the game.

I've hacked the Radius of models in a hex editor and allowing that to be changed in PCS2 as well would be nice.
(´・ω・`)
=============================================================

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: Bounding Box error in PCS2.1 Alpha
but PCS2 is supposed to be a model editor, you can move models around and supposedly at some point in the future you'll be able to edit the geometry, for this reason PCS2 MUST rebuild all the bounding box and radius data on the fly.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Bounding Box error in PCS2.1 Alpha
Yup, it edits the native PMF format, it only exports to POF from that.  It doesn't live edit a POF file.  But having a small toolset of POF editing options built in could be useful.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays