ARView missing renderOptions on macOS

On macOS 13 Beta with Xcode Beta 4, I'm unable to use the ARView Rendering options described in the documentation:

https://developer.apple.com/documentation/realitykit/arview/renderoptions-swift.property?changes=latest_major

They simply don't exist on the ARView class. How can we disable rendering effects on macOS? A simple cube uses 1GB of memory which is a bit ridiculous.

Furthermore, there should be a way to control the frame rate of the view. It's forced to 120hz on my Macbook which is way overkill.

When reverse engineering RealityKit, I can see that there is a variable there:

RealityKit.ARView.__preferredFrameRate.getter : Swift.Float

But it's private. Any plans to make this a public setting?

Replies

It looks like you can call the frameRate setter anyway, but it has no effect.

arView.__enableAutomaticFrameRate = false
arView.__preferredFrameRate = 60

Hi, it's a known issue that renderOptions is not available on macOS (86489892). However, all of those render options should be disabled on macOS anyways. Regarding __preferredFrameRate, that value is ignored on macOS and the frame rate of your app is set to the frame rate of the display. It's also a private API so you should not use it. You are welcome to file an enhancement request on Feedback Assistant for this functionality.

  • Thank you, I've filed FB11305740. There really needs to be a way to control the frame rate on macOS for non-AR use cases.

    Regarding the renderOptions, my reason for trying to disable these is that a simple default box scene seems to be using 500-900mb memory. I found a Stack Overflow topic which recommends disabling some options to improve RealityKit memory footprint. If these are already disabled, what can I do to decrease the memory usage? Surely 500mb is not expected for such a simple scene?

  • Can you share a more about your scene? I created the default RealityKit project with the box on macOS and I'm seeing 240MB memory usage, using the same RealityKit version in the Ventura builds. Ah ok, it looks like it must be related to render targets, since if I increase the window size of the app, memory usage increases.

  • Yes, exactly. Full screen on the Pro XDR blows up Dirty Memory Footprint to 2000 MB.

[snip] See reply