Are RealityKit lights expensive?

I am finding some unexpected behavior with lights I've been adding to a RealityKit scene.

For example, I created 14 PointLights, but only 8 appeared to be used to illuminate the scene.

In another example, I created 7 PointLights and 7 SpotLights, and the frame rate dropped quite a bit.

Are lights computationally expensive, causing some adaptive behavior by RealityKit?

Should I be judicious in my use of lights for a scene?

(Note: I set arView.environment.lighting.resource to a Skybox with a black image; my goal was to completely control the lighting. I don't know if that added to the computational load)

Accepted Reply

Hi, yes, we have a limit of 8 lights in a scene at once. In general, yes, our lighting is expensive since we have point + spot lights, as well as environment lighting estimation from ARKit, and image based lighting/skyboxes. Could you provide a bit more information in about what you are trying to do and why you are trying to do fully custom lighting?

  • I was creating a scene (a cafe) in Blender, and I wanted to control the lighting to create a certain mood (e.g., individual lights over tables) - more of a VR experience than an AR experience.

    Fortunately I ran into this early, so I can adapt.

    General workflow: model in Blender > [GLB/GLTF file] > "Reality Converter" to add textures > [USDZ file] > into app (where I add lights)

  • ah ok, is this meant to be a macOS app, or iOS too? You could potentially add some screen space lighting or ray tracing with a post processing effect.

  • Just iOS actually. Think horizon Workrooms, but for a couple of friends meeting in cozy cafes for coffee. It isn't ideal when holding a phone... but one can hope for a hands-free solution in the future.

Add a Comment

Replies

Hi, yes, we have a limit of 8 lights in a scene at once. In general, yes, our lighting is expensive since we have point + spot lights, as well as environment lighting estimation from ARKit, and image based lighting/skyboxes. Could you provide a bit more information in about what you are trying to do and why you are trying to do fully custom lighting?

  • I was creating a scene (a cafe) in Blender, and I wanted to control the lighting to create a certain mood (e.g., individual lights over tables) - more of a VR experience than an AR experience.

    Fortunately I ran into this early, so I can adapt.

    General workflow: model in Blender > [GLB/GLTF file] > "Reality Converter" to add textures > [USDZ file] > into app (where I add lights)

  • ah ok, is this meant to be a macOS app, or iOS too? You could potentially add some screen space lighting or ray tracing with a post processing effect.

  • Just iOS actually. Think horizon Workrooms, but for a couple of friends meeting in cozy cafes for coffee. It isn't ideal when holding a phone... but one can hope for a hands-free solution in the future.

Add a Comment