January 17, 2023

Adding Bezier animations to RealityKit

I love animation systems. I wrote animation systems for the C64 and Amiga in the 80’s and 90’s, for fashion designer apps at H&M, for games like Candy Crush and god knows how many more. RealityKit has a nice and user friendly animation system that can handle different linear world space transforms, play model space animations from usdz models and combine them in sequences or groups. RealityKit entities can play an AnimationResource with the playAnimation method and AnimationResources are created from AnimationDefinitions. Read more

January 13, 2023

Using the RealityKit AnchorEntity

We spent last post learning how ARKit anchors work and how they relate to RealityKit entities. In the end we wrote our own RealityKit AnchorEntity based on the results of the ARSessions provided ARAnchors. This is all fine but if we just need a quick anchor we can use the RealityKit provided AnchorEntity. We start the same way by setting up an ARSession. Requesting horizontal plane detection. private func setupARSession() { let session = self. Read more

January 3, 2023

Realitykit Surface Detection

I’ve spent a lot of time learning and writing code based on RealityKit. I really like the framework. It’s nicely written, has a lovely tiny, lightweight ECS implementation and makes writing AR applications and games pretty straightforward. I thought I’d write down some things I’ve learned in a series of blog posts that might help other AR devs out there in the wild. The first thing that comes up when writing a new RealityKit app is detecting surfaces in order to anchor virtual objects in the real world. Read more

April 23, 2019

Metal shader development on an iPad

The iPad is an amazing learning device. You can read shader books on it. Draw shader ideas on it. And ever since iOS playgrounds got a major boost you can even develop Metal shaders on it using Playgrounds. It was the only device I had with me on my easter vacation in the woods. Most of the time was spent like this: But you need to catch your breath every once in a while and what could possibly be better than coding shaders on the iPad, in the hammock? Read more

April 14, 2019

Recreating Beat Saber lazers with unicorns

I’ve been coding professionally for over 20 years and I still learn new things every single day. One of the most fun and rewarding ways I use to get better is to recreate things in games I love. And I’m in love with so many games. It never ends. An endless, lovely, gamedev tutorial! One of the games I love is Beat Saber. I wanted to recreate it as a VR learning experience on my HTC Vive. Read more