- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Sat, 26 May 2007 17:20:21 +0200
- To: www-svg@w3.org
>>What you can do is to use a SVG font and a script >>(shell, perl, php, c, fortran ...) to transform any >>glyph as you like in 3D and save it after a >>projection to 2D SVG again as a new font. > >Yes, you can do that, but you'd have to do it for every frame in the >animation. It won't work to do a character-by-character transformation >once for each character, since the transformation depends on where the >character occurs within the rectangle/trapezoid. Imagine a rectangle >with an "A" in each of the four corners. During the process of >converting that rectangle to a trapezoid, each "A" undergoes a >transformation that is different from that of the other "A"s. Well, on that level of accuracy it is better to use a number cruncher to pick each glyph of the text from the SVG font, join the complete text together to one path using only cubic bezier fragments, calculate the 3D-transformation, calculate a proper projection (including a recalculation of all control points, because for a proper projection lines are in general not projected to simple lines or points anymore) and doing the animation as a path animation as the final SVG output. Of course, the information, that the path is a text is lost in such a situation, but this is similar as to use a different font for any glyph. The text information can be added again using a desc element for the animated 'path monster'. >Take a look at 'feDisplacementMap' paired with some gradient filled >geometry >I think it can make this effect. 'feDisplacementMap' sounds interesting too. But we have to think about the calculation of the correct displacement gradient related to the 3D-transformation combined with a proper projection. Therefore I think we need a more advanced gradient mesh as discussed currently in the mailing list.
Received on Saturday, 26 May 2007 15:37:24 UTC