﻿<?xml version='1.0' encoding='utf-8' ?>
<?xml-stylesheet type="text/xsl" href="header_e.xsl" ?>
<body PageTitle="Svgtex plugin" PageHeader="Tutorials" Created="2010-03-23" Updated="2010-03-23">
<div>
<span><b>Svgtex</b> is a Blender plugin. It uses content of <em>*.svg</em> files as textures. 
Svgtex utilizes the vector nature of the SVG pictures. Its textures in Blender are 
always sharp and exact, regardless of the distance from the camera to the model.
This component is a free, Open Source code (available on General Public License). 
Actual version — 1.0 — is written for Blender version from 2.46 to 2.49b.</span>
<p/>
Downloads:<br/>
<a href="downloads/svgtex_win32.zip" title="zipped, binary file (svgtex.dll)">Compiled plugin for Win32</a>
— the <em>svgtex.dll</em> and a SVG viewer (0.4 MB, for 32-bit Windows, only);
<br/>
<a href="downloads-svgtex_e.xml" title="go to the page with source code">Source code</a>
 — optional: if you wish to compile yourself / change something in the code;
<p/>
Would you like to repeat the actions, shown in the text below? Download the exemplary model:
<br/>
<a href="downloads/p40b.zip" title="model, used in this and the next">the example</a> (12 MB) — a P-40B model, with textures, used in this text;
<p/>
</div>
<div class="subheader">1. Plugin setup</div>
<div>
<span>The executable file of this plugin is named <b><em>svgtex.dll</em></b>. 
It is zipped, together with a SVG viewer (svgview.exe) into a single <a href="downloads/svgtex_win32.zip" title="Win32 binary files, already linked at the begining of this article"><em>*.zip</em> file</a>. 
Unpack its content into a folder on your disk (for example - <em>plugins/texture</em> in the Blender directory). </span>
<p/>
<span>
To use <b>svgtex</b>, change the type of texture to <b>Plugin</b> (<b>Fig. 1.1</b>):
</span>
<br/>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image11_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 1.1 Changing the texture type: from (raster) <b>Image</b> to <b>Plugin</b></spanl></td>
	</tr>
</table>
<p/>
</div>
<div>
<span>
It will change the layout of Blender panels. Panels of the raster image will disappear, replaced with a new one, 
named <b>Plugin</b>. At the beginning, it will contain the <b>Load Plugin</b> button, only (<b>Fig. 1.2</b>). Click it:
</span>
<br/>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image12.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 1.2 Initial layout of the <b>Plugin</b> panel</spanl></td>
	</tr>
</table>
<p/>
</div>
<div>
<span>
In the file selection window select the <em>svgtex.dll</em> file. 
You must <em><u>turn off</u></em> the <b>Relative Paths</b> option (<b>Fig. 1.3</b>). 
If you leave it enabled, Blender will not load <em>svgtex.dll</em>!
</span>
<br/>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image13_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 1.3 Selecting the plugin file</spanl></td>
	</tr>
</table>
<p/>
</div>
<div>
Properly loaded plugin should display additional controls in the <b>Plugin</b> panel (<b>Fig. 1.4</b>):
</div>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image14_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 1.4 Controls of <b>svgtex</b> plugin</spanl></td>
	</tr>
</table>
<p/>
</div>
<div>
<span>
Using absolute paths in a Blender file may lead to some troubles, when it is placed on another computer.
The plugin may be available there from a different directory. In such case, you would have to setup it again, 
setting anew all the controls in the <b>Plugin</b> panel.
</span>
<br/>
<span>
It would be easier to type in the <b>Plugin</b> panel just the <em>*.dll</em> file name 
(<em>svgtex.dll</em>, for example) - and let the system to find it!
Well, fortunately it is possible. You have just to place all your favorite plugins into
one directory, and add the path to this folder to <b>Path</b> environment variable.</span>
<br/>
<small>
<span>Do following steps, to change the value of environment variables in Windows:</span>
<ol>
<li>Highlight the <b>My Computer</b> icon and open its <b>Properties</b>;</li>
<li>In <b>System Properties</b> dialog window go to the <b>Advanced</b> tab 
and press the <b>Environment variables</b> button (placed at the bottom of this dialog);</li>
<li>In 
<b>Environment Variables</b> dialog window, on the <b>System variables</b> section, highlight <b>Path</b> 
variable on the list and press the <b>Edit</b> button</li>
<li>In <b>Editing environment variable</b> dialog append the path to the directory that contains the 
Blendera plugins. (On my computer its is <em>C:\Program Files\Blender\plugins\texture</em>). 
Take notice, that the colon character is used as the separator of the subsequent paths. 
Make sure, that it is placed before and after name, you have typed there.</li>
</ol>
</small>
<p/>
<span>When the plugin file is located in one of the folders, enlisted in the <b>Path</b> value,
you can remove all directories from the <b>Plugin</b> panel (<b>Fig. 1.5</b>).
On another machine you can place in the system variable the path to another folder. As long, as the 
plugin file is available in one of <b>Path</b> directories, Blender loads it properly.</span>
</div>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image15_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 1.5 <b>svgtex</b> plugin, specified in the "machine independent" way</spanl></td>
	</tr>
