W3C home > Mailing lists > Public > www-style@w3.org > September 2012

Re: Media queries for stereoscopic 3D displays?

From: Douglas Crosher <dtc-style@scieneer.com>
Date: Fri, 21 Sep 2012 01:34:08 +1000
Message-ID: <505B3770.9050806@scieneer.com>
To: Joel Andrew Glovier <jglovier@gmail.com>
CC: David Singer <singer@apple.com>, Florian Rivoal <florian@rivoal.net>, www-style@w3.org

The CSS3 transforms may be an alternative that already has a lot of the
required support, see:
http://www.w3.org/TR/2012/WD-css3-transforms-20120911/

The transforms can take the eye position into account.  It should be
possible to render a left and right view using these transforms, and
is seems a page could be consistent if the page is designed appropriately.

Would anyone know if it is possible to render a left and right view of
the same child DOM objects using the perspective transform?

<div class="left">
  ...page content...
</div>
<div class="right">
  ...page content...
</div>

Could the CSS3 transforms be extended to render a stereoscopic image in
a range of formats: such as parallel, cross-eye, interlaced, checkboard,
etc.  The left and right view could simply apply a slight variation in
the transform to change the eye position.

I am just looking over the code to see how practical this would be.

There also seems some potential to use the transforms to implement
sweeping movements of scenes separated into layers of different depths.
This could be a great improvement over simple wiggle images which
currently require all the image views to be loaded - a lot of images are
needed for a smooth pan and the size becomes impractical.

Regards
Douglas

On 09/20/2012 11:12 AM, Joel Andrew Glovier wrote:
> As far as implementation, here's an idea that may be somewhat crude, but
> could be really simple to build on: what about building support for 3D
> content around z-index? It's a property that vendors already have to
> make calculations for. There could be a property like z-index-effect
> with values like "none" (default), "stereoscopic" (and other "3D type"
> values), integer values (that could set a base scale for depth), etc.
> 
> And by using the z-index as the foundation for the paradigm, you already
> get support for setting specific elements in relation to others. 
> 
> Joel Glovier
> me@joelglovier.com <mailto:me@joelglovier.com>
> @jglovier <http://twitter.com/jglovier>
> joelglovier.com <http://joelglovier.com/>
> 
> On Sep 6, 2012, at 4:21 AM, Douglas Crosher <dtc-style@scieneer.com
> <mailto:dtc-style@scieneer.com>> wrote:
> 
>> On 09/06/2012 09:26 AM, David Singer wrote:
>>>
>>> On Sep 4, 2012, at 19:31 , Douglas Crosher <dtc-style@scieneer.com
>>> <mailto:dtc-style@scieneer.com>> wrote:
>> ...
>>>> A proposal to add depth to styling would be ambitions but would seem the
>>>> most general solution and perhaps the best investment, and it would also
>>>> lead to the most consistent presentation.  Even on single view surfaces
>>>> the depth could be used to support automatic perspective, highlights,
>>>> shadows, focus, panning, and wiggle, cues.
>>>>
>>>> The question becomes how to allow the depth to be specified in CSS?
>>>>
>>>> Some options:
>>>> * Just the corners.
>>>> * Plus bump maps.
>>>> * Bezier or NURBS surfaces.
>>>> * A calculation.
>>>>
>>>> Some other issues to consider:
>>>> * Viewpoint
>>>> * Lighting
>>>> * Surface properties
>>>
>>> Right.  some things need to be 'styled in depth' (notably captions
>>> and sub-titles) but this is complex and temporal.  The reason is
>>> two-fold -- you want the captions to be at the same apparent
>>> convergence as the main part of the scene, yet you don't want them
>>> 'punching holes' in things that appear to be closer.
>>
>> Captions and sub-titles could be placed on a static frame outside the
>> image or video content and this could be done with a static depth in
>> webpage styling.
>>
>> Placing captions within stereoscopic content does require some careful
>> artistic design, and this would seem to be outside the scope of page
>> styling and more appropriately integrated within the image or video
>> content.
>>
>>> Even if we were to style HTML in 3D, we'd need to look at this -- not
>>> only 3D transforms, but simple depth positioning, and so on.
>>>
>>> The simple way to do it is to either specify the depth and let the
>>> system work out the disparity (the left/right eye shift) or specify
>>> the disparity directly.  I suspect this will rapidly come into
>>> collision with the difficulties with physical measurements, as some
>>> of the calculations concern eye-eye distance and distance to the
>>> image plane (screen etc.), both of which are true physical questions,
>>> yet often unknown to CSS.
>>
>> Specifying the depth and allowing the system to work out the disparity
>> would help ensure consistency of the 3D depth cues (disparity,
>> perspective, photometric, focus, shadow, fog, etc).  Thank you for the
>> feedback, this helps set a development path but there is a lot detail to
>> worked through.
>>
>> This still leaves the issue of stereoscopic images and videos.  If media
>> queries are not used to select a source format that matches the target
>> technology then image and video elements need to be defined that can
>> transform the source format to a target format.  This may be outside the
>> scope of the www-style forum.
>>
>> I'll try developing some JS using the canvas that can handle some image
>> format translations to explore the issues.
>>
>> BTW there was a related discussion in the whatwg list, see:
>> http://lists.w3.org/Archives/Public/public-whatwg-archive/2010Apr/0295.html
>>
>> Regards
>> Douglas
>>
> 
Received on Thursday, 20 September 2012 15:34:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:00 GMT