VoxelGeneratorImage
Voxel generator producing a heightmap-based shape using an image.
Voxel generator producing a heightmap-based shape using an image.
Uses the red channel of an image to generate a heightmap, such that the top left corner is centered on the world origin. The image will repeat if terrain generates beyond its size.
Note: values in the image are read using get_pixel and are assumed to be between 0 and 1 (normalized). These values will be transformed by VoxelGeneratorHeightmap.HeightStart and VoxelGeneratorHeightmap.HeightRange.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
VoxelGeneratorImageConstructor
public VoxelGeneratorImage();Properties2
BlurEnabledProperty
public bool BlurEnabled { get; set; }ImageProperty
public Image Image { get; set; }Sets the image that will be used as a heightmap. Only the red channel will be used. It is preferable to use an image using the RF or RH format, which contain higher resolution heights. Common images only have 8-bit depth and will appear blocky.
Methods4
GetImageImage
public Image GetImage();ImageIsBlurEnabledbool
public bool IsBlurEnabled();boolSetBlurEnabledvoid
public void SetBlurEnabled(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetImagevoid
public void SetImage(Image image);| Name | Type | Default |
|---|---|---|
image | Image | — |