</table>
</div>
<div class="subheader">2. Using svgtex</div>
<div>
Type in the <b>File name</b> the path to the SVG file (in this example it is named <em>decals.svg</em>). 
You should always type relative paths - relative to the <em>*.blend</em> file, you are working with. 
Change the background color to dark grey, <b>Alpha</b> to 0, 
and turn <b>Enable</b> on. Picture of the SVG file will appear in <b>Preview</b> panel (<b>Fig. 2.1</b>):
</div>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image21_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 2.1 Example of vector texture - national markings of the airplane</spanl></td>
	</tr>
</table>
</div>
<div>
<p>
On an error, the content of the <b>Preview</b> panel is solid red. In such case, you should look at Blender 
console, to read the error messages from <b>svgtex</b> ("missing SVG file", for example).
</p>
 
<p>The vector texture looks like the raster one, on the preview (compare it with <b>Fig. 1.1</b>).
In this example, this is a texture with national marks and other emblems, placed on the airplane skin. 
How does it look like on the final render?<br/>
<u>BEWARE: to obtain <b>svgtex</b> effects, you have turn on the <b>OSA</b> switch (in <b>Render</b> panel settings)</u>. Otherwise, the content of SVG 
file will be placed in a default, usually low, resolution
</p>

<span><b>Fig. 2.2</b> shows the model with the vector (<b>a</b>) and raster (<b>b</b>) markings. 
(Raster texture is named <em>decals.png</em>, and has size of 2048x2048 pixels):</span>
</div>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image22_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 2.2 Comparing vector and raster textures — the camera is in „normal” distance</spanl></td>
	</tr>
</table>
</div>
<div>

<p>Frankly speaking, comparing <b>Fig. 2.2a</b>) and <b>Fig. 2.2b</b>) is like typical puzzle: "find all differences".
It was hard to find the two, I have pointed on the picture. I think, that both have the same source: <b>svgtex</b>
uses simpler pixel approximation filters than Blender for the raster images. Anyway, there are no visible advantages
of the vector texture over the raster one.</p>

<span>So, let's take the camera closer to the model - for example, to the propeller blade (<b>Fig. 2.3</b>).
The Case (<b>a</b>) is a render with the raster texture, the case (<b>b</b>) - the same shot, but with the vector texture.
The case (<b>c</b>) it is even closer render with vector texture. You can read the inscription on the blade, and even the 
letters on the <em>Curtiss Electric Propellers</em> emblem!:</span>
</div>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image23_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 2.3 Comparing small inscriptions in the raster (<em>decals.png</em>) and vector (<em>decals.svg</em>) version</spanl></td>
	</tr>
