EffectInstance Class


An effect instance that controls the appearance of geometry.

Namespace: Autodesk.Revit.DB.DirectContext3D
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Since: 2017

Syntax

C#
public class EffectInstance : IDisposable
Visual Basic
Public Class EffectInstance _
	Implements IDisposable
Visual C++
public ref class EffectInstance : IDisposable

Remarks

Each effect instance should be used with geometry of a matching vertex format. Only a subset of effect instance parameters is relevant to geometry of a particular vertex format.

If the vertex format does not specify vertex normals, the following parameters should be set:

  1. Color
  2. Transparency

If the vertex format specifies vertex normals, the following parameters should be set:

  1. AmbientColor
  2. DiffuseColor
  3. SpecularColor
  4. Glossiness (specular exponent)
  5. EmissiveColor
  6. Transparency

If the vertex format specifies vertex color, then the geometry will be colored according to the color of each vertex. Otherwise, the geometry's color will come from the effect instance parameters. Similarly, the transparency parameter affects all of the geometry associated with the effect, while the transparency of the individual vertices can also be controlled via the transparency component of their colors.

Inheritance Hierarchy

System Object
Autodesk.Revit.DB.DirectContext3D EffectInstance

See Also