TechnologiesGames & 3D

ModelIO

iOSmacOStvOSwatchOSvisionOS

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.

  • Cl
    MDLAssetmacOS 10.11+
    @class MDLAsset
  • Cl
    MDLObjectmacOS 10.11+
    @class MDLObject
  • Cl
    MDLObjectContainermacOS 10.11+
    @class MDLObjectContainer
  • Pr
    MDLObjectContainerComponentmacOS 10.11+
    A protocol for components that manage a collection of child objects.
  • Pr
    MDLNamedmacOS 10.11+
    A protocol for objects that have a name.
  • Pr
    MDLComponentmacOS 10.11+
    A protocol for modular components that can be attached to model objects.
  • Cl
    MDLUtilitymacOS 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.

  • Pr
    MDLAssetResolvermacOS 10.13+
    A protocol for objects that locate files referenced by an asset.
  • Cl
    MDLRelativeAssetResolvermacOS 10.13+
    @class MDLRelativeAssetResolver
  • Cl
    MDLPathAssetResolvermacOS 10.13+
    @class MDLPathAssetResolver
  • Cl
    MDLBundleAssetResolvermacOS 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.

  • Cl
    MDLMeshmacOS 10.11+
    @class MDLMesh
  • Cl
    MDLSubmeshmacOS 10.11+
    @class MDLSubmesh
  • Cl
    MDLSubmeshTopologymacOS 10.11+
    An object that describes the connectivity and face topology of a submesh.
  • Cl
    MDLVoxelArraymacOS 10.11+
    @class MDLVoxelArray
  • En
    MDLGeometryType
    Constants that specify the primitive type of a submesh's geometry.
  • St
    MDLAxisAlignedBoundingBox
    A structure that describes a bounding box aligned to the coordinate axes.
  • St
    MDLVoxelIndexExtent
    MDLVoxelIndexExtent 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.

  • Cl
    MDLVertexDescriptormacOS 10.11+
    @class MDLVertexDescriptor
  • Cl
    MDLVertexAttributemacOS 10.11+
    @class MDLVertexAttribute
  • Cl
    MDLVertexAttributeDatamacOS 10.11+
    @class MDLVertexAttributeData
  • Cl
    MDLVertexBufferLayoutmacOS 10.11+
    @class MDLVertexBufferLayout
  • En
    MDLVertexFormat
    @enum MDLVertexFormat
  • Pr
    MDLMeshBuffermacOS 10.11+
    @protocol MDLMeshBuffer
  • Cl
    MDLMeshBufferMapmacOS 10.11+
    @class MDLMeshBufferMap
  • Cl
    MDLMeshBufferDatamacOS 10.11+
    @class MDLMeshBufferData
  • Pr
    MDLMeshBufferAllocatormacOS 10.11+
    @protocol MDLMeshBufferAllocator
  • Cl
    MDLMeshBufferDataAllocatormacOS 10.11+
    An allocator to use when backing with an NSData is appropriate.
  • Pr
    MDLMeshBufferZonemacOS 10.11+
    @protocol MDLMeshBufferZone
  • Cl
    MDLMeshBufferZoneDefaultmacOS 10.13+
    A default zone that can be use for convenience
  • En
    MDLMeshBufferType
    @enum MDLMeshBufferType
  • En
    MDLIndexBitDepth
    Constants that specify the bit width of mesh index values.

Materials and Surface Properties 10

Describe surface appearance through materials, properties, and shading graphs.

  • Cl
    MDLMaterialmacOS 10.11+
    An object that describes the surface appearance applied to a mesh's geometry.
  • Cl
    MDLMaterialPropertymacOS 10.11+
    If a color is encoded in a floatN property, it is to be interpreted as
  • Cl
    MDLMaterialPropertyConnectionmacOS 10.12+
    An object that connects an output of one material node to an input of another.
  • Cl
    MDLMaterialPropertyNodemacOS 10.12+
    A node in a material shading graph that produces material property values.
  • Cl
    MDLMaterialPropertyGraphmacOS 10.12+
    @discussion inputs and outputs will contain all of the inputs and outputs
  • En
    MDLMaterialSemantic
    MDLMaterialSemantic
  • En
    MDLMaterialPropertyType
    Constants that specify the value type stored by a material property.
  • En
    MDLMaterialFace
    Constants that specify which faces a material applies to.
  • Cl
    MDLScatteringFunctionmacOS 10.11+
    The base scattering function is Lambertian, with a Blinn-Phong specular response.
  • Cl
    MDLPhysicallyPlausibleScatteringFunctionmacOS 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.

  • Cl
    MDLTexturemacOS 10.11+
    MDLTexture
  • Cl
    MDLURLTexturemacOS 10.11+
    MDLURLTexture
  • Cl
    MDLCheckerboardTexturemacOS 10.11+
    MDLCheckerboardTexture
  • Cl
    MDLSkyCubeTexturemacOS 10.11+
    MDLSkyCubeTexture
  • Cl
    MDLColorSwatchTexturemacOS 10.11+
    A procedurally generated texture that gradates between two colors.
  • Cl
    MDLNoiseTexturemacOS 10.11+
    MDLNoiseTexture
  • Cl
    MDLNormalMapTexturemacOS 10.11+
    A texture that encodes surface normal perturbations for bump mapping.
  • Cl
    MDLTextureFiltermacOS 10.11+
    An object that describes how a texture is filtered and wrapped during sampling.
  • Cl
    MDLTextureSamplermacOS 10.11+
    An object that pairs a texture with its filtering and transform settings.
  • En
    MDLTextureChannelEncoding
    The enoding of texel channel elements
  • En
    MDLMaterialTextureWrapMode
    Texture filtering
  • En
    MDLMaterialTextureFilterMode
    Constants that specify the filtering applied when sampling a texture.
  • En
    MDLMaterialMipMapFilterMode
    Constants that specify how mipmap levels are selected during sampling.