</table>
<p/>
</div>
<div>
<b>Conclusion:</b> vector textures are useful, when you are planning to bring the camera closer to the model.
</div>
<div class="subheader">3. How it works?</div>
<div>
<span>The main idea of svgtex isn't any mystery. During rendering, 
Blender requests from the plugin a value for a single texel. To respond, <b>svgtex</b> renders 
fragments of the SVG picture into a raster images, kept in RAM memory. 
They will be also used on next Blender request. Every "rasterized" fragment has dimensions of 
256x256 pixels. (It allocates a 1 MB of RAM). The original SVG picture is divided like a 
checkerboard, into squares of unified area. Svgtex prepares and keeps only such "fields" of this 
"checkerboard", which contains pixels (texels) requested by Blender. 
In addition, when all pixels of such field have the same color, it keeps the single, 
"representative" pixel of this fragment, instead of 1 MB of identical color values.</span>
<p/>
<p>Svgtex creates raster fragments for many versions of the source picture. 
Each subsequent version has four times more pixels, than the previous one.
First version fits into single fragment (256x256 pixels). Second one has size of 512x512 pixels,
and is built from four fragments. The third version has 1024x1024 pixels and contains 16 fragments.
Speaking language of computer graphics, each picture in this sequence has different <em>Level of Details</em> 
(short form: <b>LoD</b>). This level is an integer number. In <b>svgtex</b>, I have used following convention:
the size of 256x256 pixels has <b>LoD</b> = 0, 512x512 pixels - <b>LoD</b> = 1, 1024x1024 has <b>LoD</b> = 2,
2048x2048 - <b>LoD</b> = 3, etc. Responding to Blender request, svgtex determines the optimal <b>LoD</b> 
of the image, and returns the pixel from appropriate picture version. If requested fragment is not prepared, yet 
- svgtex generates it at this moment.</p>

This plugin was written mainly for my own needs. In spite of this, thinking a little about the potential other users,
I have implemented most of the SVG 1.1 features. (It took a few months!). What was <u><em>not</em></u> implemented, is listed below:
<span>This plugin was written mainly for my own use. In spite of this, thinking a little about the potential 
other users, I have implemented most of the SVG 1.1 features. (It took a few months!). What was <u><em>not</em></u> 
implemented, is listed below:</span> <br/>
<ul>
<li>markers — because it would require a lot of work, and I have never used them in my drawings;</li>

<li>filters — actually only one type of the filter is implemented: <em>Gaussian blur</em>. 
I have not need the others, yet. Anyway, I have prepared for them a "filter framework" in the code, 
which would allow to implement the others without much effort. 
;</li>

<li>text — svgtex interpreter ignores the SVG internal types. In Windows it draws text using any 
<em>True Type</em> font (use this kind of the font for vector textures). In the source code there is a place, 
prepared for the other kinds of the type - <em>FreeFont</em>, for example. I have no need to implement them, 
because I use this plugin in Windows, only.
</li>

<li>raster images — all references in the SVG file to such images are ignored. (It is possible to add them to implementation) 
Svgtex is a specialized program for vector pictures. Anyway, using <b>AGG</b> library, it is relatively simple 
to add to implementation of this feature to the code.;</li>
</ul>
<p/>
</div>
<div>
Of course, the old wisdom of the programmers tells that "in every code remains at least one not fixed bug". This
component was always compared with Inkscape results. It passed a "real-life" test on the pictures, I have prepared for 
my models. I think, that most of its bugs have been eliminated. In case of problems, remember that you can use
the <a href="downloads-svgtex_e.xml" title="link to the page with source code to download">source code</a>
</div>
<div class="subheader">4. Description of the plugin controls</div>
<div>
<span>The layout of svgtex controls on the <b>Plugin</b> panel is the effect of many painful 
compromises with restrictions of Blender's data structure (defined in <em>plugin.h</em>).
For example - the path to <em>*.svg</em> file should be the first control.
Unfortunately, it was hard to incorporate any text value there - I had to copy solution from 
<b>vectex</b> component, although it is not documented on the Blender Foundation pages. 
I have tried hard, but it occurs that the only possible place for the file name is the last field, 
and the last control of the plugin (<b>Fig. 4.1</b>):</span>
</div>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image41_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 4.1 Functions of <b>svgtex</b> controls</spanl></td>
	</tr>
