Vector Based Textures
From KruelWiki
Contents |
Methods for using Vector Based Textures
Ugly Hack: Extra faces
A simple, ugly and inefficent way of doing vectorised textures is to use more faces. This would only be useable for things like artwork or text labels. create a flat object in the shape you want, overlay it on the object a tiny bit out from the surface.
Simple, ugly, inefficent.
SVG to Bitmap
Instead of generating textures in a bitmap editing program, take the time to use inkscape (or some other SVG program) to create as a vector.
Then, when you run the program that needs it (such as praelium) shell a command to inkscape to render it to PNG. PNG can then be used by SDL_Image or another external sub-process to render the PNG.
This means, that you can programatically generate the textures required in a function, such as "we need a bay door label, use this template". Then we dont need to worry about the rasterisation of the vectory goodness.
You can download svgtextures.tar.gz to see what i mean. You'll need inkscape, imagemagick and SDL/SDL-image installed.
LibRSVG
http://librsvg.sourceforge.net/
LGPLed library

