SVG

First of all you must have one of the following packages to make it works

Both of these packages works the same. they generate the mesh from the svg file and paintcraft just render this mesh to the texture and then paint all unique regions - and use it as a page config.

If you use Adobe AI result svg files contains viewBox parameter. this parameter used for the result page config width and height. Just in case you didn't know svg is a plain xml file.

Package setup

As I mention above you must purchase one of the packages and import it to the project. here is a small instruction

Simply SVG

  1. Import Simply SVG package in to the project

  2. Import (double click at) PaintCraft/Pro/SVG/SimplySVG.unitypackage in to the project

  3. At the new folder PaintCraft/Pro/SVG/SimplySVG/PageConfigs you will find 3 demo pages which you can select at paintcraft controller as you did for standard

  4. Use context menu to create new page configs

SVG Importer

  1. Import SVGImporter int to the project.

  2. Import (double click at) PaintCraft/Pro/SVG/SVGImporter.unitypackage in to the project

  3. At the new folder PaintCraft/Pro/SVG/SVGImporter/PageConfigs you will find 3 demo pages

  4. Use context menu to create new page configs

Prepare SVG files

Just rename .svg file to .svg.txt and you will be able to use it as standard unity asset. And just make sure that you have viewBox parameter as on the first screenshot of this document.

PageConfig Parameters

Any of the importer has the same parameters.

Name

Description

UniqueId

Unique page config across all page configs used in this project

StartImagePath

If you wish to have default background image you can set this up.

SVG Asset

link to the renamed .svg to .svg.txt file

Cache Generated Textures

If you wish generated outline and region files could be cached on the device. so next time you will open the same page those texture will be used.

SvgAntialiasing

This is how smoth your line will be. more info about antialiasing at Unity Antialiasing Manual

RegionMaxAlpha

After your outline layer generated region calculation routine started. It takes all closed regions with alpha [0:250] and fill it with unique color. this means if you have 2 neighbor pixels with alpha = 0 and alpha = 250 this pixels considers as the same region and will be painted to the same color.

FilterMode

point result texture are rendered. Point - means no filter and this allow you to make perfect floodfills.

Last updated