Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving normals during conversion #14

Open
mbalajee opened this issue May 16, 2024 · 6 comments
Open

Saving normals during conversion #14

mbalajee opened this issue May 16, 2024 · 6 comments

Comments

@mbalajee
Copy link

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
Copy link
Collaborator

ifcapps commented May 19, 2024

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
Copy link
Author

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
Copy link
Collaborator

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

@ifcapps
Copy link
Collaborator

ifcapps commented May 22, 2024

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
Copy link
Collaborator

xeolabs commented May 22, 2024

@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
Copy link
Collaborator

ifcapps commented May 23, 2024

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:

  • with normal vector export, no quantization: 110 MB glb file
  • without normal vector export, no quantization: 35 MB glb file (standard config to use with xeokit)
  • without normal vector export, with quantization: 4.1 MB glb file

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants