Pads this heightmap to the smallest fitting size of
This method will add a border region at the right and bottom edges of a rectangular heightmap (see MapType.Rect). A smooth falloff is computed at the heightmap edges in order to avoid unnecessary triangles being created by CLOD mesh refinement for overly sharp corners.
Clips away portions of this heightmap, according to the HeightmapLayer.Coverage layer of the given heightmap.
The coverage values of the returned heightmap are computed like this:
inverse == false : c_out = c_in * c_mask inverse == true : c_out = in * (1 - c_mask)
c_out is the normalized coverage value (i.e. in the range [0..1]) of the returned heightmap,
c_in is the normalized coverage value of this heightmap and
c_arg is the normalized coverage value of mask in.
Adds detail to this heightmap by combining it with the given heightmap.
The heightmap samples of this heightmap (
source) are modified using the samples of the given detail heightmap (
detail) according to these rules:
The coverage of this heightmap will remain unchanged. The coverage of the given detail heightmap will be ignored.
The terrain-space elevation values (see VerticalRange) of this heightmap and the given detail heightmap are combined using the given scalar operation (see scalarOp opt); then the resulting scalar value is converted back to elevation values using the combined vertical range.
The given color operation (see textureOp opt) is applied to the texture color of this heightmap (
first) and the color of the given detail heightmap (
The material tokens of this heightmap are mixed with the tokens of the detail heightmap: If the weight sum (MaterialToken.WeightSum) of the detail token is greater than or equal to
255, the source token will be replaced with the detail token. Otherwise, the source token will be gradually blend into the detail token (see MaterialToken.Mix1).
The terrain-space displacement values (see VerticalRange) of this heightmap and the given detail heightmap are combined using the given scalar operation (see scalarOp opt); then the resulting scalar value is converted back to displacement values using the combined vertical range.
Merges the given heightmap with this one. The coverage of both heightmaps will be taken into account during merging.
Merged heightmaps fill data into heightmap samples in order, with heightmaps at a later stage overwriting sample data written by heightmaps of an earlier stage.
Both heightmaps (this one and second in) will be scaled to the maximum possible size.
Wraps this heightmap in a proxy.
- See also
Returns a scaled version of this heightmap.
The maximum up-scaling factor for heightmaps is
65536, so the given condition should be met when up-scaling a heightmap (otherwise only the 16 most significant bits of the interpolation factor will be used):
(newSize - 1) / (Size - 1) <= 65536
where newSize in is the new heightmap size and IHeightmap.Type is the current size of this heightmap.
When the coverage layer is involved in the substitution, material weights are mapped to inverse coverage values.
Material substitution always has a fixed cost at runtime, no matter how many times this method has been used.
Wraps this heightmap in a pixel pyramid.
The returned pixel pyramid will have uniform level of detail, so it is not necessary to user the PyramidFlags.Opaque flag.
Return a heightmap that computes texture colors using an elevation-based color ramp.