ComputeNormalMap Data Member Function

Computes a normal map by quantizing into RGB colorspace an array of normalized normal values. Note that you should not submit an array of worldspace normals. Submit an array of normals computed with the ComputeFilteredNormals data interface.

Prototype

int32 ComputeNormalMap( Float64VectorArray p_avNormals, double p_dElevationSpacingX, double p_dElevationSpacingY, Image p_oDestImage )

Parameters

Parameter Type Parameter Name Documentation
<Float64VectorArray>p_avNormalsA pointer to the <Float64VectorArray> that contains the normalized normals you wish to quantize into RGB color space.
doublep_dElevationSpacingXA <float64> representing the worldspace distance between elevation samples on the x axis.
doublep_dElevationSpacingYA <float64> representing the worldspace distance between elevation samples on the y axis.
<Image>p_oDestImageA pointer to an <Image> object of pixel format IPF_8888_ARGB into which you wish to store the quantized normals. The x and y dimensions of this <Image> object must match the dimensions of the initial elevation data. Be careful not to reverse the x and y dimensions.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.