Modding, Mission Design, and Coding > FS2 Open Tools

Dimensions and Bounding box issues on save

(1/3) > >>

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
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.

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.

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.

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.

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.


[0] Message Index

[#] Next page

Go to full version