NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Scene elements

All the scene elements that make up the scene graph. More...

Modules

  Scene graph structure
  Inner nodes of the scene graph defining its structure.
 
  Miscellaneous
  Miscellaneous scene graph elements, for example, textures, light profiles, BSDF measurements, or decals.
 
  Materials (MDL)
  Materials comprise a set of interfaces related to the Material Definition Language (MDL).
 
  Leaf nodes
  Leaf nodes of the scene graph, for example, geometry, lights, or cameras.
 
  Shaders (MetaSL)
  Shaders comprise a set of interfaces related to the MetaSL.
 

Classes

class   mi::IAttribute_set
  The attribute set comprises all attributes attached to a database element. More...
 
class   mi::IScene_element
  Common base interface for all scene elements. More...
 

Enumerations

enum   mi::Propagation_type {
  mi::PROPAGATION_STANDARD,
  mi::PROPAGATION_OVERRIDE,
  mi::PROPAGATION_DEFAULT
}
  Propagation types for attribute inheritance. More...
 
enum   mi::Element_type {
  mi::ELEMENT_TYPE_INSTANCE = 0,
  mi::ELEMENT_TYPE_GROUP = 1,
  mi::ELEMENT_TYPE_OPTIONS = 2,
  mi::ELEMENT_TYPE_CAMERA = 3,
  mi::ELEMENT_TYPE_LIGHT = 4,
  mi::ELEMENT_TYPE_LIGHTPROFILE = 5,
  mi::ELEMENT_TYPE_MATERIAL = 6,
  mi::ELEMENT_TYPE_TEXTURE = 7,
  mi::ELEMENT_TYPE_IMAGE = 8,
  mi::ELEMENT_TYPE_SHADER = 9,
  mi::ELEMENT_TYPE_TRIANGLE_MESH = 10,
  mi::ELEMENT_TYPE_ATTRIBUTE_CONTAINER = 16,
  mi::ELEMENT_TYPE_POLYGON_MESH = 18,
  mi::ELEMENT_TYPE_SHADER_CLASS = 19,
  mi::ELEMENT_TYPE_SUBDIVISION_SURFACE = 23,
  mi::ELEMENT_TYPE_FREEFORM_SURFACE = 24 ,
  mi::ELEMENT_TYPE_SHADER_GRAPH_CLASS = 26,
  mi::ELEMENT_TYPE_SHADER_GRAPH = 27,
  mi::ELEMENT_TYPE_COMPOUND_SHADER_CLASS = 28,
  mi::ELEMENT_TYPE_ON_DEMAND_MESH = 36,
  mi::ELEMENT_TYPE_MDL_MODULE = 29,
  mi::ELEMENT_TYPE_MDL_FUNCTION_DEFINITION = 30,
  mi::ELEMENT_TYPE_MDL_FUNCTION_CALL = 31,
  mi::ELEMENT_TYPE_MDL_MATERIAL_DEFINITION = 32,
  mi::ELEMENT_TYPE_MDL_MATERIAL_INSTANCE = 33,
  mi::ELEMENT_TYPE_MDL_COMPILED_MATERIAL = 34,
  mi::ELEMENT_TYPE_BSDF_MEASUREMENT = 35,
  mi::ELEMENT_TYPE_IRRADIANCE_PROBES = 36,
  mi::ELEMENT_TYPE_DECAL = 37
}
  Distinguishes scene elements. More...
 
enum   mi::Shader_type {
  mi::VOLUME_SHADER = 0,
  mi::ENVIRONMENT_SHADER = 1,
  mi::SURFACE_SHADER = 2,
  mi::DISPLACEMENT_SHADER = 3,
  mi::LIGHT_SHADER = 4
}
  Distinguishes MetaSL shader types. More...
 

Functions

virtual Element_type  mi::IScene_element::get_element_type () const =0
  Indicates the actual scene element represented by interfaces derived from this interface. More...
 
template<class T >
mi::Sint32  mi::set_value (mi::IAttribute_set *attribute_set, const char *name, const T &value)
  Simplifies setting the value of an attribute from the corresponding classes from the base and math API. More...
 
template<class T >
mi::Sint32  mi::set_value (mi::IAttribute_set *attribute_set, const char *name, mi::Size index, const T &value)
  Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with an index for collections). More...
 
