Platforms to show: All Mac Windows Linux Cross-Platform

SCNMaterialMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A set of shading attributes that define the appearance of a geometry's surface when rendered.

When you create a material, you define a collection of visual attributes and their options, which you can then reuse for multiple geometries in a scene.

A material has several visual properties, each of which defines a different part of SceneKit’s lighting and shading process. Each visual property is an instance of the SCNMaterialPropertyMBS class that provides a solid color, texture, or other 2D content for that aspect of SceneKit’s rendering. The material’s lightingModelName property then determines the formula SceneKit uses to combine the visual properties with the lights in the scene to produce the final color for each pixel in the rendered scene. For more details on the rendering process, see SCNLightingModelMBS.

You attach one or more materials to an instance of the SCNGeometryMBS class using its firstMaterial or materials property. Multiple geometries can reference the same material. In this case, changing the attributes of the material changes the appearance of every geometry that uses it.

Constants

Constant Value Description
SCNTransparencyModeAOne 0 One of the constants for the modes SceneKit uses to calculate the opacity of pixels rendered with a material, used by the transparencyMode property. SceneKit derives transparency information from the alpha channel of colors. The value 1.0 is opaque.
SCNTransparencyModeDefault 0 One of the constants for the modes SceneKit uses to calculate the opacity of pixels rendered with a material, used by the transparencyMode property. Default
SCNTransparencyModeDualLayer 3 One of the constants for the modes SceneKit uses to calculate the opacity of pixels rendered with a material, used by the transparencyMode property. Dual layer.
SCNTransparencyModeRGBZero 1 One of the constants for the modes SceneKit uses to calculate the opacity of pixels rendered with a material, used by the transparencyMode property. SceneKit derives transparency information from the luminance of colors. The value 0.0 is opaque. more
SCNTransparencyModeSingleLayer 2 One of the constants for the modes SceneKit uses to calculate the opacity of pixels rendered with a material, used by the transparencyMode property. Single layer.

Blend Modes

Constant Value Description
SCNBlendModeAdd 1 Blend by adding the source color to the destination color.
This mode results in a brightening effect that can be useful for making objects appear to glow relative to their surroundings.
SCNBlendModeAlpha 0 Blend by multiplying source and destination color values by their corresponding alpha values.
This mode is the default value of the blendMode property.
SCNBlendModeMax 6 Max
SCNBlendModeMultiply 3 Blend by multiplying the source color with the background color.
This mode results in colors that are at least as dark as either of the two contributing colors.
SCNBlendModeReplace 5 Blend by replacing the destination color with the source color, ignoring alpha.
SCNBlendModeScreen 4 Blend by multiplying the inverse of the source color with the inverse of the destination color.
This mode results in colors that are at least as light as either of the two contributing colors.
SCNBlendModeSubtract 2 Blend by subtracting the source color from the destination color.

Cull Modes

Constant Value Description
SCNCullModeBack 0 The mode for culling back-facing polygons (and rendering only front-facing polygons).
SCNCullModeFront 1 The mode for culling front-facing polygons (and rendering only back-facing polygons).

Fill Modes

Constant Value Description
SCNFillModeFill 0 Fill
SCNFillModeLines 1 Lines

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

Release notes


The items on this page are in the following plugins: MBS Mac64bit Plugin.


SCNLookAtConstraintMBS   -   SCNMaterialPropertyMBS


The biggest plugin in space...