Creoox / creoox-ifc2gltfcxconverter

Public repository of Creoox & XeoKit convertion Tool
Other
12 stars 1 forks source link

Saving normals during conversion #14

Open mbalajee opened 1 month ago

mbalajee commented 1 month ago

Seeing weird shadows on the model when rendered on Filament viewer. But the online gltf viewer renders the model correctly. Filament has a fix for desktop version but not for mobile. When reached out, this was their response. More info here

IFC to GLB using this converter Converted GLB re-exported from blender with save normals option
Screenshot 2024-05-14 at 2 26 44 PM Screenshot 2024-05-16 at 11 45 07 AM

Would it be possible to save the normals during conversion? Or do you have any other recommendation ?

ifcapps commented 1 month ago

The creoox converter does not export normals by default. The left screenshot has no normals, or some random normals from the glb viewer. The correct normals are generated by the xeokit viewer, that's why the creoox converter does not export them. Do you use the creoox converter together with xeokit viewer?

mbalajee commented 1 month ago

We use Creoox converter with Xeokit viewer on Web and SceneKit/Filament on Mobile (iOS/Android). Yeah not having the normals / incorrect normals generated by the viewer is the issue. Since we use the converted glb files on other viewers (Scenekit/Filament) we would like to have the option of exporting the normals

WlodCreoox commented 1 month ago

Hi @mbalajee, Please contact us directly via https://creoox.com/en/3d-viewer/contact-3d-viewer/

ifcapps commented 1 month ago

Ok, exporting normals into glTF/glb files will be an option in the next beta version this week. Also quantization compression will be an option, which reduces the glb file size significantly. I will notifiy here when the beta version is ready.

xeolabs commented 1 month ago

@ifcapps Just an FYI that glTF nodes with name attributes is essential for differentiation and identification of the IFC elements (in case that conflicts with quantization technique).

ifcapps commented 1 month ago

I just uploaded a beta version with optional optional export of normal vectors and optional quantization in glb/glTF. Normal vector export leads to a 3x duplication of coordinates, because glTF does not support indexed normal vectors.

With one typical IFC test file with a size of 260 MB, these are the glb file sizes:

Standard compression (re-use of buffers) is enabled in all 3 cases. All 3 files look exactly the same in a glTF viewer like this one: https://gltf-viewer.donmccurdy.com/

How to use these options, please see the pdf documentation in the release package.