[x3d-public] Fascinating Discussion on WebVR List
Joe D Williams
joedwil at earthlink.net
Sun Oct 23 10:17:47 PDT 2016
> Do we have perfectly good scene graphs already in .js with glTF and
> X3D JSON?
Yes we do. For authoring glTF I think I see that there are some
internal structures and event processing required. In principle we
should be able to develop an X3D scene at a certain level of
complexity then export to glTF. The JSON for X3D produces the x3d
scenegraph structure. But for glTF, in a way it is not to important
until there is a live api.
For the webVR, Leonard seems to be following this. Tony Parisi is
right in there with his deep knowledge of tree and DAG and event
flows, and Sandy Ressler checked in. And Don Brutzman is also in there
showing web3d interests. Have a look at the mailing list, it looks
like an effort to get a higher level focus by forming a group to
examine opportunities.
Maybe starting with some normative references to some established
vocabularies. I started reading here:
https://mail.mozilla.org/pipermail/web-vr-discuss/2016-October/001735.html.
If anybody is working on webVR, then web3D MAR has to be considered. I
would say that few commenting on the list know VRML or X3D SAI or
X3DOM or Cobweb or in detail for comparison with what is evolving. One
comment blamed VRML's failure in that it could not be scripted(?), and
some do not believe in a declarative approach anyway. Javascript
frameworks are King and give the true freedom to blaze new paths
showing the browser makers were to add some performant native
features. Some of these folks, well, maybe it is still believed that
the browser only needs a few built-in features and .js can handle the
rest.
If you want a hint of what some group thought about mixing CSS and 3D
with little regard for an event system, look at A-frame.
example of advanced geometry:
<a-entity
geometry="
primitive: torus;
radius: 1;
radiusTubular: 0.1;
segmentsTubular: 12;"
material="
color: #EAEFF2;
roughness: 0.1;
metalness: 0.5;"
rotation="10 0 0"
position="-3 1 0">
</a-entity>
I mean where did 'they' start in order to get arrive at something that
looks like that?
Does an entity have class? Real CSS fans on that team, or is the aim
to ruin CSS? I hope it can be validated somehow. metalness is so
descriptive. Anyone familiar with world-recognized names for elements
and attributes and keywords should feel left out of the process taken
to discover this wonderous mix. The styling IS the content! Well I
guess we can say that this presetatnion is declarative. What can be
changed in runtime? OOh, I see, this:
<script ... > ...
var scene = document.querySelector('a-scene');
var cylinder = document.createElement('a-cylinder');
cylinder.setAttribute('color', '#FF9500');
cylinder.setAttribute('height', '2');
cylinder.setAttribute('radius', '0.75');
cylinder.setAttribute('position', '3 1 0');
scene.appendChild(cylinder);
...
must give you something like this:
<a-entity
geometry="
primitive: cylinder;
height: 2;
radius: 0.75;'"
material="
color: #FF9500;"
position="3 1 0">
</a-entity>
so natural. Proves there is nothing that can't be done given enough
javascript.
You want advanced animation of advanced geometry?:
<a-cube
color="#0095DD"
rotation="20 40 0"
position="0 1 0">
<a-animation
attribute="rotation"
from="20 0 0"
to="20 360 0"
direction="alternate"
dur="4000"
repeat="indefinite"
easing="ease">
</a-animation>
</a-cube>
Yeah, that makes it turn all the way around for as long as you wish.
You want more advanced stuffs? You get:
requestAnimationFrame(render);
which will let you collect one or a sequence of events (i guess) to
make sure you get a render of your animation each frame.
You make your own event system so Hey, you can also do (and
realistically probably will need to do) all animations in pure .js.
You wanna use the same animation of two or more things? me not know,
they didn't show me.
The idea of a hierarchy is not really exposed in the user code I have
seen, but descriptions of the a-frame .js processing framework suggest
the idea of children and that some internal cascade of events can
happpen if you change a parent level of some structure that ends up
being hierarcal in some way. Apparently the user can depend upon some
sort of automated event processing if the user code is structured in
some certain way.
An opening demo shows blocks floating around to form a structure. The
blocks move real nice. Not sure I saw how to move the complete
structure, or share animations between different elements. Don't
worry, there are 10s of thousands of ways for putting the collection
of SF and MF types of descriptors together and the javascript will
help you figure it out. Then the DOM is a bit weak for hierarchal
graphics and events, so it was left behind. I think the idea that the
data structure and whether you call it a tree or a graph, it really
depends how the events flow. For some kinds of stuff you need a data
structure that allows the necessary carefully defined event flows for
'internal' and 'external' interactions.
To me, a-frame shows what you can take your own browser and your own
javascript engine and probably make almost any structure and syntax
for making spinning (using euler-type angles even) tennis shoes and
the like.
<a-light
type="directional"
color="#FFF"
intensity="0.5"
position="-1 1 2">
</a-light>
I still think it is very lazy to do stuff like this where you must
name the actual thing you are working with using a "type" attribute on
some base element. Fortunately the rest of html and any of x3d don't
do that.
Sorry, just a first impression. A-frame structure, syntax, and its
processing model is not at all comparable to X3DOM and certainly not
X3D.
Unless somebody takes the focus from simple games and ui to realistic
simulations they will be working toward DOM6 or so to get the
structure and functions of X3D. A 'standard' scene graph is dismissed
as being too confining, or if general, like X3D, then not performant.
Not to pick on a-frame but generally, two levels of deficiency are
being found. First, with any 3D plus time or interaction events, you
gotta do a lots of maths! Next, that with any 3D plus time or
interaction events, you gotta have orderly and somewhat automated
event flows. Finally, that with any 3D plus time or interaction
events, you must have comprehensive authortime and runtime structure
and syntax validation steps.
Although the extensions to get CSS running live in the live DOM gives
the idea that much can be done to improve and extend the DOM for
realtime styling of real interactive pages, and thus leading to the
idea that 3D scenes can work with enough high performance .js piled
in. And thank greatness for that because the javascript engine
platforms provided by the w3c browsers have evolved so much that
thinking of realtime interactive html is becoming a reality. Now if
html can just get the graphics to work:)
All Best,
Joe
----- Original Message -----
From: "Leonard Daly" <Leonard.Daly at realism.com>
To: "X3D Public" <x3d-public at web3d.org>
Sent: Friday, October 21, 2016 3:30 PM
Subject: [x3d-public] Fascinating Discussion on WebVR List
> There has been (and continues to be) a fascinating discussion from a
> breakout at the W3C VR Workshop on the WebVR list. You can read the
> thread starting with the first message at
> https://mail.mozilla.org/pipermail/web-vr-discuss/2016-October/001735.html.
>
> The discussion is about the future of 3D development both low-level
> APIs
> and high-level scene graphs. There is a recommendation that a W3C
> Community Group be formed to handle the discussion. I have provided
> WebVR with the URL.
>
>
> --
> *Leonard Daly*
> 3D Systems & Cloud Consultant
> LA ACM SIGGRAPH Chair
> President, Daly Realism - /Creating the Future/
>
--------------------------------------------------------------------------------
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
More information about the x3d-public
mailing list