ProcedurX – User Manual

General

Creating procedural assets

Entries to create procedural assets can be found in the hierachy context menu under Create/ProcedurX/. Additionally, procedural assets can be duplicated using Unity’s duplicate feature (Control+D), yielding a deep copy of the procedural asset’s graph.

Opening the editor windows

The ProcedurX plugin comes with two additional Editor Windows: The editor and the preview window. Both can be re-opening through the entries in the top bar menu, under Window/ProcedurX/.

Modifying operator properties

All procedural assets and operators are effectively ProceduralAssets, and their properties can be modified through Unity’s own Inspector window.

Adding new operators

When right clicking in the blank space in between nodes, you can find and add operators under the context menu’s — Add Operator — section. Grouped by operator output type.

Operator context menu

When right clicking directly on an operator, you can access the operator context menu. You can find the different actions that can be taken on an operator, and their associated shortcut keys.

ProcedurX Editor

Controls

The mouse wheel can be used to change the zoom of the view. Holding down the middle click and dragging will pan the view. Operators can be moved arround using the mouse left click and drag gesture.

In order to create, modify, or remove the links in between operators, left click and drag from an output or an input. Doing so will also enable the display of all input and output names.

Types and colors

In order to display visually which input can be connected to which output, the drag points and links are color codded by type (Texture2D, float, int, etc.). Links can only be created from matching drag points.

Automatic/Manual export

ProcedurX updates operator previews in real time, but saving the final output files is a much slower process as disk access is slower and Unity has to reimport the files. In order to accommodate user preferences, Export can either be set to automatic, with a debounce timer, or manual. If you go for a manual export, it can be kicked off on the procedural assets, by the Export button.

Format and resolution can also be tweaked from the procedural asset inspector.

Operators

Operators are classified by their output type.

Texture 2D

AutoNormals

AutoNormals, as its name states, generates a normal map from a texture. It’s other properties are the weight and distance of the samples. Use 1.0 to both for default behavior.

BakeMesh [1.1]

Bakes a mesh into a Texture2D, with given camera settings. Supported modes are Normals, Depth or Texture.

Blend

Blends two textures into a single one. Currently supported blend modes are Multiply, Add, Substract, Divide, and Average.

Blur

Applies a blur effect to a texture. Supported blur types are Gaussian 3×3, Gaussian 5×5, Box 3×3 and Box 5×5.

Brick

Create a tile/brick pattern. Has many properties, as follows:

  • Color A | B : Tile colors will be randomly picked in a gradient between these 2 colors.
  • Color C: For the space in between the tiles.
  • Seed: Used for random values.
  • Threshold: Changes how big the space in between the tiles is.
  • Shift Ammount X | Y: Controls how much shift occurs in between rows/columns. Use only either of them and leave the other, or both, at 0.
  • Shift every other: How many rows/columns before the shift comes back in sync.

Cells

Create grayscale cells. Supported modes are Voronoi and Smooth Voronoi.

ClearColor

Creates a texture filled with a given color.

Combine

Combines 4 grayscale images into a single one with 4 channels. If non grayscale inputs are given, will compute luminance instead.

Distort

Re-samples a texture with offsets applied. Supported distortion modes are Offset and Radial. For offset, the samples UV are shifted by the modulator texture’s first two channels. For radial, the samples are distorted using polar coordinates of the modulator texture’s first two channels. The weight is a factor to control by how much the modulator affects the output.

Edge

Detect edges in a given texture. Modes are Sobel or Valley. Weight and threshold allow to tweak sensitivity and cutoff of the effect.

Gradient2D

Creates a 2D texture from a gradient. Scale allows to control the frequency of the gradient.

GradientMap

Samples a gradient for each pixel’s value in a grayscale source. If a colored image is given as input, will compute luminance instead.

[1.1] Texture1D source can now be specified for the gradient.

GrayScale

Computes luminance from a colored texture and outputs a grayscale version of the texture.

Inverse

Returns a texture where every color is reversed (1 – value). Alpha is left untouched.

Levels

Allows to remap the value ranges for each channel of a texture, or all of them at once.

Mask

Blends two textures using a third one as a mask. Modes are Linear or Smooth. If the mask texture is not grayscale, it will compute luminance.

Noise

Creates a noise texture. The seed allows to control the randomize the output, while the scale controls the frequency of the noise. Several noise types are supported:

  • Simplex
  • Value
  • Value4
  • Gradient
  • Gradient4
  • Voronoise: where parameters 1 and 2 control the angles and smoothness

The RGB option, when toggled, will generate 3 versions of the noise for the RGB channels of the output texture. Can be useful to generate Distortion modulators.

Shapes

Generates a texture with procedural shapes. Currently supported shapes are Horizontal and Vertical lines. Color A and B will be alternated, and the thickness of the lines can be tweaked.

TexturePicker

As the name implies, used to use an existing texture as an input for something else.

Tile [deprecated]

Re-samples texture with UV multipliers.

[1.1] Has been replaced by Transform.

Transform [1.1]

Re-samples texture with a given scale, offset, angle and texture wrap mode.

Vignette

Adds a vignette effect to a given texture.

Texture1D [1.1]

Gradient1D [1.1]

Creates a 1D texture from a gradient. Scale allows to control the frequency of the gradient.

Slice [1.1]

Slice a texture 1D from a texture 2D with a given scale, offset, angle and texture wrap mode.

Mesh

Duplicate [1.1]

Duplicate a mesh with a randomized position, scale and rotation. Scale can be asymetric or not.

MeshPicker [1.1]

As the name implies, used to use an existing mesh as an input for something else.

MeshTransform [1.1]

Transform a mesh with a given Translation, Rotation and Scale.

Primitive [1.1]

Input operator to pick one of the built in meshes: Sphere, Capsule, Cylinder, Cube, Plane, Quad

Tesselate [1.1]

Increases the resolution of a mesh by breaking down triangles into smaller ones. Number of passes can be specified.

VertexDisplacement [1.1]

Moves vertices of a mesh relative to the center of the mesh with a given factor. Modulator is a specified 2D texture sampled in spherical coordinates. »

Color

ColorPicker [1.1]

Input operator to specify a constant color.

SampleTexture1D [1.1]

Samples a color from a Texture 1D at a given u coordinate.

Float

FloatArithmetic [1.1]

Combines two floats with one of the following operatations: Add, Substract, Multiply, Divide, Exponent, Root, Modulo.

FloatPicker [1.1]

Input operator to specify a constant float.

Integer

IntArithmetic [1.1]

Combines two integers with one of the following operatations: Add, Substract, Multiply, Divide, Modulo.

IntPicker [1.1]

Input operator to specify a constant integer.

Vector3

Vector3Picker [1.1]

Input operator to specify a constant Vector3.

Matrix4x4

Matrix4x4Picker [1.1]

Input operator to specify a constant Matrix4x4 or built it from given translation, rotation and scale values.

%d blogueurs aiment cette page :