Skip to main content
Question

Transparency issue while transforming OBJ to GLTF.

  • April 8, 2020
  • 1 reply
  • 21 views

I tried converting a OBJ to GLTF.It got converted properly.But the gltf output is transparent.

the mtl of OBJ is:

newmtl texture

Ns 26.4

d 1

illum 2

Kd 1 1 1

Ka 0.2 0.2 0.2

Ks 0 0 0

map_Kd nzl_akl_003.png

 

and the gltf output material is :

"materials" : {

"mat_0" : {

"name" : "texture",

"extensions" : {

"KHR_materials_common" : {

"technique" : "PHONG",

"values" : {

"ambient" : [ 0.2, 0.2, 0.2, 1 ],

"diffuse" : "t_0",

"specular" : [ 0, 0, 0, 1 ],

"shininess" : 128

},

"transparent" : true

}

}

},

The transparency of the gltf is set true by default.How to change this while conversion.I dont want the model to be transparent.What could be reason for by default transparency of the model.How to change this.I cant share the entire data.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

nampreetatsafe
Safer
Forum|alt.badge.img+13

Hi @san!   A colleague of mine suggests that the 

transparent
 flag is set to true set because the texture likely has an alpha band. Converting the texture to a jpeg should result in this flag being removed. However, it is tough to modify a texture which is already on a feature. Some combination of SharedItemXXX transformers (i.e. SharedItemRetriever, SharedItemAdder, etc.)  and a 
RasterBandRemover
 would be required. Hope this helps!