aframevr / a-painter

🎨 Paint in VR in your browser.
https://aframe.io/a-painter/
MIT License
680 stars 200 forks source link

FEATURE REQUEST - Export painting to obj or similar format for 3d printing. #160

Open mattmillerart opened 7 years ago

mattmillerart commented 7 years ago

We are using AFrame and APainter in a class I teach at KidsDigitalU. We have a makerbot 3d printer and one of the students had the idea to print their painting in 3d!

Maybe the binary save format could be replaced with a more standard format like obj etc. which would support this? This might also afford loading paintings into ThreeJS, unity, etc.? Another option would be to keep the save format but add a "exporter" feature.

From my understanding there are a few formats that would support 3d printing, which are:

Any thoughts on this feature? Would anyone else out there find it useful?

feiss commented 7 years ago

That's amazing, it's great to see A-Painter is actually being used in a classroom!

OBJ exporting is something we actually started to do but is on hold now, we had to move on to work on other stuff.

But we will talk about this (and other nice features we had in the queue) and try to release it asap.

Apart from that, I guess you already know that you cannot 3D print any random model, but it must meet specific requirements about its topology and shape. I say this because I guess flat strokes are not very suitable for 3D printing.. Dunno.

Thank you!

Utopiah commented 7 years ago

Yes as mentioned in #109 then #112 even though .apa from getBinary() was convenient once we want to use what has been created via Apainter we are stuck. It prevents Apainter from being a tool within a larger workflow.

feiss commented 7 years ago

you now have JSON (shortcut j), which is more convenient than APA. But not as convenient as OBJ, sure.

Utopiah commented 7 years ago

@feiss did I miss something or is this JSON still Apainter specific? I quickly tried but it doesn't look like threejs JSON and I couldn't import it in Blender/Clara.io

feiss commented 7 years ago

You didn't miss anything: it's a-painter specific! :P

kfarr commented 7 years ago

Three.js scene to stl https://gist.github.com/kjlubick/fb6ba9c51df63ba0951f

radames commented 7 years ago

I'm also interested in the possibility to export models from the a-frame context, I came across this dedosfera which using a-frame and a three.js to export STLs.

Utopiah commented 7 years ago

I guess it's based on @fernandojsg earlier threejs work https://twitter.com/fernandojsg/status/820792246920445954 but maybe the better way to go now would glTF cf more recently https://twitter.com/fernandojsg/status/895295826255368192

Also a side node but since that issue was created there is https://github.com/dmarcos/a-painter-loader-component

fernandojsg commented 7 years ago

To finish the obj exporter I should modify a couple of things on three.js because it doesn't handle triangle_strips well, but for gltf it could be easier and has the advantage that we could include the material definition and even the textures inside the file itself, so much easier to use later. In fact I started the GLTF exporter from three.js with the a-painter exporter in mind.