KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.06k stars 1.13k forks source link

VRML -> GLTF : Black faces #1046

Closed nbouayad closed 6 years ago

nbouayad commented 6 years ago

Hello, I am writing a VRML to GLTF/GLB conveter. I am advancing well but I think that I am having problems with normals.I get black faces (I recompute the normals using the normalized sum of faces normals, also tried weighted areas, or weighed angles, but same result). Even if materials do not match (That is another problem...), black faces look like a bug in my processing (I believe) Please see the files below (Note that the GLTF mesh is a merge of the VRML shapes) :

sample.zip

sample.wrl : The original VRML sample.bin + sample.gltf : The resulting GLTF sample-vrml-bottom.PNG : Screenshot of the bottom for VRML sample-vrml-top.PNG : Screenshot of the top for VRML sample-glt-bottom.PNG : Screenshot of the bottom for GLTF sample-glt-top.PNG Screenshot of the top for GLTF

Sorry if It looks dumb, but I am a pragmatic developer, not a 3d expert :) Any help will be appreciated,I am just stuck.

donmccurdy commented 6 years ago

I'm not sure how to help you debug your converter, sorry, but FYI the bufferView uri needs to be changed to sample.bin. With that change you can preview the model in https://gltf-viewer.donmccurdy.com/.

Here's a version of the model with that corrected:

sample 2.zip

screen shot 2017-07-21 at 5 21 18 pm

pjcozzi commented 6 years ago

I don't think there are any other actions here.

@nbouayad please keep us posted on your VRML to glTF converter. We would be happy to list it here: https://github.com/KhronosGroup/glTF#gltf-tools

donmccurdy commented 5 years ago

@nbouayad were you able to get your converter working?