|
Documentation
VECTEX 0.9Copyright (C) 2008 Marcelo de Gomensoro Malheiros <mgmalheiros/gmail/com> http://code.google.com/p/vectex/ ABOUTVectex is a SVG vector texture plugin for Blender. Its main goal is to be a robust texture plugin for rendering text, signs and any other type of vector art, without the need for an explicit conversion to a bitmap image. Correctly used it can both give a better quality and use less memory than a bitmap. It is released as Free Software by using the GPL license. The included AGG and EXPAT libraries are licensed separately and retain the original copyrights. MAIN FEATURES
DOWNLOADING, COMPILING AND INSTALLINGThe source code and contributed compiled versions can be obtained from the project site: http://code.google.com/p/vectex/ After extracting the source code, just type "make" at the top-level directory. It depends on having both GCC and G++ installed, plus the standard C includes and development libraries. After the plugin is compiled into a dynamic library (.so), you can run it inside Blender going to the Texture panel (F6), selection Plugin as the texture type and then loading the plugin. Although only tested on Linux, it should be fairly portable to other operating systems, as only ANSI-C and standard C++ features are used. It is also fully self-contained, including in the source the needed libraries (AGG and EXPAT), which are then statically linked into the plugin. USAGEThe plugin usage is straight-forward: just load it, type the name of a SVG file and it's done! The three most important points to note are:
Of course there are few more details about each of the interface parameters: EXTEND This is the only available type of texture wrapping. It cannot be changed, and means UV coordinates of the -1,1 interval will have the same color as the closest border. ENABLE This button is on by default, and should be used to turn off this plugin. The problem is that the current Blender plugin interface does not makes possible to know when the plugin will not be used anymore, so if you are not going to use it anymore, you should turn it off. This releases all the memory used, which otherwise would be kept allocated until Blender ends. It can also be used when the SVG texture has been changed externally, so just disabling and then enabling it again reloads the SVG drawing. MIPMAP This button is enabled by default and makes possible to have the most precise resolution for the vector texture, as it enables the plugin to interpolate between the immediate higher and lower resolution versions of the texture. That is, if the needed texture would be at 827 pixel wide, it is interpolated from the 1024 and 512 versions. In fact, it works exactly as the same parameter for normal bitmap textures. Using this option increases the memory usage at most by 50%, and reduces only slightly the performance. It may be disabled for static scenes (thus using only the higher resolution texture, but it should be used for animated scenes to prevent "jumps" on the texture detail. INTERPOL This button is also enabled by default, and works exactly as in the bitmap texture. That is, it generates intermediate pixel values by bilinear interpolating the 4 nearest neighboring pixels. Should be left on as it has strong effect on the texture quality. TEX LEVEL It is disabled by default, and is mostly useful as an aid in debugging the the plugin. But it was made available because sometimes it could be interesting to know the best bitmap texture size for each element of the scene. When it is pressed, the vector texture color is multiplied by a pure hue color, representing the different levels of texture detail. For the more technically inclined, to each power of two is assigned a 30 degree increase in the hue component of the HSV color model, thus grading the different texture resolutions with different colors. The result goes more or less like this:
Also try to disable MIPMAP, which then does not blend different level and make them more clearly distinguishable. MEM MAX and MEM The MEM MAX input places an upper limit in the memory usage for the plugin, the default value being 20 Mb. If this value is placed at 0, then there will be no limit, and the plugin will use as much memory as it needs. The MEM field always shows the memory usage of the plugin, also in megabytes. Although the entry could be altered, it always reverts to the current memory value. Some care is suggested when altering the memory limit, because if setting too low (like 1 or 2 Mb), most of the rendering time will be consumed by generating texture details that will be soon disposed because the limit has been reached. Those details could be needed right after, causing again the recreation of them. So only in very strict memory constraints the limit should be set below 10 Mb. The other side is having no limits. If you have plenty of memory, that's the fastest alternative, as all needed details will be in memory and can be used as soon as needed in any animation frame. However, for a simple zoom into a picture, as the tiger example, as much as 50 Mb could be quickly allocated. One tip is to run once the animation without memory limit, and then note the usage after it is finished, which is the ideal one. Then you can set the max limit accordingly, noting that any value below will make rendered tiles be disposed, which will cause them to be rendered again if needed, thus taking some extra time. As a rule of thumb, each megabyte enables the storage of five 256x256 tiles. BASE COLOR This is simply the color used for the background of the SVG drawing, defaulting to black. If the color is changed then the tile cache is cleaned, because it could affect their appearance. So they will rendered again as needed. FILE NAME This is the entry for inputting the SVG file name and path. Because of limitations on the Blender plugin interface, at most 63 characters can be used. If there is any problem loading the file, or if the entry is simply empty, the plugin will show a solid red color and no other parameters will function. NOTES
However, if text is converted to curves, it can be drawn as any other stroked or filled path.
THANKSTo the Blender Foundation and all the programmers and artists that are helping to create such amazing tool. To Maxim Shemanarev, author of the Anti-Grain Geometry library, which is quite amazing, being high quality, feature filled, efficient and compact. Also his SVG renderer was very helpful in getting this plugin done. http://www.antigrain.com/ To the short paper "Implementing Vector-Based Texturing In Renderman", by John Haddon and Ian Stephenson, which gave me the nice hint of using a tile cache. http://www.dctsystems.co.uk/Text/haddon.pdf And specially to my wife Maria and our upcoming son Pedro, for letting me toy around this little project in my summer vacations! |
Sign in to add a comment