Author Topic: Dimensions and Bounding box issues on save  (Read 3744 times)

0 Members and 1 Guest are viewing this topic.

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Dimensions and Bounding box issues on save
So, working on mjn.mixaels missiles, I ran into the following issue.
(This example is from the Cyclops (Belial))

PCS2 2.1 11/29/2010
DAE/PMF;
H:1.74, W: 1.66, D: 6.80 (matches retail sans the modeled thruster cone)
Bounding Box Min: -0.83, -0.77, 0.00
Bounding Box Max: 0.83, 0.97, 6.80
Radius: 6.806166

Either DAE or PMF to POF:
H: 2.18, W: 2.10, D: 7.24
Bounding Box Min: -1.05, -0.99, -0.22
Bounding Box Max: 1.05, 1.19, 7.02
Radius: 7.196439

The hell?

Edit: All three dimensions are getting 0.44 added to them.
« Last Edit: December 01, 2010, 06:59:09 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Angelus

  • 210
  • The Angriest Angel
Re: Dimensions and Bounding box issues on save
this happens with all models in all versions. i always thought that pcs2 is supposed to work that way, until i heard that it's not.

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Dimensions and Bounding box issues on save
I believe this is intentional. The BSP code adds a little bit extra to the bounding boxes. If you resave a POF with cached BSP data you should get a different bounding box, which may or may not have 0.1/0.2 added to everything.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Dimensions and Bounding box issues on save
Not fine. Look at retail POF (ex: Belial). When in subobject view, the bounding box closely follows the mesh (in orthographic view)

On the retail model if you add the sub-object for the thruster dimensions to the detail0 dimensions you get the header reported dimensions.

I can't go making the models .44 smaller on all dimensions for fear of the bounding box (and thus hit detection and collision detection) being thrown off by it just to compensate.
Especially when the PMF can apparently save it out just fine.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Dimensions and Bounding box issues on save
It turns out that the model comment saving code is only saving the first comment so it always rebuilds the BSP data.

Still, if you save twice, you should see a difference between the two files. If you download a new build now it won't add anything extra to the bounding boxes in the latter case. The POF radius seems to be calculated by using the distance from (0,0,0) to the furthest bounding box corner instead of the furthest vertex though.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Dimensions and Bounding box issues on save
Code: (pcs2.exe) [Select]
Warning OGL reported "invalid value" at .\geo_sphere.cpp (190) please report this issue

Occurred with 12/01/2010 version when opening .pmf saved with 11/29/2010 version.

EDIT: Still getting dimension changing padding taking place. Glad that the Model Comments was fixed, though.

EDIT2: So, opened the saved POF and saved it again directly as a new copy, and I have the dimensions that I want and that I specified. I can deal with that.
* Zacam hugs Spicious in a purely platonic happy way

Thank you.
« Last Edit: December 02, 2010, 02:22:04 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Dimensions and Bounding box issues on save
Interesting. Try a new build now. You might want to clear the BSP cache for anything saved previously.

Edit: subobject/model radii are still the same though.

Edit2: try this if you're still getting the OGL thing.
« Last Edit: December 02, 2010, 02:37:38 am by Spicious »

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: Dimensions and Bounding box issues on save
12/02/2010 Version:
DAE/PMF to POF with PurgeBSP cache: I don't have to open and re-save the POF for dimensions.

Also, no OGL Error reported on the PMF from earlier. (It may have been a fluke) If it happens again with any other models, I'll immediately determine if it's reproducible and try the other build.

**EDIT: Crop. Bounding Box Min and Max are swapped. Or atleast, are read by DAE and saved to PMF as swapped. Saving as POF is still fine.
**Edit 2: Hmm. Or not, may have just been that DAE, but I'll keep my eye on it.

**Edit3: Hmm. I keep getting strange holes in my geometry on some models with 12/02/2010.
« Last Edit: December 02, 2010, 06:34:50 am by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Dimensions and Bounding box issues on save
**Edit3: Hmm. I keep getting strange holes in my geometry on some models with 12/02/2010.
Not too surprising. The fudge margins were there for a reason. Try it with a new build. Reproduceable holes would be useful too.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Dimensions and Bounding box issues on save
12/02/2010 Version:
**Edit3: Hmm. I keep getting strange holes in my geometry on some models with 12/02/2010.

I have been getting this a lot as well.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Dimensions and Bounding box issues on save
Has anyone checked for holes with a newer build?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Dimensions and Bounding box issues on save
I haven't checked yet with a newer build, but I did figure out the general area that was causing the holes. It had something to do with triangulation. When I exported my models as DAE, I usually let OPENCollada do the triangulation, in a few select cases, the triangulation was bad and causes holes, when I turned that off for those models the holes were fixed.

The issue is still with PCS2 though, because I did do some testing. I imported several of the DAEs that resulted in POFs with holes into 3DS Max, and there were definitely not any holes anywhere. I also noticed that the holes are only visible after the conversion to POF. In other words, I had to export from Max, then save as POF, then open the POF to check for holes.

Anywho, I'll do some checking with the latest version when I get home today.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Spicious

  • Master Chief John-158
  • 210
Re: Dimensions and Bounding box issues on save
I give up. The bsp stuff is now back to what it was before, but bounding box and radius calculations should be consistent with :v: models.