VirtualEnvironmentProbeComponent VS ImageBasedLightComponent

Hi. I want to know what's the difference between VirtualEnvironmentProbeComponent and ImageBasedLightComponent? It seems they both can achieve the same light and reflection effect of environment.

Answered by Vision Pro Engineer in 887816022

Hi @NahtanMak

Both ImageBasedLightComponent and VirtualEnvironmentProbeComponent feed diffuse and specular environment lighting into RealityKit. The difference is in how lighting is targeted and when you'd reach for each.

ImageBasedLightComponent lights an entity from an image you provide. It only affects entities that also carry an ImageBasedLightReceiverComponent pointing at the IBL entity, so targeting is per-entity and opt-in. This makes it a good fit when you want precise, art-directed control, such as lighting a single hero object with a studio HDRI while leaving the rest of the scene untouched.

VirtualEnvironmentProbeComponent provides environment lighting spatially for entities you place within the same virtual world. It uses pregenerated Probes built from an EnvironmentResource, and its Source can be .single(probe), .blend(from:to:t:), or .none. This is the right choice when you're building a fully virtual environment and want entities within it to share consistent, precomputed indirect lighting.

Note: in visionOS, ARKit automatically provides environment lighting for the Shared Space, so VirtualEnvironmentProbeComponent is mainly useful when you need to supply that lighting yourself, typically in fully immersive scenes.

Accepted Answer

Hi @NahtanMak

Both ImageBasedLightComponent and VirtualEnvironmentProbeComponent feed diffuse and specular environment lighting into RealityKit. The difference is in how lighting is targeted and when you'd reach for each.

ImageBasedLightComponent lights an entity from an image you provide. It only affects entities that also carry an ImageBasedLightReceiverComponent pointing at the IBL entity, so targeting is per-entity and opt-in. This makes it a good fit when you want precise, art-directed control, such as lighting a single hero object with a studio HDRI while leaving the rest of the scene untouched.

VirtualEnvironmentProbeComponent provides environment lighting spatially for entities you place within the same virtual world. It uses pregenerated Probes built from an EnvironmentResource, and its Source can be .single(probe), .blend(from:to:t:), or .none. This is the right choice when you're building a fully virtual environment and want entities within it to share consistent, precomputed indirect lighting.

Note: in visionOS, ARKit automatically provides environment lighting for the Shared Space, so VirtualEnvironmentProbeComponent is mainly useful when you need to supply that lighting yourself, typically in fully immersive scenes.

VirtualEnvironmentProbeComponent VS ImageBasedLightComponent
 
 
Q