template<class T >
mi::Sint32  mi::set_value (mi::IAttribute_set *attribute_set, const char *name, const char *key, const T &value)
  Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with a key for collections). More...
 
template<class T >
mi::Sint32  mi::get_value (const mi::IAttribute_set *attribute_set, const char *name, T &value)
  Simplifies reading the value of an attribute into the corresponding classes from the base and math API. More...
 
template<class T >
mi::Sint32  mi::get_value (const mi::IAttribute_set *attribute_set, const char *name, mi::Size index, T &value)
  Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with an index for collections). More...
 
template<class T >
mi::Sint32  mi::get_value (const mi::IAttribute_set *attribute_set, const char *name, const char *key, T &value)
  Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with a key for collections). More...
 

Detailed Description

All the scene elements that make up the scene graph.

Enumeration Type Documentation

Distinguishes scene elements.

See Also
mi::IScene_element::get_element_type()
Enumerator
ELEMENT_TYPE_INSTANCE 

mi::IInstance

ELEMENT_TYPE_GROUP 

mi::IGroup

ELEMENT_TYPE_OPTIONS 

mi::IOptions

ELEMENT_TYPE_CAMERA 

mi::ICamera

ELEMENT_TYPE_LIGHT 

mi::ILight

ELEMENT_TYPE_LIGHTPROFILE 

mi::ILightprofile

ELEMENT_TYPE_MATERIAL 

mi::IMaterial

ELEMENT_TYPE_TEXTURE 

mi::ITexture

ELEMENT_TYPE_IMAGE 

mi::IImage

ELEMENT_TYPE_SHADER 

mi::IShader

ELEMENT_TYPE_TRIANGLE_MESH 

mi::ITriangle_mesh

ELEMENT_TYPE_ATTRIBUTE_CONTAINER 

mi::IAttribute_container

ELEMENT_TYPE_POLYGON_MESH 

mi::IPolygon_mesh

ELEMENT_TYPE_SHADER_CLASS 

mi::IShader_class

ELEMENT_TYPE_SUBDIVISION_SURFACE 

mi::ISubdivision_surface

ELEMENT_TYPE_FREEFORM_SURFACE 

mi::IFreeform_surface

ELEMENT_TYPE_SHADER_GRAPH_CLASS 

mi::IShader_graph_class

ELEMENT_TYPE_SHADER_GRAPH 

mi::IShader_graph

ELEMENT_TYPE_COMPOUND_SHADER_CLASS 

mi::ICompound_shader_class

ELEMENT_TYPE_ON_DEMAND_MESH 

mi::IOn_demand_mesh

ELEMENT_TYPE_MDL_MODULE 

mi::IMdl_module

ELEMENT_TYPE_MDL_FUNCTION_DEFINITION 

mi::IMdl_function_definition

ELEMENT_TYPE_MDL_FUNCTION_CALL 

mi::IMdl_function_call

ELEMENT_TYPE_MDL_MATERIAL_DEFINITION 

mi::IMdl_material_definition

ELEMENT_TYPE_MDL_MATERIAL_INSTANCE 

mi::IMdl_material_instance

ELEMENT_TYPE_MDL_COMPILED_MATERIAL 

mi::IMdl_compiled_material

ELEMENT_TYPE_BSDF_MEASUREMENT 

mi::IBsdf_measurement

ELEMENT_TYPE_IRRADIANCE_PROBES 

mi::IIrradiance_probes

ELEMENT_TYPE_DECAL 

mi::IDecal

Propagation types for attribute inheritance.

Inheritance of attributes allows you to easily make changes to an entire subtree of the scene graph. For example, by setting the visible attribute of an mi::IGroup element to false, the entire subtree will become invisible (unless one of its elements has a visible attribute, too, and its value is true). Similarly, materials can be inherited down the scene graph to elements that do not have their own material. Assume the scene graph contains an inner node P (the parent) like mi::IGroup or mi::IInstance with an attribute A and a child node C. If the child node C does not have the attribute A, the child will inherit P's value of A (without actually storing an explicit copy). If the child node C has the attribute A, it will use its own value of the attribute without taking P's value into consideration. This is the standard propagation rule which is represented by the propagation type mi::PROPAGATION_STANDARD.

