Get started with nexture (svg-masks workflow)
Let's launch your first synthesis. Please download the starter project.
It contains the following files:
The starter project contains 3 files:
input.tiff: a displacement map to process
config.yml: a configuration file
masks.svg: SVG pattern placement file
masks.svg with Inkscape (see installation):
Each mask defines where, on the input image, a pattern is to be synthesized.
If you zoom in, you'll notice for instance that the green mask delimitates pattern
All patterns can be found in the datasets section, but as a remainder
s3 are skin patterns coming from the arm, near the elbow.
Let's run a first synthesis, with the default masks and settings.
Open a terminal (
cmd.exe), navigate inside the terminal to the project folder, then run:
nxt synth input.png masks.svg
A first synthesis job will start:
.__ __. __________ ___ .___________. __ __ .______ _______ | \ | | | ____\ \ / / | || | | | | _ \ | ____| | \| | | |__ \ V / `---| |----`| | | | | |_) | | |__ | . ` | | __| > < | | | | | | | / | __| | |\ | | |____ / . \ | | | `--' | | |\ \----.| |____ |__| \__| |_______/__/ \__\ |__| \______/ | _| `._____||_______| Copyright 2018 CRONOBO S.A.S.U. ([email protected]) [0:00:01] Validated license. Expiry: 2058-08-01T00:00:00Z [0:00:01] Image file is: input.png [0:00:01] Pattern placement file is: mask_* [0:00:01] Initializing... ...
result.jpg file is immediately created, that will be filled with synthesized pixels as the render progresses:
Please note that the animation above is at speed x100. Actual speed is much slower
It takes approximately 5-10 minutes to synthesize at first scale, and about 50 minutes for the second and final scale.
Upon completion, Nexture will also export a
result.exr file that contains a full-quality export of the synthesized image.
Preview mode (experimental)
To get fast feedback during initial setup, Nexture has a preview mode.
Simply replace the
synth command by the
nxt preview input.png mask_*
In preview mode, the result is not synthesized. It is simply created by copying pixels from the dataset onto the image.
It gives you a visual idea of how the patterns will look like on the image. Although very crude, this preview is generated in less than a minute, for the entire image, making it ideally suitable for initial configuration phase.
Adding a new mask
First, inside Inkscape, start by opening the side panel. Open the
Objects menu and click
Fill and Stroke:
- Move around by holding
Ctrl& keeping pressed the mouse wheel (and moving the wheel around).
- Zoom-in/zoom-out by holding
Ctrl& rolling the mouse wheel
Now, follow the steps below to create a new mask:
- Click on the
Bezier curvetool (left vertical iconbar).
- Click on the image to create a first point
- Create another point
- Click one last time on the first point to close the contour
Fill & Strokeside panel, in the
Filltab, click on the
patternicon (the rotated checkerboard icon)
- Click on the dropdown list
- Scroll if needed
- Select the name of the pattern you want to associate with this mask
The GIF below summarizes the process:
Once you're done, save the SVG file and relaunch the synthesis.
Changing pattern scale
Each pattern visual scale can be changed, to let you synthesize finer or coarser details to your image.
config.yml with any simple text editor, and change the scale associated to the pattern (1.0 by default) to a smaller value (minimum is 0.125).
Then, relaunch in preview mode or in synth mode to observe the effect.
The mask file is specifically tailored for a given image. Learn how to prepare a new project from scratch for a new image in the next section.