Export FreeCAD to WebGL and Test run Augmented Reality

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Export FreeCAD to WebGL and Test run Augmented Reality

Post by chakkree »

From "Augmented Reality For the Web", threex.webar. as link https://github.com/jeromeetienne/threex.webar
I exported FreeCAD model to WebGL, then use NotePad++ copy code from output file and replace to Part that added an object in the markerObject3D. Replace variable named "scene" in WebGL to "markerObject3D"

The Model example size is very small because a width of a marker is 1 unit equal to 1 unit in WebGL export file. That cause my model only about 3 mm.
AugmentedReality_from_FreeCAD.png
AugmentedReality_from_FreeCAD.png (994.08 KiB) Viewed 4795 times
TestModelHome03.FCStd
(90.11 KiB) Downloaded 103 times
I'm hard to explain. get the Code. (อธิบายด้วยภาษาไทยยังยากเลย ภาษาอังกฤษยิ่งยากขึ้นไปอีก :P)
TestFreeCAD2AR.zip
(196.33 KiB) Downloaded 130 times
In future, I think FreeCAD can export to play on Augmented Reality.
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Export FreeCAD to WebGL and Test run Augmented Reality

Post by chakkree »

Test Augmented Reality.
https://www.jCivil.com/freecad/AR/test/ ... eeCAD.html

OK! the demo can work, WebRTC wants to use https.
I upload the Zip file to the web host and unzip for a test.
show the marker on webcam, you can see the model display on the marker.

1.Print the marker from http://terpconnect.umd.edu/~jwelsh12/en ... ergen.html
2. Or use marker display on mobile http://terpconnect.umd.edu/~jwelsh12/en ... ding_mm=10
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Export FreeCAD to WebGL and Test run Augmented Reality

Post by rockn »

:o :shock: This is working so great ! Well done :)

Working on Chromium 51.0,
Not working on Firefox 47.0 (lacking of MediaStreamTrack.getSources() )
Formations - Assistance - Développement : https://freecad-france.com
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Export FreeCAD to WebGL and Test run Augmented Reality

Post by chakkree »

Test on my Android phone.
TestFromAndroidPhone.png
TestFromAndroidPhone.png (474.55 KiB) Viewed 4680 times
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Export FreeCAD to WebGL and Test run Augmented Reality

Post by chakkree »

@RockN Prepared for the future.
Enhancing FreeCAD(BIM) with Augmented Reality. :lol:
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Export FreeCAD to WebGL and Test run Augmented Reality

Post by triplus »

Looking good.
Post Reply