[X3D-Public] HTML inside X3D or X3D inside HTML. Layout help!

Philipp Slusallek slusallek at cs.uni-saarland.de
Sat Jan 1 22:49:28 PST 2011


Hi,

the general idea is the following: The xml3D DOM object receives the 2D
event via the HTML event processing (somewhat similar to a cascade but
traversing the DOM). We capture the event and perform 3D processing.
This typically involves shooting rays to find out if there is any object
with a "onmouseover/onclick/etc." attribute under the mouse. Then we
generate a new 3D HTML event (an extension) and send it to that XML3D
object.

For things that are within a 3D texture (click on an input field on a 3D
object, we would have to map the rays hit position back into the texture
space, map that to the resolution of the rendered HTML, and finally
generate a new 2D event targeted at the 2D element at that location.

The tricky part (that is not yet implemented) is the relaunch of the 2D
event in the nested HTML tree (not sure we have fully figured out how to
do this in Firefox and WebKit/Chrome) and the mapping back to texture
coordinates in a fully programmable shader environment, where the shader
is free to choose whatever attribute (or collections thereof or anything
else for that matter) as "texture coordinates". For now, we plan to go
for allowing some vertex attributes to be designated as official
"texture coordinates".

This is one of the not-so-nice areas where "procedural" and
"declarative" clash violently. At least as long as we cannot extend the
procedural part to be able to query it for the "texture coordinate at a
specific point on the screen. We expect that with AnySL we will be able
to extend the shading model to include mechanisms for this.

For keyboard events, we would simply reuse the focus model that is in
HTML already.

All in all, we can pretty much reuse what is already there. Which is
the main point of XML3D in the first place.


	Philipp

Am 02.01.2011 00:10, schrieb GLG:
> 
> 
> This is interesting. How about keyboard input for HTML forms
> and 3D navigation or text entry, and clickable objects in
> both HTML and 3D?
> 
> Lauren 
> 
> 
>> -----Original Message-----
>> From: Philipp Slusallek [mailto:slusallek at cs.uni-
>> saarland.de]
>> Sent: Saturday, January 01, 2011 3:03 PM
>> To: John Carlson
>> Cc: info at 3dnetproductions.com; x3d-public at web3d.org
>> Subject: Re: HTML inside X3D or X3D inside HTML. Layout
>> help!
>>
>> Hi,
>>
>> This type of thing become a no-brainer (besides the
>> implementation work)
>> and really nice and clean if you put 3D and 2D into the
>> same framework
>> directly as we are trying with XML3D. You are not
>> restricted to either
>> 3D in 2D or 2D in 3D. You can actually do both just as
>> easily: start the
>> page with a (fullscreen, if you like) 3D tag and put HTML
>> on objects as
>> textures -- or start with the a usual 2D page and put 3D
>> frames into it.
>> You can also nest these (2D in 3D in 2D in ...).
>>
>> Our goal is to be able to use HTML content just as easily
>> for textures
>> as you can use <img>, <video>, <frame>, <canvas>, <svg>,
>> and other tags.
>> Now that browsers are swiftly moving to HW accelerated 2D
>> rendering, we
>> will even be integrate and execute all of this on the GPU
>> together
>> without the need to go back and forth.
>>
>> Other options that may eventually become possible (needs
>> support by the
>> other W3C working groups) are things like using
>> programmable (3D)
>> shaders for rendering the HTML background or filling a SVG
>> path and
>> other goodies.
>>
>> 	Philipp
>>
>>
>> Am 31.12.2010 20:43, schrieb John Carlson:
>>> On Dec 31, 2010, at 2:46 AM, GLG wrote:
>>>> To me, it would make a lot more sense to render HTML
>> inside
>>>> a 3D scene than a 3D scene inside HTML. X3D can already
>>>> supports multimedia assets such as sounds and movies.
>> How
>>>> far are you planning to get with XML3D? Seeing HTML
>> inside
>>>> X3D is one of my dreams, not the other way around.
>>>
>>> Makes sense to me to.  Open Cobalt and Open Wonderland
>> do.  I think Second Life does as well.  (is it patented?)
>> You can't fit the Earth into Flatland, but you can imagine
>> Flatland somewhere on Earth.
>>>
>>> Thanks,
>>>
>>> John
> 
> 




More information about the X3D-Public mailing list