cvdlab / react-planner

:pencil2: A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
https://cvdlab.github.io/react-planner
MIT License
1.3k stars 460 forks source link

Collada Exporter #177

Open ghost opened 5 years ago

ghost commented 5 years ago

@JaccoGoris I have just tried out your Collada Exporter, but I get some errors. Am I doing something wrong?

This is what my 3D model looks like in the browser: collada-exporter-1

And here is what it looks like in view3dscene, after Collada export:

collada-export

Here are the errors I get:

view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: <param> type "uint8" is not supported
view3dscene: Collada warning: Indexes in <p> suddenly end, in the middle of a vertex
view3dscene: VRML/X3D warning: Invalid index for field TextureCoordinate(Mesh2-texcoord).point (MFVec2f)
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-2.png": Unable to open file "/home/Downloads/image-2.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-1.png": Unable to open file "/home/Downloads/image-1.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-4.png": Unable to open file "/home/Downloads/image-4.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-3.png": Unable to open file "/home/Downloads/image-3.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-6.png": Unable to open file "/home/Downloads/image-6.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-5.png": Unable to open file "/home/Downloads/image-5.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-8.png": Unable to open file "/home/Downloads/image-8.png"
view3dscene: Texture warning: Error EFOpenError when loading texture from URL "file:///home/Downloads/image-7.png": Unable to open file "/home/Downloads/image-7.png"
JaccoGoris commented 5 years ago

Ooh, that's interesting.

Under the hood, it uses the normal threejs Collada export, which works for most 3D software like Blender, 3Ds Max, etc, and everything that imports using the assimp library.

It seems like this software doesn't fully support the Collada format. can you try with blender and see what comes out? Thanks!

ghost commented 5 years ago

Blender works fine: Screenshot from 2019-06-26 10-51-59

Do you know if it also works as fine in SketchUp?

JaccoGoris commented 5 years ago

It should, as far as I can remember sketchup had very good collada support