KhronosGroup / COLLADA2GLTF

COLLADA to glTF converter
Other
523 stars 155 forks source link

collada with LineSegments elements fails to generate GLTF or GLB #216

Open ua4192 opened 5 years ago

ua4192 commented 5 years ago

Hello.

I have tried with all releases of collada2gltf and in all them I am facing the same issue.

I have downloaded and tested all releases from: https://github.com/KhronosGroup/COLLADA2GLTF/releases

When you try to convert a collada file which contains LineSegments elements inside, the convertor fails and doesn't generate the GLB or GLTF file.

Tested versions: https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.4/COLLADA2GLTF-v2.1.4-windows-Release-x64.zip https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.3/COLLADA2GLTF-v2.1.3-windows-Release-x64.zip https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/dependencies/COLLADA2GLTF-dependencies-windows-Release-x64.zip https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.2/COLLADA2GLTF-v2.1.2-windows-Release-x64.zip https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.1/COLLADA2GLTF-v2.1.1-windows-Release-x64.zip https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.0/COLLADA2GLTF-v2.1.0-windows-Release-x64.zip https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.0.0/COLLADA2GLTF-v2.0.0-windows-Release-x64.zip

Is there any fix available for this?

Best regards

lasalvavida commented 5 years ago

Hi @ua4192. Line segments should work. Could you attach the model you're having trouble with?

ua4192 commented 5 years ago

Sure.

: )

Here you have an example:

test.zip

Best regards

ua4192 commented 5 years ago

Hello.

Any news?

Best regards

lasalvavida commented 5 years ago

Hi @ua4192, the file you attached segfaults OpenCOLLADA's parsing while parsing one of the elements. I haven't done much more digging into this than that yet.

Likely this means something is malformed in your COLLADA model. That being said, OpenCOLLADA shouldn't segfault on bad data so it will probably need some changes as well.

ua4192 commented 5 years ago

Hi

I have tested the gltf exporter and collada loader published for threejs and I have been able to load the same file and export it to glb, of course by now without draco compression, anyway the conversor worked without any problem.

The point is that if I remove the lines from the collada file, your conversor works without problems. This was the reason I thought the problem resided on lineSegments.

Best regards

ua4192 commented 5 years ago

Hi. Finally I have aided my own collada2gltf convertor using nodejs and available threejs and gltf-pipeline modules. My convertor can convert the collada,fbx,obj,wrl files with linesegments without any problem. Of course is slower than your compiled binary. I will be waiting for a fix for this bug Many thanks in advance for your support