ModelIO imports, exports, and describes 3D model assets, meshes, materials, cameras, lights, and animations for use in graphics and rendering pipelines. You load and save scene content through MDLAsset, resolving external references with MDLAssetResolver implementations such as MDLPathAssetResolver and MDLBundleAssetResolver. Materials are described with MDLMaterialProperty and MDLMaterialSemantic, while cameras and lights are represented by types like MDLCamera, MDLStereoscopicCamera, MDLPhysicallyPlausibleLight, MDLAreaLight, and MDLLightProbe. Animation and skinning data is captured through MDLSkeleton, MDLJointAnimation, and animated value types including MDLAnimatedVector3Array and MDLAnimatedMatrix4x4.
Assets and Scene Objects 7
Load, save, and traverse the hierarchy of objects that make up a 3D model asset.
- ClMDLAssetmacOS 10.11+@class MDLAsset
- ClMDLObjectmacOS 10.11+@class MDLObject
- ClMDLObjectContainermacOS 10.11+@class MDLObjectContainer
- PrMDLObjectContainerComponentmacOS 10.11+A protocol for components that manage a collection of child objects.
- PrMDLNamedmacOS 10.11+A protocol for objects that have a name.
- PrMDLComponentmacOS 10.11+A protocol for modular components that can be attached to model objects.
- ClMDLUtilitymacOS 15.0+A collection of utility functions for working with model assets.
Resolving External References 4
Locate and load externally referenced files while importing an asset.
- PrMDLAssetResolvermacOS 10.13+A protocol for objects that locate files referenced by an asset.
- ClMDLRelativeAssetResolvermacOS 10.13+@class MDLRelativeAssetResolver
- ClMDLPathAssetResolvermacOS 10.13+@class MDLPathAssetResolver
- ClMDLBundleAssetResolvermacOS 10.13+A resolver that locates referenced files within an application bundle.
Meshes and Geometry 7
Represent renderable geometry as meshes, submeshes, and vertex data.
- ClMDLMeshmacOS 10.11+@class MDLMesh
- ClMDLSubmeshmacOS 10.11+@class MDLSubmesh
- ClMDLSubmeshTopologymacOS 10.11+An object that describes the connectivity and face topology of a submesh.
- ClMDLVoxelArraymacOS 10.11+@class MDLVoxelArray
- EnMDLGeometryTypeConstants that specify the primitive type of a submesh's geometry.
- StMDLAxisAlignedBoundingBoxA structure that describes a bounding box aligned to the coordinate axes.
- StMDLVoxelIndexExtentMDLVoxelIndexExtent is the index space bounds of the voxel grid.
Vertex Layout and Buffers 14
Describe vertex attributes and manage the buffers that back mesh geometry.
- ClMDLVertexDescriptormacOS 10.11+@class MDLVertexDescriptor
- ClMDLVertexAttributemacOS 10.11+@class MDLVertexAttribute
- ClMDLVertexAttributeDatamacOS 10.11+@class MDLVertexAttributeData
- ClMDLVertexBufferLayoutmacOS 10.11+@class MDLVertexBufferLayout
- EnMDLVertexFormat@enum MDLVertexFormat
- PrMDLMeshBuffermacOS 10.11+@protocol MDLMeshBuffer
- ClMDLMeshBufferMapmacOS 10.11+@class MDLMeshBufferMap
- ClMDLMeshBufferDatamacOS 10.11+@class MDLMeshBufferData
- PrMDLMeshBufferAllocatormacOS 10.11+@protocol MDLMeshBufferAllocator
- ClMDLMeshBufferDataAllocatormacOS 10.11+An allocator to use when backing with an NSData is appropriate.
- PrMDLMeshBufferZonemacOS 10.11+@protocol MDLMeshBufferZone
- ClMDLMeshBufferZoneDefaultmacOS 10.13+A default zone that can be use for convenience
- EnMDLMeshBufferType@enum MDLMeshBufferType
- EnMDLIndexBitDepthConstants that specify the bit width of mesh index values.
Materials and Surface Properties 10
Describe surface appearance through materials, properties, and shading graphs.
- ClMDLMaterialmacOS 10.11+An object that describes the surface appearance applied to a mesh's geometry.
- ClMDLMaterialPropertymacOS 10.11+If a color is encoded in a floatN property, it is to be interpreted as
- ClMDLMaterialPropertyConnectionmacOS 10.12+An object that connects an output of one material node to an input of another.
- ClMDLMaterialPropertyNodemacOS 10.12+A node in a material shading graph that produces material property values.
- ClMDLMaterialPropertyGraphmacOS 10.12+@discussion inputs and outputs will contain all of the inputs and outputs
- EnMDLMaterialSemanticMDLMaterialSemantic
- EnMDLMaterialPropertyTypeConstants that specify the value type stored by a material property.
- EnMDLMaterialFaceConstants that specify which faces a material applies to.
- ClMDLScatteringFunctionmacOS 10.11+The base scattering function is Lambertian, with a Blinn-Phong specular response.
- ClMDLPhysicallyPlausibleScatteringFunctionmacOS 10.11+A physically based scattering function describing realistic surface reflectance.
Textures and Sampling 13
Supply texture imagery and control how it is filtered and sampled.
- ClMDLTexturemacOS 10.11+MDLTexture
- ClMDLURLTexturemacOS 10.11+MDLURLTexture
- ClMDLCheckerboardTexturemacOS 10.11+MDLCheckerboardTexture
- ClMDLSkyCubeTexturemacOS 10.11+MDLSkyCubeTexture
- ClMDLColorSwatchTexturemacOS 10.11+A procedurally generated texture that gradates between two colors.
- ClMDLNoiseTexturemacOS 10.11+MDLNoiseTexture
- ClMDLNormalMapTexturemacOS 10.11+A texture that encodes surface normal perturbations for bump mapping.
- ClMDLTextureFiltermacOS 10.11+An object that describes how a texture is filtered and wrapped during sampling.
- ClMDLTextureSamplermacOS 10.11+An object that pairs a texture with its filtering and transform settings.
- EnMDLTextureChannelEncodingThe enoding of texel channel elements
- EnMDLMaterialTextureWrapModeTexture filtering
- EnMDLMaterialTextureFilterModeConstants that specify the filtering applied when sampling a texture.
- EnMDLMaterialMipMapFilterModeConstants that specify how mipmap levels are selected during sampling.
Cameras 3
Define viewpoints and projection used to render a scene.
- ClMDLCameramacOS 10.11+An object that describes a viewpoint and projection for rendering a scene.
- ClMDLStereoscopicCameramacOS 10.11+A camera that captures separate left- and right-eye views for stereoscopic rendering.
- EnMDLCameraProjectionMDLCamera
Lighting 8
Illuminate a scene with physically based, area, photometric, and probe lights.
- ClMDLLightmacOS 10.11+An abstract base class for light sources that illuminate a scene.
- ClMDLPhysicallyPlausibleLightmacOS 10.11+@class MDLPhysicallyPlausibleLight
- ClMDLAreaLightmacOS 10.11+A light source that emits illumination from a finite surface area.
- ClMDLPhotometricLightmacOS 10.11+@class MDLPhotometricLight
- ClMDLLightProbemacOS 10.11+An object that captures the surrounding illumination at a point for image-based lighting.
- PrMDLLightProbeIrradianceDataSourceA protocol that supplies irradiance data used to compute light probes.
- EnMDLLightTypeConstants that identify the kind of a light source.
- EnMDLProbePlacementConstants that specify how light probes are positioned within a scene.
Transforms 14
Position, orient, and scale objects through transform components and operations.
- ClMDLTransformmacOS 10.11+Concrete implementation of <MDLTransformComponent>.
- PrMDLTransformComponentmacOS 10.11+MDLTransformComponent
- ClMDLTransformStackmacOS 10.13+An ordered stack of transform operations composed into a single transform.
- PrMDLTransformOpmacOS 10.13+A protocol for a single named operation in a transform stack.
- ClMDLTransformRotateXOpmacOS 10.13+A transform operation that rotates about the X axis.
- ClMDLTransformRotateYOpmacOS 10.13+A transform operation that rotates about the Y axis.
- ClMDLTransformRotateZOpmacOS 10.13+A transform operation that rotates about the Z axis.
- ClMDLTransformRotateOpmacOS 10.13+A transform operation that rotates about all three axes.
- ClMDLTransformTranslateOpmacOS 10.13+A transform operation that translates an object in space.
- ClMDLTransformScaleOpmacOS 10.13+A transform operation that scales an object.
- ClMDLTransformMatrixOpmacOS 10.13+A transform operation defined directly by a 4x4 matrix.
- ClMDLTransformOrientOpmacOS 10.14+A transform operation that orients an object using a quaternion.
- EnMDLTransformOpRotationOrderConstants that specify the order in which rotations are applied.
- ClMDLMatrix4x4ArraymacOS 10.13+An object that holds an array of 4x4 matrices, such as joint transforms.
Skeletons and Skinning 4
Bind meshes to a joint hierarchy for skeletal deformation.
- ClMDLSkeletonmacOS 10.13+An object that defines a hierarchy of joints used to deform a mesh.
- ClMDLPackedJointAnimationmacOS 10.13+An object that stores packed translation, rotation, and scale animation for a skeleton's joints.
- PrMDLJointAnimationmacOS 10.13+A protocol for objects that supply per-joint animation for a skeleton.
- ClMDLAnimationBindComponentmacOS 10.13+A component that binds a mesh to a skeleton and its animation.
Animated Values 12
Store keyframed scalar, vector, quaternion, and matrix values over time.
- ClMDLAnimatedValuemacOS 10.13+An abstract base class for time-sampled values used in animation.
- ClMDLAnimatedScalarmacOS 10.13+AUTO-GENERATED FROM CodeGen.h
- ClMDLAnimatedScalarArraymacOS 10.13+AUTO-GENERATED FROM CodeGenArray.h
- ClMDLAnimatedVector2macOS 10.13+A two-component vector value animated over time with keyframes.
- ClMDLAnimatedVector3macOS 10.13+A three-component vector value animated over time with keyframes.
- ClMDLAnimatedVector3ArraymacOS 10.13+A time-sampled array of three-component vectors for animation.
- ClMDLAnimatedVector4macOS 10.13+A four-component vector value animated over time with keyframes.
- ClMDLAnimatedQuaternionmacOS 10.14+A quaternion value animated over time for keyframed rotation.
- ClMDLAnimatedQuaternionArraymacOS 10.13+A time-sampled array of quaternions for animating rotations.
- ClMDLAnimatedMatrix4x4macOS 10.13+A 4x4 transform matrix value animated over time with keyframes.
- EnMDLAnimatedValueInterpolationConstants that specify how animated values are interpolated between keyframes.
- EnMDLDataPrecisionmacOS 10.13+Constants that specify the numeric precision of stored animation data.
Type Aliases 1
- TyMDLVoxelIndexMDLVoxelIndex is a four component voxel index.