The outcome of the last case can be reverted by setting the override flag of the attribute A on the parent node: in this case P's value of A is inherited to the child node C, no matter whether the child has the attribute or not. This propagation mode is represented by mi::PROPAGATION_OVERRIDE.

Finally, the default flag can be used to specify a default value for the attribute A on the child node C: this value is only used if no attribute value is inherited from the parent node P. Basically, the default flag allows to reduce the priority of an attribute at the child node, instead of increasing the priority of the attribute on the parent node by using the override flag there. The default flag and the override flag are mutually exclusive. This propagation mode is represented by mi::PROPAGATION_DEFAULT. Default flags are only taken into account at leaf nodes. The use of default flags is not recommended. They exist only to model a certain feature in the .mi file format.

Note
Inherited attributes are made available to the render modes, but are not available via the Iray API.
See Also
mi::IAttribute_set::set_attribute_propagation()
mi::IAttribute_set::get_attribute_propagation()
Enumerator
PROPAGATION_STANDARD 

Standard inheritance of attributes without any special flags.

PROPAGATION_OVERRIDE 

The override flag for attribute inheritance.

PROPAGATION_DEFAULT 

The default flag for attribute inheritance.

Distinguishes MetaSL shader types.

See Also
mi::ICamera, mi::ILight, and mi::IMaterial
Enumerator
VOLUME_SHADER 

Volume shader.

ENVIRONMENT_SHADER 

Environment shader.

SURFACE_SHADER 

Surface shader.

DISPLACEMENT_SHADER 

Displacement shader.

LIGHT_SHADER 

Light shader.

Function Documentation

virtual Element_type mi::IScene_element::get_element_type ( ) const
pure virtual

Indicates the actual scene element represented by interfaces derived from this interface.

template<class T >
mi::Sint32 mi::get_value ( const mi::IAttribute_set attribute_set,
const char *  name,
T &  value 
)

Simplifies reading the value of an attribute into the corresponding classes from the base and math API.

Parameters
attribute_set The affected attribute set.
name The name of the attribute to read.
value The new value will be stored here.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -4: The attribute name does not exist.
template<class T >
mi::Sint32 mi::get_value ( const mi::IAttribute_set attribute_set,
const char *  name,
mi::Size  index,
T &  value 
)

Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with an index for collections).

Parameters
attribute_set The affected attribute set.
name The name of the attribute to read.
index The index of the affected collection element.
value The new value will be stored here.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -3: The index is not valid.
  • -4: The attribute name does not exist.
template<class T >
mi::Sint32 mi::get_value ( const mi::IAttribute_set attribute_set,
const char *  name,
const char *  key,
T &  value 
)

Simplifies reading the value of an attribute into the corresponding classes from the base and math API (variant with a key for collections).

Parameters
attribute_set The affected attribute set.
name The name of the attribute to read.
key The key of the affected collection element.
value The new value will be stored here.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -3: The key is not valid.
  • -4: The attribute name does not exist.
template<class T >
mi::Sint32 mi::set_value ( mi::IAttribute_set attribute_set,
const char *  name,
const T &  value 
)

Simplifies setting the value of an attribute from the corresponding classes from the base and math API.

Parameters
attribute_set The affected attribute set.
name The name of the attribute to modify.
value The new value to be set.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -2: The value of value is not valid.
  • -4: The attribute name does not exist.
template<class T >
mi::Sint32 mi::set_value ( mi::IAttribute_set attribute_set,
const char *  name,
mi::Size  index,
const T &  value 
)

Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with an index for collections).

Parameters
attribute_set The affected attribute set.
name The name of the attribute to modify.
index The index of the affected collection element.
value The new value to be set.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -2: The value of value is not valid.
  • -3: The index is not valid.
  • -4: The attribute name does not exist.
template<class T >
mi::Sint32 mi::set_value ( mi::IAttribute_set attribute_set,
const char *  name,
const char *  key,
const T &  value 
)

Simplifies setting the value of an attribute from the corresponding classes from the base and math API (variant with a key for collections).

Parameters
attribute_set The affected attribute set.
name The name of the attribute to modify.
key The key of the affected collection element.
value The new value to be set.
Returns
  • 0: Success.
  • -1: The dynamic type of the attribute does not match the static type of value.
  • -2: The value of value is not valid.
  • -3: The key is not valid.
  • -4: The attribute name does not exist.