Cameras 3

Define viewpoints and projection used to render a scene.

  • Cl
    MDLCameramacOS 10.11+
    An object that describes a viewpoint and projection for rendering a scene.
  • Cl
    MDLStereoscopicCameramacOS 10.11+
    A camera that captures separate left- and right-eye views for stereoscopic rendering.
  • En
    MDLCameraProjection
    MDLCamera

Lighting 8

Illuminate a scene with physically based, area, photometric, and probe lights.

  • Cl
    MDLLightmacOS 10.11+
    An abstract base class for light sources that illuminate a scene.
  • Cl
    MDLPhysicallyPlausibleLightmacOS 10.11+
    @class MDLPhysicallyPlausibleLight
  • Cl
    MDLAreaLightmacOS 10.11+
    A light source that emits illumination from a finite surface area.
  • Cl
    MDLPhotometricLightmacOS 10.11+
    @class MDLPhotometricLight
  • Cl
    MDLLightProbemacOS 10.11+
    An object that captures the surrounding illumination at a point for image-based lighting.
  • Pr
    MDLLightProbeIrradianceDataSource
    A protocol that supplies irradiance data used to compute light probes.
  • En
    MDLLightType
    Constants that identify the kind of a light source.
  • En
    MDLProbePlacement
    Constants that specify how light probes are positioned within a scene.

Transforms 14

Position, orient, and scale objects through transform components and operations.

  • Cl
    MDLTransformmacOS 10.11+
    Concrete implementation of <MDLTransformComponent>.
  • Pr
    MDLTransformComponentmacOS 10.11+
    MDLTransformComponent
  • Cl
    MDLTransformStackmacOS 10.13+
    An ordered stack of transform operations composed into a single transform.
  • Pr
    MDLTransformOpmacOS 10.13+
    A protocol for a single named operation in a transform stack.
  • Cl
    MDLTransformRotateXOpmacOS 10.13+
    A transform operation that rotates about the X axis.
  • Cl
    MDLTransformRotateYOpmacOS 10.13+
    A transform operation that rotates about the Y axis.
  • Cl
    MDLTransformRotateZOpmacOS 10.13+
    A transform operation that rotates about the Z axis.
  • Cl
    MDLTransformRotateOpmacOS 10.13+
    A transform operation that rotates about all three axes.
  • Cl
    MDLTransformTranslateOpmacOS 10.13+
    A transform operation that translates an object in space.
  • Cl
    MDLTransformScaleOpmacOS 10.13+
    A transform operation that scales an object.
  • Cl
    MDLTransformMatrixOpmacOS 10.13+
    A transform operation defined directly by a 4x4 matrix.
  • Cl
    MDLTransformOrientOpmacOS 10.14+
    A transform operation that orients an object using a quaternion.
  • En
    MDLTransformOpRotationOrder
    Constants that specify the order in which rotations are applied.
  • Cl
    MDLMatrix4x4ArraymacOS 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.

  • Cl
    MDLSkeletonmacOS 10.13+
    An object that defines a hierarchy of joints used to deform a mesh.
  • Cl
    MDLPackedJointAnimationmacOS 10.13+
    An object that stores packed translation, rotation, and scale animation for a skeleton's joints.
  • Pr
    MDLJointAnimationmacOS 10.13+
    A protocol for objects that supply per-joint animation for a skeleton.
  • Cl
    MDLAnimationBindComponentmacOS 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.

  • Cl
    MDLAnimatedValuemacOS 10.13+
    An abstract base class for time-sampled values used in animation.
  • Cl
    MDLAnimatedScalarmacOS 10.13+
    AUTO-GENERATED FROM CodeGen.h
  • Cl
    MDLAnimatedScalarArraymacOS 10.13+
    AUTO-GENERATED FROM CodeGenArray.h
  • Cl
    MDLAnimatedVector2macOS 10.13+
    A two-component vector value animated over time with keyframes.
  • Cl
    MDLAnimatedVector3macOS 10.13+
    A three-component vector value animated over time with keyframes.
  • Cl
    MDLAnimatedVector3ArraymacOS 10.13+
    A time-sampled array of three-component vectors for animation.
  • Cl
    MDLAnimatedVector4macOS 10.13+
    A four-component vector value animated over time with keyframes.
  • Cl
    MDLAnimatedQuaternionmacOS 10.14+
    A quaternion value animated over time for keyframed rotation.
  • Cl
    MDLAnimatedQuaternionArraymacOS 10.13+
    A time-sampled array of quaternions for animating rotations.
  • Cl
    MDLAnimatedMatrix4x4macOS 10.13+
    A 4x4 transform matrix value animated over time with keyframes.
  • En
    MDLAnimatedValueInterpolation
    Constants that specify how animated values are interpolated between keyframes.
  • En
    MDLDataPrecisionmacOS 10.13+
    Constants that specify the numeric precision of stored animation data.

Type Aliases 1

  • Ty
    MDLVoxelIndex
    MDLVoxelIndex is a four component voxel index.
← Games & 3D