Texture Transforms
10 nodes
On this page 10
Break Up Tiling
FunctionBreaks up a tiling texture's repetition: a texture several copies across, in which every copy shows the texture moved, turned and scaled at random, blended across the seams so no two copies match and no seam shows. Across a floor or a hillside, where the same stone in the same place every metre gives a tiling texture away, this is what hides it. The result still tiles, but only every Tiles Across copies.
BreakUpTiling -> Texture
texture: Texture
tilesAcross: Integer
blend: Number
rotation: Number
scaleVariation: Number
contrast: Number
seed: Integer
size: IntegerTexture BreakUpTiling(
Texture texture,
int tilesAcross = 4,
double blend = 0.3,
double rotation = 360,
double scaleVariation = 0,
double contrast = 0.5,
int seed = 0,
int size = 2048)Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The tiling texture. |
| tilesAcross | Integer | 4 | How many copies of the texture the result is across, and how far apart its own repetition is. |
| blend | Number | 0.3 | How wide the seams' blend is, as a share of a copy: 0 cuts hard, 1 blends across the whole copy. |
| rotation | Number | 360 | How far each copy may turn, in degrees: 0 for a texture with a direction (planks, brushed metal, rain), 360 for one without. |
| scaleVariation | Number | 0 | How much each copy may grow or shrink, 0 to 0.5. |
| contrast | Number | 0.5 | How much the brighter (higher) copy wins where two meet, 0 to 1: high keeps stones whole across a seam, 0 cross-fades. |
| seed | Integer | 0 | Which random arrangement. |
| size | Integer | 2048 | The result's width and height in pixels; it holds Tiles Across copies, so each copy gets this divided by Tiles Across. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Cartesian To Polar
FunctionWraps a texture round the centre: its left-to-right becomes the angle round, its top-to-bottom the distance out. A row of stripes becomes rings; a gradient becomes a sunburst.
CartesianToPolar(texture: Texture) -> Texture
Texture CartesianToPolar(Texture texture)
Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Make It Tile
FunctionMakes a texture that does not tile - a photograph - tile, by blending it with two copies of itself, one moved half a tile and one a quarter, each used away from its own seams. The original's seams are its edges, the half copy's a cross through the middle, the quarter copy's a grid between them; no point lies on all three, so every point has a copy with no seam there, and the blend's edges are broken up by noise so they do not show as lines.
MakeItTile -> Texture
texture: Texture
blendWidth: Number
seed: IntegerTexture MakeItTile(
Texture texture,
double blendWidth = 0.25,
int seed = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| blendWidth | Number | 0.25 | How far from its seams a copy fades in, as a share of the texture: wider hides seams better and shows more doubling. |
| seed | Integer | 0 | Which noise breaks up the fades' edges. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Mirror
FunctionReflects one half of a texture onto the other: symmetric ornaments, or a quick way to hide a seam.
Mirror -> Texture
texture: Texture
axis: Mirror Axis
keepSecondHalf: TruthTexture Mirror(
Texture texture,
MirrorAxis axis = MirrorAxis.Horizontal,
bool keepSecondHalf = false)Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| axis | Mirror Axis | Horizontal | Mirror across, down, or both. |
| keepSecondHalf | Truth | False | Keep the right (or bottom) half and reflect it, rather than the left (or top). |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Offset
FunctionMoves a texture across and down, wrapping round. Half and half shows what was at the corners in the middle, which is where a seam would show.
Offset -> Texture
texture: Texture
offsetX: Number
offsetY: NumberTexture Offset(
Texture texture,
double offsetX = 0.5,
double offsetY = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| offsetX | Number | 0.5 | Across, as a share of the width. |
| offsetY | Number | 0.5 | Down, as a share of the height. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Polar To Cartesian
FunctionUnwraps a texture from round its centre: the angle round becomes left-to-right, the distance out top-to-bottom. Rings become stripes.
PolarToCartesian(texture: Texture) -> Texture
Texture PolarToCartesian(Texture texture)
Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Repeat
FunctionRepeats a texture a whole number of times across and down at the same size, so it tiles finer.
Repeat -> Texture
texture: Texture
countX: Integer
countY: IntegerTexture Repeat(Texture texture, int countX = 2, int countY = 2)
Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| countX | Integer | 2 | Repeats across. |
| countY | Integer | 2 | Repeats down. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Resize
FunctionResamples a texture to a new size: box-filtered when it shrinks, bilinear when it grows.
Resize(texture: Texture, size: Integer) -> Texture
Texture Resize(Texture texture, int size = 512)
Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| size | Integer | 512 | The new width and height in pixels. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Rotate90
FunctionTurns a texture by quarter turns, exactly, with no resampling.
Rotate90(texture: Texture, quarterTurns: Integer) -> Texture
Texture Rotate90(Texture texture, int quarterTurns = 1)
Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| quarterTurns | Integer | 1 | Quarter turns clockwise. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing
Transform
FunctionMoves, turns and scales a texture about its centre, reading across its edges so the result still tiles when the scale is a whole number and the turn a quarter.
Transform -> Texture
texture: Texture
offsetX: Number
offsetY: Number
rotation: Number
scale: NumberTexture Transform(
Texture texture,
double offsetX = 0,
double offsetY = 0,
double rotation = 0,
double scale = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
| offsetX | Number | 0 | Moves it across, as a share of the width. |
| offsetY | Number | 0 | Moves it down, as a share of the height. |
| rotation | Number | 0 | Turns it, in degrees clockwise. |
| scale | Number | 1 | Repeats it this many times across; 2 shows it twice as small. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Transforms
- Package
- Image Processing