W3C home > Mailing lists > Public > www-svg@w3.org > November 2009

[Rendering order] z-depth and 3D effects

From: Steve Withall <steve@withallyourequire.com>
Date: Wed, 11 Nov 2009 11:56:10 +1100
Message-Id: <200911110056.nAB0uGMR004756@mail7.tpg.com.au>
To: www-svg@w3.org
Esteemed experts,

The recent draft "SVG Rendering Order" specification makes a few 3D 
effects easier to achieve. So does the draft "Transforms" 
specification. They add to what can be done using filters (drop 
shadows and lighting, in particular). But all these effects are 
independent of one another. There's no underlying 3D model, so it is 
possible merely to *contrive* to make individual objects appear 3D.

Of course SVG is a format for 2D graphics, and should stay that way. 
For your consideration I suggest that a 3D model sufficient for SVG 
could be achieved by allowing a *z-depth* to be defined for each 
element: its distance above (or below) a datum plane. (I avoid 
calling it z-height because heights in SVG mean the y dimension.) 
This single value would be a sufficient basis for calculating 
consistent drop shadows and consistent perspective transforms across 
many or all elements.

Alternatively a z-depth could be defined for each z-order value. 
That's probably sufficient in some situations, but not in others.

An additional use case I have is displaying multiple SVG canvases 
layered one above the other. I want each *canvas* to have a z-depth, 
so I can throw well-positioned drop shadows from objects in one 
canvas on to objects in canvases below. This can be regarded as the 
ability to define the "absolute" (wider world) z-depth of the datum 
plane for each canvas.

Finally, is it worth the Working Group making a formal statement of 
the extent and limits of SVG's 3D ambitions? (Forgive me if this 
exists somewhere that I don't know about.) It could be something 
along the lines of treating each element as two dimensional, but 
offering ways to make collections of these 2D elements appear as if 
they exist in a 3D environment.

Thanks, Steve.
Received on Wednesday, 11 November 2009 00:56:51 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:43 GMT