Xenonsmurf / FFxi-Navmesh-Builder

c# Application to help build navigation meshes for FFXI using collision data and Recast Detour.
GNU General Public License v3.0
12 stars 10 forks source link

[BUG] Ceizak Battlegrounds .obj produces strange results when viewed in object viewers #7

Closed Darkdoom22 closed 1 year ago

Darkdoom22 commented 1 year ago

Describe the bug After building the Ceizak Battlegrounds object file, opening it in recast or another object viewer will display what appears to be a straight line and nothing else.

To Reproduce Build an object file for Ceizak Battlegrounds

Expected behaviour The zone object to be properly displayed when viewed

Screenshots N/A

Desktop (please complete the following information):

Additional context Bug Cause: This problem appears to be caused by a set of vertices in the ceizak .dat data with extremely small Z values (approx. -9932914.0f)

Possible Solution: modifying the vertice parsing code to skip adding these vertices to the vertice list results in an object file being dumped that is properly rendered when viewed.

Xenonsmurf commented 1 year ago

Well spotted, This has now been fixed.

See here: https://github.com/MurphyCodes/FFxi-Navmesh-Builder/blob/main/src/FFXI%20Navmesh%20Builder/Common/dat/Types/MZB.cs#L384

all collision meshes have been remade to test if this fix alters other meshes, it does not. All collision.obj's now build without issue.

thank you for spotting the issue and the solution!.

image

regards.

/xen