Parik27 / DragonFF

Blender Add-on to edit RenderWare and GTA Formats
GNU General Public License v3.0
373 stars 129 forks source link

Incorrect calculation of bounding box and sphere box on vehicles #327

Closed Shuubaru closed 3 months ago

Shuubaru commented 4 months ago

Calculation of both bounding box and bounding spheres in vehicles is wrong which causes features like fake ground shadow to look weird on some custom vehicles.

Left: exported with another tool - Right: exported with DragonFF

image

inb4 "check your model again for mistakes", this can also be reproduced with vanilla vehicles, i.e with Benson:

Left: Vanilla - Right: Exported from DragonFF without any further edit image

Steps to reproduce with latest DragonFF version downloaded from this repository, and Blender 3.6.5: 1- Import a vanilla vehicle i.e Benson. 2- Export it back without any extra edit. 3- Export the embedded COL3 collision file from both the vanilla and the exported vehicles and compare them in COL Editor II. 4- You can clearly see the differences below: Captura de pantalla (283) Captura de pantalla (284)

While COL Editor II can already recalculate the bounding sphere and box properly by doing Right Click > Bounds > Optimum an in-blender solution would be good. What solution I propose? The solution GTA Tools addon has. This old addon for blender 2.79 let us to preview both Boundings in Blender so we can freely choose the size and position of both boundings which prevents any extra headache caused by automatic calculations: image

Parik27 commented 4 months ago

Please check if the automatic bounds calculation is fixed in #316

Shuubaru commented 4 months ago

Please check if the automatic bounds calculation is fixed in #316

@Parik27 Tested with that build and it works great on both custom and vanilla vehicles! Thanks for the help and also thanks to @jgooderham for fixing this issue. image image

jgooderham commented 4 months ago

Awesome to hear and thanks for testing that. Yea I'm still working on that PR but I'm nearly there. I've just had a lot of work lately. I'm trying to get face group display/generation done (although that's more of a map object thing). But with that we should have pretty much all of the features of collision files implemented so it should be a good addition to the addon.

Shuubaru commented 3 months ago

Tested again with the master branch and the issue seems to resolved after the merge, so I'm closing the issue now.