I really love the immersive environments, but I don’t have experience with creating them. Do you have resources or tutorials you can recommend for creating these from scratch? I’ve seen the sample projects and videos, but they usually start in the middle, assuming you already have the assets created.
Immersive environment learning material
Hello,
If my understanding is correct the goal is to create an app that uses an immersive space "from scratch" (which I'll interpret to mean "programmatically" in SwiftUI) versus loaded from a USD/USDZ file.
RealityKit is the most straightforward framework to use with RealityView. Just add any Entity created in code to the RealityContentView. To render simple procedurally generated shapes check out Creating a primitive shape, with details about RealityKit's Component-Entity system left to the reader.
Another approach is using Compositor Services and Metal. Metal is about as close as you can get to being "from scratch"; however, there is a tradeoff between complexity and flexibility.
Recommended samples:
- Interacting with virtual content blended with passthrough shows how to transition into/out-of an immersive space and draw/paint with gestures.
- Rendering hover effects in Metal immersive apps is a more advanced sample showcasing new features in visionOS 26