Are dynamic lights possible with RealityKit
Generated on 7/29/2024
1 search

This post is brought to you by Tailscan,
the best devtool for Tailwind CSS.
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.

Build a spatial drawing app with RealityKit
Harness the power of RealityKit through the process of building a spatial drawing app. As you create an eye-catching spatial experience that integrates RealityKit with ARKit and SwiftUI, you’ll explore how resources work in RealityKit and how to use features like low-level mesh and texture APIs to achieve fast updates of the users’ brush strokes.

Optimize your 3D assets for spatial computing
Dive into an end-to-end workflow for optimized 3D asset creation. Discover best practices for optimizing meshes, materials, and textures in your digital content creation tool. Learn how to harness shader graph, baking, and material instances to enhance your 3D scene while optimizing performance. Take advantage of native tools to work more effectively with your assets and improve your app’s performance.