Tag Archives: svg

SVG Transforms: Not competing with O3D

Per this thread, Apple/WebKit’s SVG Transforms are NOT competing or in the same area of interest as O3D. Instead, SVG Transforms (which incorporates WebKit’s CSS 2D and 3D Transforms, CSS Transitions and CSS Animations) is meant to display and interact with flat pieces of web content (in this case, the traditionally-2D SVG) in 2.5D/3D space, while O3D and WebGL are meant to display fully 2.5D/3D *scene graphs* and *models* separately from any web content (even though both efforts are aiming for an in-browser user experience).

Interestingly, Maciej mentions that it would be possible to codify a means to join arbitrary (2D/3D) web content and arbitrary 3D models together, but that it may be "bigger challenge than anything that anyone has done so far".

So if this same argument could also be applied to other related initiatives in both fields, from canvas(3D) to X3D, then I’m assuming that the next frontier for the 3D Web initiatives to cross is how to bridge the divide of perception between 3D and 2D in the same network-centric application. Certainly, the fact that most of us do not have 3D-ready navigation hardware (like the SpaceNavigator) is a core part of that dialogue over why the 3D Web initiatives are not scaling to better expectations of ease of use and accessibility (not to mention hardware acceleration of graphics).

So O3D or WebGL may have a future in the web browser (or at least a better one than VRML and X3D), but its not like we’re that much closer to bridging the gap between 3D web content and 3D scene content.

Styling, Scripting and SMIL: The three options in SVG animation

I wonder when CSS animation and other WebKit niceties can be packaged into CSS frameworks for easier, less rigorous designing of web pages.

Anyway, after looking at the announcement that WebKit allows CSS animations, transitions and transforms, I wonder about the "best practices" of using such modules with SVG.

Maybe it would go like:

  • CSS for color and movement of shapes
  • SMIL for timed text (subtitles) and links
  • JS for playback control

It seems a bit more realistic for SMIL to be relegated to timed text rather than have such an actively-animating role as was accorded to it by the W3C when they first came out with the SMIL standard in the late 90s/early 2000s; SMIL’s syntax can be seen as one that is best for graphically-intensive text. Allowing for CSS to take a greater role in animation can also open up doors for web designers to easily create Flash-like animations  using a combination of normal web editors and SVG editors rather than wait for all-in-one dedicated animation editors.

The problem is that the WebKit team has not yet developed a publicly-documented approach to SVG animation through CSS; CSS as-is is already used in SVG and XHTML, among other flavors of XML, for styling and color, but this animation/transform/transition idea for CSS has not been publicly considered as being usable with SVG, only with XHTML as rendered by WebKit.

Thus, it remains to be seen how CSS styling as an SVG animation property will play out.

Free Animation License rough draft

Admittedly, it sucks at the moment, but I’ve written out a rough draft of the Free Animation License.

Have a looksee; it will certainly change with further additions.

Also, this is meant to cover any imagery that may be used in an animation or slideshow, hence the inclusion of several different image media. However, I especially intend this to be used for SVG animations, since such animations are completely text-based and text-editable (in other words, you should pull up an SVG file like this and open up the “Page Source” window for it in either Firefox or Opera).

In other words, this license is meant to be more like a combination of the GNU Free Documentation license (GFDL, used for text publications, especially Wikipedia) and the Free Art license when applied to text-based graphic animation (2D or 3D), and less like any of the Creative Commons licenses, which have found greater exposure as licenses of choice for those who want free publicity for, I guess you could call it, “binary media”, or media that is processed and manipulated by the machine (most music and graphics files) rather than by text (anything XML based).

More on CSS in SVG and SMIL: Wiring visible content together

CSS is most well known as a means of creating nifty-looking graphical effects and enhancements in W3C-compliant webpages. Also, it has been demonstrated that CSS can be embedded into both HTML (a text-oriented markup language) and SVG (a vector graphics-oriented markup language).

But while CSS can wire together embedded content (images, video, etc.) and text into a variety of harmoniously-compartmented displays on xHTML, it remains to be seen what CSS can wire together in an SVG file, apart from doing the same job in SVG (wiring text and embedded images together into specific positions) that it does in xHTML.

Sure, SVG can be approached in the same way that non-image MLs like xHTML are approached: text can be embedded into SVG just like SVG can be embedded into text. However, SVG embedded into HTML would be treated like any other image format like JPEG, PNG and SWF, while text embedded into SVG wouldn’t have anything to do with xHTML (at the moment, I don’t think it’s possible to embed HTML syntax into SVG, as there are very few to no resources via Google on the subject); instead, it would be treated as text from within SVG’s own approach.

However, I’m certain that other images and image/video formats can be embedded in SVG, just as images can be embedded into HTML. So a CSS-based layout of the images and the text would work similarly to, albeit not the exact same as, CSS-based layout of images and text in HTML.

I think that now, from the recent addition of animations and transformations into CSS on WebKit, the main issue of discussion on CSS’s role in vector graphics markup centers around how CSS and SMIL can be appropriated within both HTML and SVG without getting in each other’s way.

Like CSS and unlike HTML, SVG and other markup languages, SMIL (a markup language, abbreviation for “Synchronized Multimedia integration Language”), ironically pronounced as “smile”, doesn’t have a “face”; in other words, an SMIL file doesn’t have a visible output except when it is used to determine the sequential display of elements in another markup language, like SVG (thus being akin to Flash Player’s ActionScript in terms of its “animation” capabilities). In fact, the main purpose of SMIL in a markup language is to determine how the elements in a markup page are supposed to “act” when the page is “played”.

