Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

SCNMaterialMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class SceneKit MBS Mac64bit Plugin 19.1 Yes No No Yes, macOS only No
Function: A set of shading attributes that define the appearance of a geometry's surface when rendered.
Notes:
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.

Feedback, Comments & Corrections

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:


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


SCNLookAtConstraintMBS   -   SCNMaterialPropertyMBS




Links
MBS Xojo PDF Plugins