Skip to content

Get started with nexture (svg-masks workflow)

The sections below will guide you through preparing and launching your first synthesis.

Please download the starter project that contains the following files:

Starter pack preview

The starter project contains 3 files:

  • input.tiff: a displacement map to process
  • config.yml: a configuration file, to specify the scaling factor for each pattern
  • masks.svg: SVG pattern placement file

Please open masks.svg with Inkscape (see installation):

SVG masks

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 s1.

All patterns can be found in the datasets section, but as a remainder s1, s2 and s3 are skin patterns coming from the arm, near the elbow.

DS2 S1 pattern

First synthesis

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...

A result.jpg file is immediately created, that will be filled with synthesized pixels as the render progresses:

Synthesis progress

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 preview command:

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:

GIF for opening the side panel

Inkscape Tips:

  • 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:

  1. Click on the Bezier curve tool (left vertical iconbar).
  2. Click on the image to create a first point
  3. Create another point
  4. Repeat
  5. Click one last time on the first point to close the contour
  6. Inside Fill & Stroke side panel, in the Fill tab, click on the pattern icon (the rotated checkerboard icon)
  7. Click on the dropdown list
  8. Scroll if needed
  9. Select the name of the pattern you want to associate with this mask

The GIF below summarizes the process:

GIF for creating area

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. Open 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.

What's next

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.