WebIO gltf-transform problem(missing model parts) #1648
-
|
Hi,I've written to Three forum some time before about this problem,and i decided to write in a question section directly,because it concerns gltf-transform. So i'll just copy all the text from my previous question: I’m using gltf-transform by @donmccurdy to display KHR_materials_pbrSpecularGlossiness of materials correctly, I did everything like the example through WebIO, the model is displayed, but the problem is that some parts of it are lost , I went to gltf.report, where this library is used and there the situation is the same , then I tried to do the same in 3dViewer and it displayed everything correctly, it is definitely related to gltf-transform, because I tried to load the model without this functionality, it loaded correctly but without textures. The initial model Maybe this is not a problem with the library itself, I just want to know what this could be connected with, such a lack of model components, thanks for understanding. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi @Oleksandr-Fedorov! The result you're seeing is because the materials named "blitzer_ratchet" and "jetpack" have alpha values of 0.0. In general that would result in hiding the object, if perhaps still writing to the depth buffer depending on the viewer, but when the In Blender you'll see: This could be a mistake in the model's authoring – alpha should be non-zero if you want to see the parts, and opaque if no transparency is intended — but you can correct it either in https://gltf.report or in your script with: for (const material of document.getRoot().listMaterials()) {
if (material.getAlpha() === 0.0) {
console.warn('hidden: ', material);
material.setAlphaMode('OPAQUE').setAlpha(1.0);
}
} |
Beta Was this translation helpful? Give feedback.





Hi @Oleksandr-Fedorov! The result you're seeing is because the materials named "blitzer_ratchet" and "jetpack" have alpha values of 0.0. In general that would result in hiding the object, if perhaps still writing to the depth buffer depending on the viewer, but when the
KHR_materials_pbrSpecularGlossinessextension is used in a viewer that doesn't recognize those materials, the alpha isn't applied and the parts still appear.In Blender you'll see:
This could be a mistake in the model's authoring – alpha should be non-zero if you want to see the parts, and opaque if no transparency is intended — but you can correct it either in https://gltf.report or in your script with: