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

Export (geometry & appearance) Not Like Blender Original #51

Closed
DrX3D opened this Issue Jul 21, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@DrX3D

DrX3D commented Jul 21, 2017

I took the HOUSE model from Blend Source (https://www.blendswap.com/blends/view/15091) to try out the exporter. I opened it in the latest release of Blender (V2.78c) with the export code downloaded and installed yesterday (2017-07-20). I exported the model to a binary glTF format and loaded it in Don McCurdy's glTF viewer (https://gltf-viewer.donmccurdy.com/).

Original:
blender

Binary glTF
gltfbinary

The results are not the same.
Geometry

  • The front steps and roof are not on flat piece. It appears that the normals may be reversed.
  • There is something unexpected going on at ground level under the 4 front windows.
  • Roof geometry appears inverted. This may be the same problem as the first bullet

Appearance:

  • The Blender model is flat colored (not necessarily a flat shading), while the one in the glTF viewer is very reflective.
  • The windows are transparent in Blender and interior detail is visible, not in glTF

The text-based glTF file does not display at all in the viewer. I also exported in X3D and used BitManagement's BS Contact viewer. That model & display shows the same geometry issues, but is closer to Blender in appearance.
x3d

I am not sure if the problem is the exporter or the glTF2 loader (or even something else), but this seemed the best place to start. I am not really Blender-knowledgeable so the problem may be in something I didn't do or am looking at it incorrectly.

@UX3D-nopper

This comment has been minimized.

Show comment
Hide comment
@UX3D-nopper

UX3D-nopper Jul 21, 2017

Contributor

Okay, I analyzed the model regarding geometry:
grafik
The screenshot is from the edit mode from the front roof. Also, I enabled face normal rendering. As you can see - the normals are not correct. The reason, why Blender renders this correct is, that the mesh is marked double sided.
I assume, the rest of the geometry artifacts are the same.
As described in the user documentation, the double sided flag comes from the material and not the mesh.
https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md
Thats the reason, why you have these artifacts.
How to solve this? Recalculate/set the normals at the errenous places.

Appearance:
Also mentioned in the docs, the Blender material is not a PBR glTF 2.0 material and so no materials are exported. This means, the default material is used. So all color, texture information, alpha etc. gets lost.

To summarize:

  • It is not a viewer and/or exporter bug.
  • The scene needs some rework to render properly.

grafik

Contributor

UX3D-nopper commented Jul 21, 2017

Okay, I analyzed the model regarding geometry:
grafik
The screenshot is from the edit mode from the front roof. Also, I enabled face normal rendering. As you can see - the normals are not correct. The reason, why Blender renders this correct is, that the mesh is marked double sided.
I assume, the rest of the geometry artifacts are the same.
As described in the user documentation, the double sided flag comes from the material and not the mesh.
https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md
Thats the reason, why you have these artifacts.
How to solve this? Recalculate/set the normals at the errenous places.

Appearance:
Also mentioned in the docs, the Blender material is not a PBR glTF 2.0 material and so no materials are exported. This means, the default material is used. So all color, texture information, alpha etc. gets lost.

To summarize:

  • It is not a viewer and/or exporter bug.
  • The scene needs some rework to render properly.

grafik

@UX3D-nopper

This comment has been minimized.

Show comment
Hide comment
@UX3D-nopper

UX3D-nopper Jul 21, 2017

Contributor

Thanks a lot that you took so much time to investigate this. Sorry, that I cannot help u further.

There will be an extension to glTF 2.0, called KHR_materials_cmnBlinnPhong. With this extension, it will also be possbile to export these materials as well.

Meanwhile, you need to convert the materials to PBR ones.

Contributor

UX3D-nopper commented Jul 21, 2017

Thanks a lot that you took so much time to investigate this. Sorry, that I cannot help u further.

There will be an extension to glTF 2.0, called KHR_materials_cmnBlinnPhong. With this extension, it will also be possbile to export these materials as well.

Meanwhile, you need to convert the materials to PBR ones.

@DrX3D

This comment has been minimized.

Show comment
Hide comment
@DrX3D

DrX3D Jul 21, 2017

Thank you for your detailed response. That information helps a lot and I will be able to bring it to the Blender BOFs during SIGGRAPH. I see that knowing the target and how you are going to get there is still very important.

DrX3D commented Jul 21, 2017

Thank you for your detailed response. That information helps a lot and I will be able to bring it to the Blender BOFs during SIGGRAPH. I see that knowing the target and how you are going to get there is still very important.

@UX3D-nopper

This comment has been minimized.

Show comment
Hide comment
@UX3D-nopper

UX3D-nopper Jul 23, 2017

Contributor

Maybe you have a look at this:
#53
We received a pull request, that as much PBR materials as possible are exported - without breaking the metallic roughness workflow.

Contributor

UX3D-nopper commented Jul 23, 2017

Maybe you have a look at this:
#53
We received a pull request, that as much PBR materials as possible are exported - without breaking the metallic roughness workflow.

@MiguelAlgaba

This comment has been minimized.

Show comment
Hide comment
@MiguelAlgaba

MiguelAlgaba Apr 22, 2018

Hi, I'm experiencing a similar issue with transparent materials when exporting them to .glb format. I tried exporting the sample polly scene to binary format and then loaded it with http://sandbox.babylonjs.com. Interestingly the transparent display doesn't appear transparent when I export the polly scene, however it does appear transparent when I load the glTF-Blender-Exporter/polly/project_polly.glb file. I installed the glTF exporter add-on corresponding to master (commit 504a525) and I was using Blender 2.79b 2018-03-22 for Mac. I was running macOS High Sierra 10.13.4. I checked the Export materials check-box is marked when doing the export and the other materials look apparently correct, should I enable other export settings maybe?

Thanks for all the great work!

MiguelAlgaba commented Apr 22, 2018

Hi, I'm experiencing a similar issue with transparent materials when exporting them to .glb format. I tried exporting the sample polly scene to binary format and then loaded it with http://sandbox.babylonjs.com. Interestingly the transparent display doesn't appear transparent when I export the polly scene, however it does appear transparent when I load the glTF-Blender-Exporter/polly/project_polly.glb file. I installed the glTF exporter add-on corresponding to master (commit 504a525) and I was using Blender 2.79b 2018-03-22 for Mac. I was running macOS High Sierra 10.13.4. I checked the Export materials check-box is marked when doing the export and the other materials look apparently correct, should I enable other export settings maybe?

Thanks for all the great work!

@donmccurdy

This comment has been minimized.

Show comment
Hide comment
@donmccurdy

donmccurdy Apr 22, 2018

Member

@MiguelAlgaba thanks for catching this — I've filed a new issue: #199

Member

donmccurdy commented Apr 22, 2018

@MiguelAlgaba thanks for catching this — I've filed a new issue: #199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment