Bringing Carrot Weather To Apple Vision Pro: A Perspective

Written by Steve Gifford

New

March 14, 2024

A few weeks ago, Carrot Weather announced its Apple Vision Pro support. If you’ve got one, you should get a Carrot Weather subscription; it’s gorgeous and was a blast to implement.

As you might imagine, that app requires a lot of custom work, but the wind is implemented with Terrier, our client toolkit for mobile devices. Terrier users can do all of this on a VisionPro if they’d like.

Rendering Techniques

On iOS, we set up a Metal rendering context, and we can do what we want in our view. Since everything is composited on the fly, as long as we’re done on time, it all works.

There is a mode like that on VisionOS. We can take over the space and do what we like, forming a unique VR experience. But that’s a bit much for a weather app. What Carrot wanted was for us to play nice with other apps and UI components in a Volume.

Integrating with RealityKit

Working in a Volume means using RealityKit to build up our sphere and draw on it. That’s different from how we usually work, so we had to extend ourselves.

The solution was rendering our globe into a flat map and draping it on top of a RealityKit-based sphere. This lets everything else in the same Volume interact with our object, including lighting, intersection, and all that good stuff.

Limitations and Future Improvements

Thankfully, we have a very flexible renderer that makes this solution possible. Still, it’s limiting, and I’d like to see Apple move over some of the custom shader support they have on iOS.

Using a Apple Vision Pro device in the lab before the release was very interesting. I don’t think our enterprise customers will be pivoting from the web any time soon, but who knows? We’re prepared if they are.