3d object is broken when displayed on three js but not on windows 3d viewer

Hello,
I have a 3d fbx file, then converted to glb. Everything was fine with most of the files, until I saw a 3d object with broken geometry.
I tried opening the original fbx file on the default windows 3d viewer on windows 10, and it still looks ok. But when viewing that file on three js, it is broken like the image below.
I also tried opening it on babylonjs and the results were no better.
I don’t know how to deal with such objects.

A little baffled that these are screenshots of the same model. Possible to share the model, or one with similar issues? If you open the model on https://gltf.report/ and open the “Metadata” tab, I’d be curious what’s the “Mode” for the meshes, and whether the materials use alpha blending.

2 Likes

How are you converting the FBX to GLB?

1 Like

@manthrax I use fbx2gltf to convert, then use gltf transform to simplify models…
But, I mean, this issue appear not began after be converted to glb stage.
Its happen also with the .fbx original. When I load with fbxloader, it’s also broken.

@donmccurdy I attached my fbx, glb file to track.
Sample_BienDienAp_Tu1Pha123kV.fbx (3.6 MB)
Sample_BienDienAp_Tu1Pha123kV_mapped_LOD0.glb (4.3 MB)

gltf.report seems to be able to fix your model with its MESHOPT compression export (either Mesh or Scene quantize option works, with Scene producing a smaller file size).

The scale of your model appears to be enormous.

2 Likes

Uhmm, I just tried to save as from fbx to glb by 3d viewer of windows. It seem had good result.
Sample_BienDienAp_Tu1Pha123kV.glb (6.6 MB)

The problem does seem to be the scale of the scene, and very large offsets included in the vertex data. The ‘center’ of the scene is hundreds of kilometers from the origin.

This makes it difficult for viewers to display the scene at good precision. I think the ideal fix here would be to separate out just one of the repeated structures, center it at the origin, apply all transforms (in Blender or other software?) and then export that. It might be easiest to start from the source FBX, but perhaps other optimization pipelines that happen to apply transforms could help too.

2 Likes

From what it appears, this model was done in autocad, but the .fbx export is either buggy or outdated and the converters seem to have a hard time understanding the model.

1 Like

I just tried with blender.
Problem fixed. So maybe I will update something to my flow.
Thank you everybody :slight_smile:

1 Like