</table>
<p/>
</div>
<div>
<span>Below you will find the descriptions of all <b>svgtex</b> controls (in the same order, as they appear on the panel):</span><br/>
<ul>
<li><big><b>Extend</b>/<b>Repeat</b>/<b>Clip</b></big>: Determines what should be passed to Blender, 
when it requests a texel from the outside the picture area. 
<small>(Similar, switch, with more options, you can find also in the raster textures: see <em>Shading:Texture buttons</em>, <em>Map Image</em> panel).</small> 
Meaning of subsequent alternatives:
<ul>
<li><b>Extend</b>: outside the picture, duplicate pixels from its borders;</li>
<li><b>Repeat</b>: picture is duplicated to the infinity;</li>
<li><b>Clip</b>: outside the picture draw nothing (returns a transparent black pixel);</li>
</ul>
</li>
<li><big><b>Interpol</b></big> (<em>interpolation</em>): The level of pixel "smoothing". 
When <b>Interpol</b> = 0, svgtex uses the pixel nearest to requested texture coordinates.
In such case in some places of the model you can see the "grain" of the pixels. 
For value = 1, the color returned to Blender is an average of four pixels, located around requested point on the texture.
When <b>Interpol</b> = 2 — it is an average from 16 nearest pixels, and with <b>Interpol</b> = 3 svgtex uses 64 pixels 
located around the requested point. Every increase of interpolation level makes the texture more "blurred". It 
also increases the fragment generation time (each level requires four times more calculations, 
than the previous one). I expect, that usually you will use <b>Interpol</b> = 1 or 0. 
</li>
<li>
<big><b>Fid</b></big> (<em>fidelity</em>): Controls the texture resolution. Possible settings vary from -5.0 to 0.0. The value of 0.0 means the 
highest resolution. (It uses pixels from the single picture, which has <b>LoD</b> &gt;= requested by Blender. 
This setting is also one of the fastest). 
Every lower <b>Fidelity</b> value degrades the resolution of the image, calculating the texel value as an average
from two images of different <b>LoD</b>. It makes the difference between the pixels "softer" (eliminates the "grain" effect). 
<small>
For example, let's assume that for a particular Blender's request, svgtex determined the optimal <b>LoD</b> = 4
(it means picture 4096x4096 pixels). If <b>Fid</b> = -0.5, svgtex returns to Blender a texel color, which is
a mix of 50% from the picture having <b>LoD</b> = 4, and 50% from the picture having <b>LoD</b> = 3. 
Such averaging between two pictures is in computer graphics called <em>mipmapping</em>.
When <b>Fid</b> = -0.2, svgtex returns a texel which has color of 80% from <b>LoD</b>=4 (4096x4096) picture, 
and 20% from picture of <b>LoD</b>=3 (2048x2048). When <b>Fid</b> = -1.6, then svgtex use 40% of 2048x2048 picture
<em>(<b>LoD</b> = Max(<b>LoD</b> + <b>Fid</b>) = Max(4 - 1.6) = 3)</em> and 60% of 1024x1024 image 
<em>(<b>LoD</b> = Min(<b>LoD</b> + <b>Fid</b>) = Min(4 - 1.6) = 2)</em>. 
</small>
Anyway, do not escalate this setting - use <b>Fid</b> between -1.0 and 0.0 for bump maps, 
and <b>Fid</b> = 0.0 (no mipmapping) for color textures. 
</li>
<li>
<big>background color</big>: Standard Blender color picker to select the background. This color is visible where the source SVG
picture has transparent areas, only. (To keep them transparent, set <b>Alpha</b> to 0.0).
<small>Notice that on the <em>decals.svg</em> texture form the model enclosed to this page, the <b>Alpha</b> is just
set to 0.0. In spite of this, the background color has a slight influence on the borders between opaque 
and transparent areas. That's why I have proposed to set it to grey (40% black) (<b>Fig. 2.1</b>). If you set it to black, the
contours of the star roundels get an additional, darker tone.</small>
</li>
<li>
<big><b>Alpha</b></big>: opacity of the background color. Set <b>Alpha</b> to 0.0, to preserve the 
transparent areas from the source SVG picture;
</li>
<li>
<big><b>Df.LoD</b></big> (<em>Default Level of Details</em>): When you turn <b>Enabled</b> on, svgtex generates 
complete pictures (all fragments) having <b>LoD</b> &lt;= <b>Df.LoD</b>.
The picture version of this <b>LoD</b> is used as default when the <b>OSA</b> 
(<em>oversampling</em>) render setting is turned off.
Usually set it to level 1 or 2. Higher values can make the time of displaying on the <b>Preview</b> panel much longer!
</li>
<li>
<big><b>Force Df.LoD</b></big>: Forces on svgtex to always use the image version having <b>LoD</b> = <b>Df.LoD</b>, 
regardless of Blender requests;
</li>
<li>
<big><b>Mem Max</b></big>: Maximum amount of RAM (in MB), which can be used by svgtex for image fragments. Select this value with care,
observing the value displaying by the <b>Used</b> field (on the right). If you set <b>Mem Max</b> on the level
below typical <b>Used</b> value, sometimes plugin is forced to "drop" some fragments, to make place for a new ones. 
These discarded fragments still can be requested during the same render pass, and svgtex will generate them anew, few
moments later. To find place for them, it will drop another fragments, and so on. It can make the time of rendering 
longer;
</li>
<li>
<big><b>Used</b></big>: Field used for information purpose, only. It shows actual amount of RAM, used by the image fragments (in MB).
Sometimes it can exceed <b>Mem Max</b> a little - it is the size of the <em>*.svg</em> file content.
<b>Used</b> lets you to make better decision, how to set <b>Mem Max</b> value in an optimal way: to not consume too 
much memory, but not to slow down the rendering process;
</li>
<li>
<big><b>Enable</b></big>: Enables the texture (it becomes "visible" to Blender). When you turn it off, all image fragments are released.
(This effect you can use to reset the svgtex memory);
</li>
<li>
<big><b>File name</b></big>: Path to <em>*.svg</em> file, or (what is described in the <a href="scripts-svgtex2_e.xml">advanced part</a>)
 - <em>*.xml</em> shortcut. This field isn't too long - you can type up to 63 characters. The best practice is to use
 relative paths, here (relative to actual Blender file). This way, when you move the whole project folder to 
 another place, it does not spoil the rendering;
