Lights and cameras
Control the lighting and point of view for a scene.
Overview
In RealityKit, cameras define the point of view from which RealityKit renders a scene. In AR mode, RealityKit creates and controls the camera for you based on the location and orientation of the device. In non-AR mode, you can control the camera by adding an entity that holds one of the camera components below and changing its Transform.
Lighting and shadows are an essential part of creating immersive and realistic experiences. You can craft dynamic and visually appealing environments that respond naturally to the viewer’s movement and other actions by strategically placing and configuring lights and cameras.
Topics
Cameras
PerspectiveCameraComponentOrthographicCameraComponentCameraFieldOfViewOrientationProjectiveTransformCameraComponentPerspectiveCamera
Point lights
Directional lights and their shadows
DirectionalLightComponentDirectionalLightComponent.ShadowDirectionalLightComponent.Shadow.ShadowProjectionTypeDirectionalLightComponent.Shadow.ShadowMapCullMode
Spotlights and their shadows
SpotLightComponentSpotLightComponent.ShadowSpotLightComponent.Shadow.ShadowClippingPlaneSpotLightComponent.Shadow.ShadowMapCullMode
Image-based lights
General shadows
Environment
EnvironmentResourceEnvironmentLightingConfigurationComponentVirtualEnvironmentProbeComponentVirtualEnvironmentProbeComponent.ProbeVirtualEnvironmentProbeComponent.Source
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 entityModels and meshesMaterials, textures, and shadersAnchorsContent synchronizationAudioVideosImages