Texture Sources
8 nodes
On this page 8
Image As Color
FunctionA picture as a colour texture: an 8-bit picture decoded from sRGB to linear light, an HDR picture taken as it is. For a picture of colour - a photograph, a hand-painted texture.
ImageAsColor -> Texture
image: I Pixel Image Sampler
size: IntegerTexture ImageAsColor(IPixelImageSampler image, int size = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| image | I Pixel Image Sampler | — | The picture. |
| size | Integer | 0 | Resampled to this size; 0 keeps the picture's own size. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
Image As Data
FunctionA picture as data: its grey values taken as numbers from 0 to 1 with no decoding. For a picture of a height, a mask or a roughness map.
ImageAsData -> Texture
image: I Pixel Image Sampler
size: IntegerTexture ImageAsData(IPixelImageSampler image, int size = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| image | I Pixel Image Sampler | — | The picture. |
| size | Integer | 0 | Resampled to this size; 0 keeps the picture's own size. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
Image As Normal
FunctionA normal map picture as a normal texture: its colours taken as the vector's components with no decoding.
ImageAsNormal(image: Pixel Image, directX: Truth) -> Texture
Texture ImageAsNormal(PixelImage image, bool directX = false)
Parameters
| name | type | default | description |
|---|---|---|---|
| image | Pixel Image | — | The normal map. |
| directX | Truth | False | Whether the picture follows DirectX's convention (green pointing down), which is flipped here to the OpenGL convention glTF uses. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
Linear Gradient
FunctionA ramp from 0 to 1 across the texture, repeating a whole number of times so it tiles; mirrored, it rises and falls back instead of jumping.
LinearGradient -> Texture
direction: Gradient Direction
repeats: Integer
mirrored: Truth
size: IntegerTexture LinearGradient(
GradientDirection direction = GradientDirection.Horizontal,
int repeats = 1,
bool mirrored = false,
int size = 1024)Parameters
| name | type | default | description |
|---|---|---|---|
| direction | Gradient Direction | Horizontal | Which way the ramp runs. |
| repeats | Integer | 1 | How many times the ramp repeats across the texture. |
| mirrored | Truth | False | Rise and fall (a triangle) rather than rise and jump back (a saw). |
| size | Integer | 1024 | Width and height in pixels. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
Radial Gradient
FunctionA round gradient: 1 at the centre falling to 0 at the radius, measured across the tile's edges so it tiles.
RadialGradient -> Texture
centerX: Number
centerY: Number
radius: Number
size: IntegerTexture RadialGradient(
double centerX = 0.5,
double centerY = 0.5,
double radius = 0.5,
int size = 1024)Parameters
| name | type | default | description |
|---|---|---|---|
| centerX | Number | 0.5 | The centre across, 0 to 1. |
| centerY | Number | 0.5 | The centre down, 0 to 1. |
| radius | Number | 0.5 | Where it reaches 0, as a share of the texture's width. |
| size | Integer | 1024 | Width and height in pixels. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
To Picture
FunctionA texture as an ordinary 8-bit picture, for saving or for nodes that take pictures: colour encoded to sRGB, data written as it is.
ToPicture(texture: Texture) -> Pixel Image
PixelImage ToPicture(Texture texture)
Parameters
| name | type | default | description |
|---|---|---|---|
| texture | Texture | — | The texture. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
Uniform Color
FunctionA colour texture of one colour everywhere. The colour is given as it looks on screen (sRGB) and held in linear light.
UniformColor(color: Color, size: Integer) -> Texture
Texture UniformColor(ColorElement color, int size = 1024)
Parameters
| name | type | default | description |
|---|---|---|---|
| color | Color | — | The colour. |
| size | Integer | 1024 | Width and height in pixels. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing
Uniform Value
FunctionA greyscale texture of one value everywhere: a flat height, a constant roughness.
UniformValue(value: Number, size: Integer) -> Texture
Texture UniformValue(double value = 0.5, int size = 1024)
Parameters
| name | type | default | description |
|---|---|---|---|
| value | Number | 0.5 | The value, usually between 0 and 1. |
| size | Integer | 1024 | Width and height in pixels. |
Returns
| result | Texture |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Texture Sources
- Package
- Image Processing