Heightmap Texture Sampler
13 nodes
On this page 13
Apply Tiled Texture
FunctionApplies a tiled texture over an existing base layer.
ApplyTiledTexture -> Pixel Image
baseLayer: Pixel Image
textureSample: Pixel Image
transform: Image Transform
mask: Scalar FieldPixelImage ApplyTiledTexture(
PixelImage baseLayer,
PixelImage textureSample,
ImageTransform transform,
ScalarField2D mask)Parameters
| name | type | default | description |
|---|---|---|---|
| baseLayer | Pixel Image | — | Base layer. Its dimensions decide the final output size. |
| textureSample | Pixel Image | — | The source texture sample to tile over Base Layer. |
| transform | Image Transform | — | Texture-placement transform applied in destination pixel space. |
| mask | Scalar Field | — | Optional opacity mask. Must match Base Layer size. |
Returns
| result | Pixel Image |
Remarks
Base Layer decides the final output size. Texture Sample is tiled to fit
that size, then composited over Base Layer using normal source-over alpha composition.
With ImageTransform.Identity, one source texture pixel maps to one destination pixel. If the base
layer is larger than Texture Sample, the texture repeats automatically through wrapped sampling.
ImageTransform.Scale controls the visual size of each repeated tile. A scale of (2, 2) makes
each tile twice as large in destination pixels, producing fewer visible repetitions. A scale of (0.5, 0.5)
makes each tile half as large, producing more visible repetitions.
If Mask is provided, it must have the same dimensions as Base Layer.
The mask controls the opacity of the tiled texture before it is composited over the base layer: 0 means no
texture effect, 1 means full tiled texture opacity. If the mask is not already normalized to 0..1, it is
interpreted by rescaling its current elevation range to 0..1.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Quick Texture
FunctionTextures a terrain in one step and answers its colour: Divooka's library materials laid by height or by the land's shape, at their true size, baked at a resolution of its own. For the normal, roughness and height maps as well, use Bake Terrain Surface; for materials of your own, give a Terrain Palette.
AutoLayering -> Pixel Image
heightField: Scalar Field
mask: Scalar Field
scheme: Quick Color Scheme
palette: Terrain Palette
bakeSize: Integer
water: Scalar FieldPixelImage AutoLayering(
ScalarField2D heightField,
ScalarField2D mask,
HeightmapTextureSampler.QuickColorScheme scheme = QuickColorScheme.Height,
TerrainPalette palette,
int bakeSize = 2048,
ScalarField2D water)Parameters
| name | type | default | description |
|---|---|---|---|
| heightField | Scalar Field | — | Heights in metres; its PhysicalScale must be metres per cell. |
| mask | Scalar Field | — | Not used; kept so that documents saved with it still open. |
| scheme | Quick Color Scheme | Height | By height bands, by the land's shape, or in flat colours. |
| palette | Terrain Palette | — | The materials by role; Divooka's default palette when omitted. |
| bakeSize | Integer | 2048 | Pixels across the result; the depth follows the terrain's shape. |
| water | Scalar Field | — | The water surface in metres, NaN on dry ground, as Terrain Water's Fill gives it in Surface Elevation; give the same to the viewer, which lays it level. Without it there is no water. |
Returns
| Texture | Pixel Image |
Remarks
Scale is what decides whether this looks convincing or plainly wrong. Each material covers a known width of ground (two metres of forest floor, ninety of rock seen from the air) and the terrain's PhysicalScale says how much ground a cell covers, so the materials are laid at their true size, and each is filtered down to the bake's pixel size before it is sampled. A bake no finer than the terrain shows little but each material's average colour; a bake at twice its width or more lets the textures show.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Composite
FunctionBlends two solid images by mask.
Composite -> Pixel Image
baseLayer: Pixel Image
addition: Pixel Image
mask: Scalar FieldPixelImage Composite(
PixelImage baseLayer,
PixelImage addition,
ScalarField2D mask)Parameters
| name | type | default | description |
|---|---|---|---|
| baseLayer | Pixel Image | — | |
| addition | Pixel Image | — | |
| mask | Scalar Field | — | Will use normalized. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Create Tiled Texture
FunctionCreates a tiled texture that fits the target pixel size.
CreateTiledTexture -> Pixel Image
width: Integer
height: Integer
textureSample: Pixel Image
transform: Image Transform
mask: Scalar FieldPixelImage CreateTiledTexture(
int width,
int height,
PixelImage textureSample,
ImageTransform transform,
ScalarField2D mask)Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | The destination width in pixels. |
| height | Integer | — | The destination height in pixels. |
| textureSample | Pixel Image | — | The source texture sample to tile. |
| transform | Image Transform | — | Texture-placement transform applied in destination pixel space. |
| mask | Scalar Field | — | Optional opacity mask. Must match the destination size. |
Returns
| result | Pixel Image |
Remarks
The destination size is authoritative. Repetition is determined automatically from the destination size,
the source texture size, and Transform.
With ImageTransform.Identity, one source pixel maps to one destination pixel. If the destination
is larger than Texture Sample, the texture repeats automatically through wrapped sampling.
ImageTransform.Scale controls the visual size of each repeated tile. A scale of (2, 2) makes
each tile twice as large in destination pixels, producing fewer visible repetitions. A scale of (0.5, 0.5)
makes each tile half as large, producing more visible repetitions.
ImageTransform.Translation is measured in destination pixels.
ImageTransform.Rotation is measured in degrees.
ImageTransform.Pivot is measured in source texture UV space, where (0.5, 0.5) is the center of
one source texture tile.
If Mask is provided, it must have the same dimensions as the destination. The mask is used as
opacity for the tiled texture: 0 means fully transparent, 1 means fully opaque according to the tiled texture's
own alpha. If the mask is not already normalized to 0..1, it is interpreted by rescaling its current elevation
range to 0..1.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Beach Texture
FunctionThis node carries no documentation.
BeachTexture() -> Pixel Image
PixelImage BeachTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Cliff Texture
FunctionThis node carries no documentation.
CliffTexture() -> Pixel Image
PixelImage CliffTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Deep Water Texture
FunctionThis node carries no documentation.
DeepWaterTexture() -> Pixel Image
PixelImage DeepWaterTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Dirt Texture
FunctionThis node carries no documentation.
DirtTexture() -> Pixel Image
PixelImage DirtTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Grassland Texture
FunctionThis node carries no documentation.
GrasslandTexture() -> Pixel Image
PixelImage GrasslandTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Mountain Texture
FunctionThis node carries no documentation.
MountainTexture() -> Pixel Image
PixelImage MountainTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Rock Texture
FunctionThis node carries no documentation.
RockTexture() -> Pixel Image
PixelImage RockTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Shallow Water Texture
FunctionThis node carries no documentation.
ShallowWaterTexture() -> Pixel Image
PixelImage ShallowWaterTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation
Get Snow Texture
FunctionThis node carries no documentation.
SnowTexture() -> Pixel Image
PixelImage SnowTexture()
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heightmap Texture Sampler
- Package
- Procedural Generation