Also, it is most used by multimedia players such as QuickTime and RealPlayer to determine (or, dare I say, “daisy-chain”) a pre-determined playback sequence of audio and video, hence known as “playlists”. Also, a subset of SMIL, known as the Multimedia Messaging Service, is used primarily in the mobile device media industry to provide a variety of multimedia (video, images, audio, rich text) for messages between device rather than just the infamous “text message” allowed by the Short Message Service (SMS) protocol.

But what can CSS, even animated CSS, do for SMIL? Or what is the best relationship between the two?

At the moment, I’ve found this W3C resource on the interaction between CSS2 and SMIL (possibly for embedding); however, it was published exactly 10 years ago, while CSS animations were introduced this year as part of the drive toward an eventual CSS3 recommendation.

CSS, like SMIL, doesn’t have a “face” unless it is embedded or “inlined” correctly in a markup language; and to an extent, it does determine an exact layout for the markup file’s inner contents and embedded material. However, unlike SMIL, previous standards of CSS didn’t include provisions for animation, although animation in CSS has been proven to work in previous years at a very rudimentary and manual, mouse-driven (:hover) level prior to the introduction of larger animation attributes to the CSS implementation in WebKit this year.

At the same time, even with this recent CSS animation implementation, it is still (albeit slightly less) driven by the mouse, as the :hover and :mouseover tags’ capabilities have simply been expanded into the area of transformations (in other words, the attributes that allow for translations and rotations of elements).

So I could see the CSS3 transformations being geared exclusively to single hover-driven elements (like mousing over a hyperlink to see it expand or rotate into a bigger form), while SMIL’s animations can be applied to elements in the page that aren’t hover-driven, but click-driven (like clicking “play” to play a video and “stop” to stop it).

But that’s the best that I can see as far as a relationship between a transforming CSS3 and animating SMIL is concerned. There’s still no word yet on what embedding CSS into an SMIL file can do for the latter (vice versa, I believe, is impossible).

Neither of them have “faces” with which they can smile or style.

WebKit, Mozilla, CSS and SVG

So now you have Apple’s WebKit pushing more for CSS extensions such as animations and transformations (at least because Apple would rather push for the <canvas> tag rather than endorse SVG) while you have Mozilla pushing SVG effects (at least because Mozilla would rather throw its support to SVG extensions rather than CSS, as seen with their relatively late tackling of the Acid2 test).

But where do the twain meet? How can SVG and CSS be reconciled as needing each other to create, say, better graphical web UIs?

Plus, what’s there to gain for Apple in the extension of CSS into the animation and variables department (which is already dominated by JavaScript and, to a lesser extent, vector graphics such as Flash/ActionScript and SVG/SMIL)?

Maybe CSS can be better used for HTML animation and effects while SMIL is better for SVG animation and effects?

“Animated MediaWiki”

Right now, there’s only this section at Wikimedia Commons for SVG animations.

However, what if someone were to create an extension of MediaWiki that would allow for user creation of SVG animations through wikitext?

With this hypothetical “Animated MediaWiki” extension, the wiki can also treat SVG animations like full text pages, with tables of content at the beginning of the animation that are linked to specific parts or intervals of the animation.

Raster images, other vector images, audio and even video can be embedded into the animations via wikitext.

Navigational templates can exist for navigation between separate animations for context; as usual, place them on the side or at the end of the animation.

Particular SVG animation loops or sprites, no matter how small, can also be chopped from the original larger animation and uploaded as separate generic animation piece/template that can be used in other animations.

Web Video forms

Here’s an idea for creating easy web video widgets. It could likely use XUL and SVG.

<?xml version=”1.0″?>
<?xml-stylesheet href=”chrome://global/skin” type=”text/css”?>

<window title=”XUL Video”
        xmlns:html=”http://www.w3.org/1999/xhtml&#8221;
        xmlns=”http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul”&gt;
   <vbox align=”center”>
<video src=”width: 200px; height: 200px” src=”images/betty_boop.ogg” />
<button flex=”1″ image=”images/playbutton.jpg”
       onclick=”Play(‘myVideo’);” />
<groupbox>
  <caption label=”determined” />
   <progressmeter id=”my-progressmeter” mode=”determined” value=”10″ progressscrollbutton=”images/progressscrollbutton.jpg” />
  </groupbox>
<button image=”images/stopbutton.jpg”
       onclick=”Play(‘myVideo’);” />
</vbox>
</window>

The lack of free SVG animation editors

OK, 

, I find that Opera tends to possess greater capabilities with SVG and CSS than Firefox.

In fact, at the moment, I’m trying to learn more about SVG animation using Opera.

SVG, as very few people know, is the W3C standard for vector graphics which was first created in the late 1990s. With the development of the specification to its current state, SVG certainly rivals Flash in its graphical, animated and scripted capabilites; at the same time, it is dwarfed by Flash in market penetration, brand recoginition, Web predominance and scale of implementation. At best, it has found the most usage among free software projects (with whom Flash has long held a troubled history) and mobile device manufacturers.

So, what is the biggest issue with SVG animation at the moment?

To be honest, there are NO free SVG animation editors, as of 2008.

In other words, there is no easy and free means by which you can create animations in SVG. Unless you have the money to buy one of the shareware SVG editors, you’re stuck with having to learn and code SVG animations by hand.

So those who may be looking to create SVG animations for, say, Opera widgets will be out of luck.

Also, speaking of Flash: