Jump to content

WASM Support


MasterSplinter
 Share

Recommended Posts

Haven't been around in a bit but still actively use babylon for a lot of demos...  Has anyone messed around with this yet?

https://github.com/AssemblyScript/assemblyscript

Over the past few months I've found myself breaking web vs native rules left and right switching over to web assembly.  Just curious if anyone else here has been experimenting with transpiling babylon.

-Patrick

 

Link to comment
Share on other sites

Hey Patrick... While, didn't transpile, did figure out how to re-animate ar.js into babylon for AR. Works fine. The jsartoolkit underneath was a super big wasm blob.

Always dreamed of starting from that side. Like +1, for "breaking web vs native rules"... I know some radiated turtles...looking for a start.

Care to share steps?  :D

 

Link to comment
Share on other sites

Jsartoolkit really is only opencv 2.4 and aruco.  It’s quite old I got opencv 3.4 to transpile using Ubuntu system headers ninja build system and newest version of emscripten.   Really Ubuntu is the secret sauce will break on Mac or windows.  Was hoping assembly script had legs cause c++ is painful.

Link to comment
Share on other sites

9 hours ago, aFalcon said:

Hey Patrick... While, didn't transpile, did figure out how to re-animate ar.js into babylon for AR. Works fine. The jsartoolkit underneath was a super big wasm blob.

Always dreamed of starting from that side. Like +1, for "breaking web vs native rules"... I know some radiated turtles...looking for a start.

Care to share steps?  :D

 

Piggybacking off that here's what disney did with their markers:

https://next.reality.news/news/disney-has-figured-out-make-ar-content-react-real-world-obstacles-0181601/

Attach collider to marker and ragdoll your AR critter.

Link to comment
Share on other sites

Patrick, Sorry to go off-topic as I haven't tried AssemblyScript compiler.  I did briefly browse the assemblyscript compiler tests, but too hard to tell from that how far along the support is.  Did you get babylonJS working with openCV 3.4 or with non-ArUco markers?  Looks like AR.js is using ThreeJS webglrenderer even for BabylonJS demo.  I am interested in more recent WebAssembly starting points for BabylonJS AR with no THREE dependencies... thanks.

Link to comment
Share on other sites

i did in fact.  my translation matrix data was slightly off but i was able to use any image as a marker and get the correct rotation matrix data.  i moth balled the project because of performance issues but found a solution to that by processing the images in a compute shader.  ahem gpu.js  i firmly believe arkit/arcore can run in a web browser at native speed.

Link to comment
Share on other sites

@MasterSplinter afalcon is an old c++ guy... :)

emscripten, Ubuntu... +1 for the tip.

"Hoping Assembly script has legs"... <--Mental-Note-->.

...

 

"AssemblyScript Compiler" thx +1 Mr. @brianzinn

3 hours ago, brianzinn said:

AR.js is using ThreeJS webglrenderer even for BabylonJS demo.

"It's all true... all of it!" - Han Solo

 

THREE Dependencies was removed, a couple quick examples exist... happy to post...please ask.

... [dual-rendering][then shut off the camera][Mr. Jerome did make the change, and a solo babylon ar.js is ....beyond the outer rim]...

...[but the more recent suggestion is also good - no time, need to do both]....

...

"Collider to marker"... ah jeez. Nice!

Yep that's all it is ... lol. Good call.

-> gpu.js ah,k. (my translation matrix... was also slightly off, Jerome froze... it. That seemed to work. Dunno why.)

Link to comment
Share on other sites

1 hour ago, MasterSplinter said:

i firmly believe arkit/arcore can run in a web browser at native speed.

Very cool. With you guyz...

Ready to move on that, in ~like~ a month...

Have a little node server needs crankin out and taxes (stuf like that).

Link to comment
Share on other sites

1 minute ago, aFalcon said:

Very cool. With you guyz...

Ready to move on that, in ~like~ a month...

Have a little node server needs crankin out and taxes (stuf like that).

Well theres a paper published by somw georgia tech students that combines slam and gyroscope to return the camera pose estimation.  ;) just need to turn it into cpp code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...