Are dynamic lights possible with RealityKit
Asked on 07/29/2024
1 search
Yes, dynamic lights are possible with RealityKit. You can use different types of lights such as spotlights, directional lights, and point lights. Spotlights and directional lights can cast shadows by default, and you can customize their color and intensity. You can add these lights and shadows either through Swift API in code or through Reality Composer Pro, which offers a UI for tuning lighting behavior.
For example, you can attach a spotlight to an entity, configure its properties like color, intensity, and attenuation radius, and even add a shadow component to it. This allows objects lit by dynamic spotlights and directional lights to cast shadows by default. If you don't want some objects to cast shadows, you can add a dynamic light shadow component to them and set cast shadow to false.
For more details, you can refer to the session Discover RealityKit APIs for iOS, macOS and visionOS.
Relevant Sessions

What’s new in USD and MaterialX
Explore updates to Universal Scene Description and MaterialX support on Apple platforms. Discover how these technologies provide a foundation for 3D content creation and delivery, and learn how they can help streamline your workflows for creating great spatial experiences. Learn about USD and MaterialX support in RealityKit and Storm, advancements in our system-provided tooling, and more.

Discover RealityKit APIs for iOS, macOS and visionOS
Learn how new cross-platform APIs in RealityKit can help you build immersive apps for iOS, macOS, and visionOS. Check out the new hover effects, lights and shadows, and portal crossing features, and view them in action through real examples.

Create enhanced spatial computing experiences with ARKit
Learn how to create captivating immersive experiences with ARKit’s latest features. Explore ways to use room tracking and object tracking to further engage with your surroundings. We’ll also share how your app can react to changes in your environment’s lighting on this platform. Discover improvements in hand tracking and plane detection which can make your spatial experiences more intuitive.