|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||SceneKit||MBS Mac64bit Plugin||19.1||Yes||No||No||Yes, macOS only||No|
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.
- 28 properties
- property ambient as SCNMaterialPropertyMBS
- property ambientOcclusion as SCNMaterialPropertyMBS
- property blendMode as Integer
- property colorBufferWriteMask as Integer
- property cullMode as Integer
- property diffuse as SCNMaterialPropertyMBS
- property displacement as SCNMaterialPropertyMBS
- property DoubleSided as Boolean
- property emission as SCNMaterialPropertyMBS
- property fillMode as Integer
- property fresnelExponent as Double
- property lightingModelName as String
- property LitPerPixel as Boolean
- property locksAmbientWithDiffuse as Boolean
- property metalness as SCNMaterialPropertyMBS
- property multiply as SCNMaterialPropertyMBS
- property name as String
- property normal as SCNMaterialPropertyMBS
- property readsFromDepthBuffer as Boolean
- property reflective as SCNMaterialPropertyMBS
- property roughness as SCNMaterialPropertyMBS
- property selfIllumination as SCNMaterialPropertyMBS
- property shininess as Double
- property specular as SCNMaterialPropertyMBS
- property transparency as Double
- property transparencyMode as Integer
- property transparent as SCNMaterialPropertyMBS
- property writesToDepthBuffer as Boolean
- 2 methods
- 6 shared methods
- 16 constants
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.
Blend by multiplying source and destination color values by their corresponding alpha values.
This mode is the default value of the blendMode property.
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.
Blend by replacing the destination color with the source color, ignoring alpha.
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.
Blend by subtracting the source color from the destination color.
The mode for culling back-facing polygons (and rendering only front-facing polygons).
The mode for culling front-facing polygons (and rendering only back-facing polygons).
This class has no sub classes.
Some methods using this class:
- SCNGeometryMBS.insertMaterial(Material as SCNMaterialMBS, Index as Integer)
- SCNGeometryMBS.materials as SCNMaterialMBS()
- SCNGeometryMBS.materialWithName(name as string) as SCNMaterialMBS
- SCNGeometryMBS.replaceMaterial(Index as Integer, Material as SCNMaterialMBS)
- SCNGeometryMBS.setMaterials(materials() as SCNMaterialMBS)
Some properties using for this class:
- SCNGeometryMBS.firstMaterial as SCNMaterialMBS
The items on this page are in the following plugins: MBS Mac64bit Plugin.
MBS Xojo PDF Plugins