13 June 2011

XSLT+SVG= "It Came from Outer Space" (anaglyphs)


"It Came from Outer Space", Universal's first film to be filmed in 3-D.

Just like with the "Gimp", Inkscape , a SVG editor, can manage some layers:
Each layer will appear in the SVG document as an element svg:g with an attribute: inkscape:groupmode="layer" under the root element svg:svg. I've written a XSLT stylesheet that converts the SVG image to an Anaglyph image. The stylesheet is available on github at: . For each layer it creates a new SVG filter that will split the layer into a red and a blue image.

Example


The original SVG picture:


After processing with the XSLT stylesheet:


SVG Source:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw source.svg hosted with ❤ by GitHub

SVG Result:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw result.svg hosted with ❤ by GitHub


That's it,

Pierre

No comments: