Blog
-
Large font support
published on 3/6/2011 10:13 PMA while back I found a [url:paper by valve|http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf) on how they have done their font system in Team Fortress 2. I wanted to add such a system to the visualizer but didn't find any good test scene for it. That all changed one day when I noticed [url:the colour clock|http://thecolourclock.co.uk) on delicious. It looked rather nice and since the most favorite scene current is the digital led clock I though it could make a fine addition to Plane9.
After a bit of work it was added and this new distance field font system is one beast with plenty of potential. However the only way to really give the scene creator that power is to allow him/her to edit the shader that is used for rendering and that is exactly what has been added. Slightly more complex but a lot more flexible.
So how did it go with the color clock? Here is the end result of that
Since you now have the complete shader system to play around with you can easily use the various noise functions to make the scene more interesting. For example make the text look like it's made from bubbles. It's just the voronoi shader function doing its work so one line of shader code.
The end of the last line of text seems to be in a mess because it's using the character expression that exists in the last few versions of plane9. It works by letting each character have its own expression and move independent of all others. The expression used in the screenshot is simply
pos.x = pos.x + noise2(age, charnr*12)*(1-age)*3; pos.y = pos.y + noise2(age, charnr)*(1-age)*3;