Wrong transparent node setup in GLTF import #63489

Closed
opened 2019-04-11 12:33:00 +02:00 by nurbson · 9 comments

System Information
Operating system: Linux and Windows
Graphics card: NVidia GTX 1060 6GB

Blender Version
Broken: 2.80, a3b88c917299, 2019-04-10

Short description of error
The GLFT/GLB importer has wrong transparency factor on transparent materials for Transparent BSDF

Exact steps for others to reproduce the error
My usecase is a bit more complex since I generate my glb files from a threejs scene. But steps to reproduce are:

  • create an object3D in threejs with this material
MeshStandardMaterial( {
          color: new THREE.Color(0xDDDDDD),
          transparent: true,
          opacity: 0.2,
          shininess: 10000,
          transparencyMode: 2
      })
  • export a glb file
  • open a new scene in blender 2.80
  • import the glb

The material nodes are setup correctly but the factor for the mix shader should take the opacity value of the glb material for the transparent BSDF node.

imported.png

correct.png

**System Information** Operating system: Linux and Windows Graphics card: NVidia GTX 1060 6GB **Blender Version** Broken: 2.80, a3b88c917299, 2019-04-10 **Short description of error** The GLFT/GLB importer has wrong transparency factor on transparent materials for Transparent BSDF **Exact steps for others to reproduce the error** My usecase is a bit more complex since I generate my glb files from a threejs scene. But steps to reproduce are: - create an object3D in threejs with this material ``` MeshStandardMaterial( { color: new THREE.Color(0xDDDDDD), transparent: true, opacity: 0.2, shininess: 10000, transparencyMode: 2 }) ``` - export a glb file - open a new scene in blender 2.80 - import the glb The material nodes are setup correctly but the factor for the mix shader should take the opacity value of the glb material for the transparent BSDF node. ![imported.png](https://archive.blender.org/developer/F6930783/imported.png) ![correct.png](https://archive.blender.org/developer/F6930787/correct.png)
Author

Added subscriber: @nurbson

Added subscriber: @nurbson
Julien Duroure was assigned by Brecht Van Lommel 2019-04-11 12:35:35 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

Please attach the .glb file to reproduce the issue.

Please attach the .glb file to reproduce the issue.
Author

Here is the glb. You need to scale it to 0.01 after import since our measurement in the threejs scene is in cm, not meters.
Besides: The UV maps are messed up, too. But I'm still trying to find our where the problem is.

schrank (3).glb

Here is the glb. You need to scale it to 0.01 after import since our measurement in the threejs scene is in cm, not meters. Besides: The UV maps are messed up, too. But I'm still trying to find our where the problem is. [schrank (3).glb](https://archive.blender.org/developer/F6930818/schrank__3_.glb)
Member

Discussion will take place in upstream issue tracker:
https://github.com/KhronosGroup/glTF-Blender-IO/issues/424

Discussion will take place in upstream issue tracker: https://github.com/KhronosGroup/glTF-Blender-IO/issues/424
Member

I not agree with the analysis.
Factor of the mixShader node will do the following : 1 for transparent, 0 for opaque.
The Add node is used as factor. So if you have an alpha of 0.2, you have to set factor to 0.8.
The second image is wrong, because add 0.8 and 0.2 --> full transparent because of factor of 1.0

I not agree with the analysis. Factor of the mixShader node will do the following : 1 for transparent, 0 for opaque. The Add node is used as factor. So if you have an alpha of 0.2, you have to set factor to 0.8. The second image is wrong, because add 0.8 and 0.2 --> full transparent because of factor of 1.0

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Note that Principled shader now has an Alpha value too…

Anyway, More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.

Note that Principled shader now has an Alpha value too… Anyway, More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#63489
No description provided.