Models and meshes
Display virtual objects in your scene with mesh-based models.
Overview
Meshes are the building blocks for every visible geometric shape and model in RealityKit, including those that come from a USDZ file. Create primitive shapes by calling a MeshResource factory method, such as generateBox(size:cornerRadius:), or define your own mesh by creating and configuring a MeshDescriptor or a LowLevelMesh instance.
Display meshes in your scene by creating a ModelComponent for each mesh, and add that component to an entity. You can also add Material instances to your mesh by adding them to the same ModelComponent instance.
Topics
Model display
Creating 3D entities with RealityKitCreating 3D models as movable windowsCreating a 3D painting spaceTracking and visualizing hand movementApplying mesh to real-world surroundingsObscuring virtual items in a scene behind real-world itemsModelComponentMeshResourceModelEntity
Render configuration
ModelSortGroupComponentModelSortGroupOpacityComponentAdaptiveResolutionComponentModelDebugOptionsComponentMeshInstancesComponent
Static meshes
Updatable meshes
Integrating virtual objects with your environmentCreating a spatial drawing app with RealityKitCreating a plane with low-level meshLowLevelMeshLowLevelMesh.DescriptorLowLevelMesh.PartLowLevelMesh.LayoutLowLevelMesh.AttributeLowLevelMesh.VertexSemanticLowLevelMesh.PartsCollectionLowLevelBufferLowLevelInstanceData
Bounding box retrieval
Text generation options
2D path extrusion for 3D mesh creation
MeshResource.ShapeExtrusionOptionsMeshResource.ShapeExtrusionOptions.MaterialAssignmentMeshResource.ShapeExtrusionOptions.ChamferModeMeshResource.ShapeExtrusionOptions.CurveStrokeResolutionMeshResource.ShapeExtrusionOptions.ExtrusionMethod
Mesh description
MeshBufferMeshBufferContainerMeshBufferSemanticMeshBuffersAnyMeshBufferMeshInstanceCollectionMeshModelCollectionMeshPartCollection
Mesh skeletons
MeshResource.SkeletonMeshResource.Skeleton.JointMeshSkeletonCollectionMeshJointInfluenceMeshResource.JointInfluences
Mesh resource data
Blend shape management
BlendShapeWeightsComponentBlendShapeWeightsMappingBlendShapeWeightsBlendShapeWeightsDataBlendShapeWeightsSet
Entity compliance
See Also
Scene content
Hello WorldEnabling video reflections in an immersive environmentCreating a spatial drawing app with RealityKitGenerating interactive geometry with RealityKitCombining 2D and 3D views in an immersive appTransforming RealityKit entities using gesturesResponding to gestures on an entityMaterials, textures, and shadersAnchorsLights and camerasContent synchronizationAudioVideosImages