
Multi-user VR experiences with A-Frame (2017) - sp332
https://hacks.mozilla.org/2017/10/multi-user-experiences-with-a-frame/
======
aphextron
I think beyond even VR, just having this standard markup language for building
3D scenes is amazing. My biggest gripe over modern game engines is the lack of
a programmatic means for building scenes. You always end up with massive
proprietary binary “scene” files that are a pain to put in VCS.

~~~
Zanneth
This is a necessary evil unfortunately. When loading 3D content from disk,
every cycle counts. Therefore storing and parsing this content in plain text
is just too inefficient. A number of 3D scenes are quite large in size as
well, and benefit highly from compression.

~~~
52-6F-62
This is admittedly a naive question— but wouldn't something between the two
work well? (A-Frame is arguably akin to that already)

A 3d markup language that can be compiled? At least for prototyping, it might
be useful, no?

Does that exist? Or is it a problem that's already been tossed around and
buried?

~~~
meheleventyone
This exists, it’s very common to have a human readable format for development
and storage in version control that gets converted to a binary format for
release. What doesn’t really exist is a common inter-engine format.

~~~
wlesieutre
How about glTF? It's a JSON based scene description which uses inline data or
references to external binary files, with an option for a single binary "glb"
data file.

[https://github.com/KhronosGroup/glTF](https://github.com/KhronosGroup/glTF)

[https://github.com/KhronosGroup/glTF/tree/master/specificati...](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#glb-
file-format-specification)

~~~
meheleventyone
glTF is already gaining some traction as a model format. But it’s scene
support is more what you’d see for modelling software than what you’d have for
a game engine where the scene description is more about the game entities and
the data glTF provides is usually abstracted out.

glTF is a great idea for providing a sensible interchange format for models
though. Even this data usually gets converted into a custom binary format for
the runtime engine to consume depending on use. Although as you note glTF has
its own binary format and I understand it’s going to be improved with support
for compression like Basis so perhaps that will reduce the need for custom
formats for all but the most optimised cases.

------
oh_sigh
Time is a flat circle. I remember being obsessed with VRML in 1997 and
specifically there was a site called CyberTown which you could chat in a 3d
world.

------
ngokevin
Thanks for posting! networked-aframe is great, can't wait for it to continue
to improve.

We're the creators and maintainers of A-Frame and just went through the last
YC batch as Supermedium
([https://news.ycombinator.com/item?id=16318151](https://news.ycombinator.com/item?id=16318151)).
Let us know if you have any questions!

------
mncharity
> Compatibility > The sharedspace component requires a browser with WebRTC
> support which means any recent version of the most popular mobile and
> desktop browsers.

Just a cautionary note... let's see, how to put this fairly...

When Mozilla announced the general availability of WebVR, they meant _on
Windows_. Around that time, WebVR on Linux had achieved a milestone... of
sometimes crashing immediately after starting, instead of always crashing
before. It's been described as 'caring so little about Mac and Linux, that
even the awareness of non-support has been limited'.

And even on Windows, Mozilla described WebVR as ready for use something like a
year ago. And yet there's a thread here today, about trying A-Frame on
Firefox, and being made sick, and this being a known problem.

So least at some points in the past, Mozilla's blog posts about WebVR's
usability, have been... aspirational. Motivational. And not full and fair
disclosure.

------
marknadal
This is awesome! Somebody just a few months ago show us how they built a
WebRTC multiplayer VR A-frame game.

The got the 3D world to permanently persist too, demo here:
[https://twitter.com/marknadal/status/962013903004684288](https://twitter.com/marknadal/status/962013903004684288)

Ready Player One's "Oasis" seems to already be real!

~~~
ngokevin
Thanks! We created A-Frame and are now also building Supermedium (YC W18), a
fully VR browser. If you're interested in RPO, we build an OASIS in a week
(with A-Frame) featured on Supermedium:
[https://supermedium.com/blog/oasis](https://supermedium.com/blog/oasis)

People hunt for an egg among hundreds of generated worlds to receive a prize
and access to the code ("take control of the OASIS"). Though someone found it
yesterday.

------
chriswarbo
Anyone know how a-frame compares to OpenCroquet/Cobalt/Qwak/etc. ?

The latter seems to be way more developed, with P2P networking, "3D
hyperlinks", integration with XMPP/VNC/etc., integrated IDE for live-editing,
etc. Those were all in Smalltalk rather than JS, but there are also JS
ports/successors like Virtual World Framework, 3dicc, etc.

~~~
ngokevin
A-Frame's just a general ECS-based JS/VR framework on top of three.js with
access to any Web API. It's extensible and modular so P2P networking (or
Websockets or Firebase) have been done as community components. The community
is active, and it mirrors web development (versus like trying to do a Unity in
the browser).

3D "hyperlinks" have been done, they can take whatever shape or interaction
you want (e.g., portals
[https://supermedium.com/blog/oasis](https://supermedium.com/blog/oasis)),
just have some event trigger a window.location change.

------
paulhodge
Just last night I tried using A-Frame with a Vive but was disappointed by the
performance. The framerate is fine but there seems to be a tiny lag, between
the time when the headset position changes until the worldspace camera is
updated. Made me feel a little nauseous.

~~~
mncharity
Perhaps try narrowing the optical field of view? You might test by holding the
HMD away from your face. Or by unlocking the Vive side disks and adjusting the
display outward. Or by using a thicker pad. A comfort-mode-like restriction of
peripheral vision.

If it's your own page, you might try putting the Vive camera video in
background. Doing passthrough AR, I regularly used Vive (and now WMR) down
around 30 fps. But I displayed the browser directly in the HMD. So no WebVR
display latency. And I don't do lens correction (old laptop with integrated
graphics), which has a bit of a "comfort mode" effect. And no predictive
tracking, so the rendered graphics have lag, but no judder. And displayed
directly, it was easy.[1] So YMMV.

Depending on your level of desperation, there's my largely-abandoned WebVR-
like stack for Vive on linux. But I didn't get around to supporting A-Frame,
just Three.js. But by keeping it simple, some things the complex native WebVR
stacks have struggled with these last 2 years on Windows, were much easier.

[1] [https://cdn.rawgit.com/mncharity/node-webvr-alt-
stack/master...](https://cdn.rawgit.com/mncharity/node-webvr-alt-
stack/master/packages/ew-vive-camera-video/examples/raw.html)

------
Animats
For small values of "Reality".

There are many far better multi-user VR experiences. Sansar. SineSpace. High
Fidelity. Even Second Life. It's easy to do the simple demo, and really hard
to do a full large virtual world.

~~~
ngokevin
Definitely multi-user tooling is still early, and the blog post was meant as a
simple demo, but rapidly improving. At least "bunch of people in a world" is
extremely feasible (syncing heads/hands). The community is still growing too.
But I think there'll be more unique multiuser experiences coming from the Web
versus Second Life recreations owned by companies.

The actual world creation part isn't too bad. We built hundreds of generated
interlinked worlds and dropped in multiuser in a week
([https://supermedium.com/blog/oasis](https://supermedium.com/blog/oasis)).
But still improving.

Are you an active user in those applications? What's your favorite part about
them?

------
ybrah
VR social experiences are by far the best ones.

Once eye tracking is implemented, social experiences will take on a new level.

~~~
nice_byte
Eye tracking is already there.

Tobii showed vives retrofitted with eye trackers, and snapdragon 845 vr
devkits with integrated trackers.

I tried both and it works really well.

I'm not so sure that it will completely solve the social interaction problem
though. I've tried the demo where you can see your avatar in the mirror and
observe the eyes move, but there was still something off about it. Maybe it
was just the art style, but I suspect that eyeball movements are not the only
part of equation - there's a lot of very mobile musculature around the eyes
that tends to change the shape of the eye as people make expressions with
their faces - and that part was not there in the demo.

------
georgewsinger
Does anyone have any thoughts on JanusVR (which also offers multi-user VR web
experiences)?

~~~
vokep
VRchat is basically the same thing but better. Janus has its own kind of
markup language which is pretty cool but nobody has done anything huge with it
yet. If it was developed to fill in where VRchat doesn't, it may be better.
the decentralized nature is pretty nice.

