archilogic-com / data3d-blender-io

Blender exporter for data3d - a binary format optimized for webGL.
http://3d.io
16 stars 4 forks source link

Collada export not working for some 3dio furniture pieces #18

Open bnjm opened 6 years ago

bnjm commented 6 years ago

Reproduce:

I made a small gist here that you can run on node.js to reproduce the problem: https://gist.github.com/bnjm/9ab98822642337346b5d77b70786b6d0

But you can also reproduce with this snippet:

io3d.storage
  .exportDae(
    '/535e624259ee6b0200000484/2017-11-23_21-53_p1lBYj/2017-11-23_21-53-53_pP2nc8.gz.data3d.buffer',
  )
  .then(io3d.utils.processing.whenDone)
  .then(console.log)

Result:

Exported .dae file cannot be opened by xcode or blender. Outputted collada file is here: https://gist.github.com/bnjm/571438f577ed6f2e1f8c0eaf7560fdd6

Additional info:

We think there are other furniture pieces affected and will these to the gist after some more testing

bnjm commented 6 years ago

Ok I think i found the problem. It seems to be caused by special characters in the xml. In the case of the ottoman there is an ampersand in one of the material name attributes:

https://gist.github.com/bnjm/571438f577ed6f2e1f8c0eaf7560fdd6#file-broken-ottoman-dae-L124

EDIT: Can confirm that removing the & from the broken .dae fixes the problem, however I searched the directory for other pieces which would be affected and the ottoman was the only result. Will now set up a validation test with xmllint to see if any other exported dae files fail