Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

Shader Vcc_Txt_Em_Sp_Gm

  • Last UpdatedApr 02, 2025
  • 3 minute read

The Vcc_Txt_Em_Sp_Gm shader has the following characteristics.

Vcc

Vertex Colored with Vertex Color Contribution

Txt

Textured

Em

Environment Mapped

Sp

Specular

Gm

Glossmap

Explanation

  • The result will be an interpolation between (Texture * CubeMap) * VertexColor and (Texture * CubeMap) * VertexColor * fMul.

  • To decide which interpolation value to use, the average of VertexColor values is used, which we call VCSum.

VCSum

  • If VCSum is less than a threshold value (currently set at 0.5), then the final color will be (Texture * CubeMap) * VertexColor.

  • If VCSum is greater than the threshold value, then the final color will be interpolated to become (Texture * CubeMap) * VertexColor * fMul when VCSum becomes 1.

Image example

This is an example of the shader effect.

  • The VertexColor does not have to be white and black. It can also be colored.

  • This color then adds the specular value multiplied by the value of the GlossMap.

  • Note: that (Texture * CubeMap) is not a simple multiplication, but a linear interpolation between the Texture and the CubeMap based on the value of fCubeIntensity.

  • Supports only one light, which is managed as omnidirectional without range.

Code example

This is an example of Vcc_Txt_Em_Sp_Gm shader.

$Shader

{

szName = Vcc_Txt_Em_Sp_Gm

szCubeMap = Cube.dds

fCubeIntensity = 0.4

szLight = Omni001

fMul = 1.2

}

Input Data

Vertex Color

  • If there is a valid Radiosity solution on this object, the vertex color is taken from the solution.

  • If a Radiosity solution is not present or invalid, or if the bWireframe parameter is active, the vertex color is taken from the properties of the mesh. Therefore, the vertex color will be the color of the mesh.

Texture

  • Material ® DiffuseMap

  • UV Channel 1

  • Alpha Channel. If the bAlphaTransparency or bSolidAlphaTransparency parameter is True, it impacts the pixel opacity.

  • Must contain the Gloss Map values in the Alpha channel. The Gloss value scales the intensity of the specular. If the Gloss Map value is zero, the pixel will not have specular.

  • The Gloss value is also used for reflectivity. A value of 1 indicates total reflection. This value is multiplied by fReflectivity.

Specular Color

  • Material ® SpecularColor

Specular Intensity

  • Material ® SpecularHilights ® SpecularLevel

  • Increases the intensity and the size of the highlight.

Specular Glossiness

  • Material ® SpecularHilights ® Glossiness

  • Increasing this value increases the "shininess" of the object, so there will be a narrower highlight.

Parameters

bObjectSpace

  • Explicitly indicates whether this mesh will be exported to Object Space or World Space, regardless of export parameters.

  • If this parameter is not present, the export parameters will be used, otherwise they will be overridden by this value.

  • Default: The export parameters are used.

  • Range: True / False.

fTransparency

  • Transparency level of the mesh.

  • Default: 0.0

  • Range: [0..1] (1 = completely transparent)

bDoubleFace

  • Duplicate the faces by flipping the verse.

  • Default: False.

  • Range: True / False.

szAnimatedTexture

  • Indicates that the texture will be animated using the specified Animated Texture ID.

  • Default: Null.

szRealTimeCubeMap / szCubeMap

  • szRealTimeCubeMap: ID of the CubeMap that will be created in real time using a $CubeMap Dummy Object.

  • szCubeMap: The name of the texture that will be loaded and used as CubeMap.

  • szRealTimeCubeMap and szCubeMap can not exist at the same time.

fCubeIntensity

  • Intensity level of the CubeMap with respect to the Texture.

  • Default: 0.5

  • Range: [0..1] (1 = completely CubeMap)

szLight

  • Name of the light that will illuminate the object. If not specified, the result will be unpredictable.

fMul

  • Multiplier of the Lcc component.

  • Default: 1

  • Range [-inf..inf] (1 = the parameter does not change the color)

In This Topic
TitleResults for “How to create a CRG?”Also Available in