Skip to content

Get started (Raster-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 multiple files:

  • input.tiff: a displacement map to process
  • config.yml: a configuration file, to specify the scaling factor for each pattern
  • mask_ds2_s1.jpg, .., mask_ds2_s3.jpg: 3 masks, that can be produced with your favorite texturing tool.

Each mask defines where a pattern is to be synthesized on the map. For instance, mask mask_ds2_s1.jpg defines where pattern s1 is to be applied on the input image. More on this below.

All patterns can be found in the datasets section. Patterns 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 to the project folder, then run:

nxt synth input.png mask_*

Once you've launched the command, 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 updated 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.

The nxt command, and how to name masks

The command nxt groups all functionalities related to Nexture. The subcommand synth triggers a synthesis. The nxt synth command expects at least as parameters the name of the image to process (input.png) followed by a pattern common to all masks (masks_*).

Masks should be named like such:

<common name>_<dataset ID>_<pattern ID>.jpg

For instance, in the case of the starter project, the common name is mask, the dataset ID is ds2 and the pattern ID is s1, s2 and s3. Therefore the names are:

mask_ds2_s1.jpg
mask_ds2_s2.jpg
mask_ds2_s3.jpg

Please note that the mask pattern must be defined only with the <common_name>, like this:

<common_name>_*

This is to let Nexture identify to which dataset/pattern the mask is associated to, just from its filename.

Preview mode (experimental)

To get much faster feedback, 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.

PREVIEW ILLUSTRATION

Adding a mask

To add a new mask/pattern, simply create a new image with the following characteristics:

  • Name it mask_<dataset ID>_<pattern ID>.jpg. For dataset ds2 (the only choice for now) and pattern s14, the name is mask_ds2_s14.jpg
  • Give it the same dimensions than any other existing masks

The mask's pixel color indicates the weight of the pattern:

  • white pixels have a weight of 1, corresponding to an active area
  • black pixels have a weight of 0, and are ignored
  • values in between assign a proportional weight between 0 and 1.

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

Learn how to prepare a new project from scratch for a new image in the next section.