Class SoMaterialBinding
- All Implemented Interfaces:
SafeDisposable
The bindings for faces and vertices are meaningful only for shapes that are made from faces and vertices. Similarly, the indexed bindings are only used by the shapes that allow indexing.
The bindings apply only to diffuse colors and transparency. Other materials (emissive, specular, ambient, shininess) will have the first value applied to the entire shape, regardless of the material binding or the number provided.
If the number of transparencies is less than the number of diffuse colors, only the first transparency value will be used, regardless of the material binding. If the number of diffuse colors in the state is less than the number required for the given binding, a debug warning will be printed and unpredictable colors will result.
File format/default:
MaterialBinding {
value | OVERALL |
face | FRONT_AND_BACK |
Action behavior:
SoGLRenderAction
, SoCallbackAction
Sets the current material binding type. Sets: SoMaterialBindingElement
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
Specifies values to apply material on the front face, back face or both front and back face of an object.Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFEnum
<SoMaterialBinding.Faces> Applies materials to different faces of an object.Specifies how to bind materials to shapes.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
value
Specifies how to bind materials to shapes. . Default is OVERALL. -
face
Applies materials to different faces of an object. This enum specifies whether to apply the material to the front faces, the back faces, or both. It is particularly useful for applying different materials to each side of a non-closed surface, allowing for distinct appearances on either side.For closed surfaces, the use of FRONT_AND_BACK is generally sufficient, except where a
SoClipPlane
is used. This ensures that the material is applied to both the front and back faces, providing a consistent appearance.Notes:
- If you specify a material for one side only, the other side uses the default material values (see
SoMaterial
). - If you enable face culling, only the front faces are rendered (see
SoShapeHints
), even if a material is specified for the back faces. The same applies to front face culling. - If you disable two-sided lighting (see
SoShapeHints
), the front material is applied to both front and back faces. - If you specify colors using
SoVertexProperty.orderedRGBA
orSoBufferedShape.colorBuffer
, you can only specify one set of colors. The current value offace
on state determines which faces the color buffer impacts. - To visualize only the front or back faces, use the
SoShapeHints.shapeType
field. The enum SOLID activates back face culling and INNER_SOLID activates front face culling.. Default is FRONT_AND_BACK.
- Since:
- Open Inventor 2025.1
- If you specify a material for one side only, the other side uses the default material values (see
-