</li>
</ul>
<p/>
</div>
<div>
<span>After this exhausting description, few simple practical advises:</span><br/>
<li>On the first use of a large, detailed SVG file, set the <b>Mem Max</b> limit to 40MB or higher.
Generate the first rendering, and look at the <b>Used</b> value, to check how much RAM is consumed by svgtex.
When <b>Used</b> &lt; <b>Mem Max</b>, set <b>Mem Max</b> to 110% of <b>Used</b>. When <b>Used</b> = <b>Mem Max</b>,
increase <b>Mem Max</b> and repeat this process.</li>
<li>For the texture of markings and other sharp, detailed drawings, use <b>Interpol</b> = 0 or 1 and <b>Fid</b> = 0.0;</li>
<li>For bump maps use <b>Interpol</b> = 1 and <b>Fid = -0.5</b>, to make the groves smoother;</li>
</div>
<div class="subheader">5. svgview.exe: a tool to check the SVG files</div>
<div>
<span>This SVG file viewer is a „byproduct” of the svgtex development. It is placed in the same folder, 
where <em>svgtex.dll</em> file. <em>Svgview.exe</em> is, in fact, the test program from the examples enclosed to
<b>AGG</b> library. I have used it to debug the SVG parser, before using it in the svgtex plugin. You can use 
<em>svgview.exe</em> to check, how svgtex will display a particular picture. To do this, just run it from command
line, passing the path to the <em>*.svg</em> file as the argument (<b>Fig 5.1</b>):</span><br/>
<div>
<table cellSpacing="0" cellPadding="0pt" align="center">
	<tr align="center" valign="top">
		<td>
			<IMG src="images/scripts/svgtex1/image51_e.png" align="right"/>
		</td>
	</tr>
	<tr align="center" valign="top" >
		<td><spanl>Fig. 5.1 Using <em>svgview.exe</em></spanl></td>
	</tr>
</table>
<p/>
</div>
<span>Use the <b>Scale</b> bar, at the top of the screen, to zoom the image. To move it (panning), just 
drag the mouse (with left button pressed). The picture is redrawn after every change of the scale or place. 
The numbers at the top of the screen (<b>Fig. 5.1</b>) shows, how many vertices have been encountered, and 
how much time actual picture has been drawn. 
</span><br/>
<span>
Take notice on large number of vertices on the <b>Fig. 5.1</b> - nearly 2 millions. 
This is my „stress test”: <a href="downloads/skin.svg" title="This file is also enclosed to the exemplary model, available at the top on this page.">skin.svg</a> file.
It contains all technical details of the skin of the P-40B airplane.
It is a serious effort for a SVG parser, to draw it. Airplanes have riveted skins, and each row of the rivets
is a line of the text, there. Each rivet is a round "dot" character, and distance between them is typed with spaces.
Rivets are so small and pale, that you cannot see them, on <b>Fig. 5.1</b>. But open this image yourself, 
with <em>svgview.exe</em>. When you increase the scale on the fuselage or wings, you can see these small circles, darker just by a tone.
Nearly all (95%) among 1 983 458 vertices, counted by the program, belong to the rivets (32 vertices per one).
</span><br/>
<p>
Such huge amount of text - 50 thousand of dots, not counting spaces - is a challenge for SVG parser. At final stages of work
over this drawing, my Inkscape slowed down so much, that I started to measure the redraw time of <em>skin.svg</em> (there was nothing more to do, anyway).
Then I started to compare it with the other SVG interpreters, I have on my computer: Firefox web browser, and my <em>svgview.exe</em>.
<b>Fig. 5.2</b> presents the results. Thy were measured on my laptop (Dell Latitude 610 - Intel Centrino 1.6 MHz, 1GB RAM, Windows XP):
</p>
</div>
<div>
<table cellSpacing="0" cellPadding="7pt" align="center">
	<tr align="center" valign="top">
		<td class="framed">
			<b>SVG interpreter</b>
		</td>
		<td class="framed">
			<b>Redraw time (s)</b>
		</td>
		<td class="framed right">
			<b>RAM usage (MB)</b>
		</td>
	</tr>
	<tr align="center" valign="top">
		<td class="framed">
			<em>Inkscape 0.49</em>
		</td>
		<td class="framed">
			45.0
		</td>
		<td class="framed right">
			398
		</td>
	</tr>
	<tr align="center" valign="top">
		<td class="framed">
			<em>Sketsa Editor 6.3</em>
		</td>
		<td class="framed">
			from 2.0 to 20.0
		</td>
		<td class="framed right">
				350
		</td>
	</tr>
	<tr align="center" valign="top">
		<td class="framed">
			<em>Firefox 3.5</em>
		</td>
		<td class="framed">
			12.0
		</td>
		<td class="framed right">
			27
		</td>
	</tr>
	<tr align="center" valign="top">
		<td class="framed bottom">
			<em>svgview.exe</em>
		</td>
		<td class="framed bottom">
			1.5
		</td>
		<td class="framed bottom right">
			2
		</td>
	</tr>
	<tr align="center" valign="center">
		<td colspan="3"><spanl>Fig. 5.2 Time and memory, consumed to redraw the <a href="downloads/skin.svg" title="Open this file in your browser">skin.svg</a> file.</spanl></td>
	</tr>
</table>
</div>
<div>
<span>As you can see, <b>svgview.exe</b> needs only 1.4 second and 2 MB RAM to draw this file, 
while the same thing takes Inkscape 45 sec. and 400 MB RAM! It is a surprise - 
I ensure, that in <em>svgview</em> code there are plenty of places for simple optimizations, not implemented, yet.
The program itself was compiled in MS Visual C++ 6.0, dated from previous century (1998).
Well, Inkscape is an editor, so it has to keep and process SVG data in another way, than the simple viewer. But look
at another SVG editor: Sketsa. Somebody did a serious optimization of drawing process, there. When you use zooms &lt; 100%, it
has redraw time of 2 seconds. For zooms &gt; 100% it redraws in 5 to 20 seconds, depending on the zoom value.
I think that the tremendous amount of memory and time, consumed by Inkscape, is the evidence of an error in 
its architecture.</span>
<br/>
<small>
On the other hand, Sketsa has less functions than Inkscape. What's more, it shows a white screen for the attempt
to zoom <em>skin.svg</em> to 400% or more. It hangs when you try to select an element from this drawing. I do not 
recommend this editor.</small><br/>
<small>
I have not expected to create so fast interpreter, although <b>AGG</b> template library, used by my parser, lets the compiler to
create fast, optimized binary code. I suppose that this is the reason of its superb performance!</small> 
</div>
<div class="subheader">6. Advanced features</div>
<div>
You can have more control over svgtex, placing in the <b>File Name</b> the path to a special <em>*.xml</em>
file, instead of <em>*.svg</em> picture. I called them <b>XML shortcuts</b>, because they point to a SVG file or 
files that compose the texture. They are also able to "modulate" many properties of the source drawings: switch
the visibility of their layers, add additional blur, etc. This is optional feature, which require basic knowledge 
of the XML syntax. If you want to learn more — 
go to the page about <a href="scripts-svgtex2_e.xml" title="go to the page, which describes advanced functionality of svgtex">XML shortcuts</a>.
</div>
</body>

