PolySpatial Environment Radiance usage

I’m trying to understand how to do realistic lighting on virtual objects in Mixed Reality mode. Are there any good examples out there?

I am trying to use the PolySpatial Environment Radiance node with some success, however the objects seem to look considerably darker when I am looking towards a window and the vision pro adjusts exposure. Is this expected?

For reference below is my shader graph. A little unclear if this is made correctly as the documentation is fairly limited.

First of all, you don’t need to use the Environment Radiance node to get image based lighting on visionOS. Simply using a Lit shader graph target (as you are currently doing) or one of the standard shaders (like URP/Lit) is sufficient. Using the Environment Radiance node is only necessary if you need to process the lighting output (Diffuse Radiance/Specular Radiance) within the shader graph, perhaps tinting it before passing it to the Base Color output of an Unlit target. Passing it to the Emission output of a Lit target, in particular, is basically going to double the image-based lighting.

I’m not really sure what you mean, but do you see the same effect in other MR applications? If you use the URP/Lit shader or a simple Lit shader graph (just passing on the texture to Base Color and setting Roughness/Specular/Metallic according to the properties), you will get RealityKit’s default PhysicallyBasedMaterial behavior, which should match that of other applications.

Ah ok! Then does the same apply to the PolySpatial Lighting node? I guess I am a little unclear in what situation I would need these nodes.

Re-reading the documentation, it seems like I had it a bit backwards, where I thought PolySpatial Lighting node added visionOS environmental lighting it actually adds support for Unity lighting Features like lightmapping? So I should use that node if I am baking lightmaps and using dynamic lights. Does that sound right?

Yes, correct. The PolySpatial Lighting node provides support for Unity’s dynamic (directional/point/spot) lighting, light mapping, light probes, and reflection probes. Those are not included by default in Lit shader graphs or standard lit shaders like URP/Lit. The visionOS image based lighting is always used, unless you use an Unlit shader graph target or a standard unlit shader like URP/Unlit.

Thanks! That makes more sense… With regards to the ImageBased Lighting, does it get the environment map automatically, or is there something that needs to be done on the Unity side to get that to work?

I was delighted to learn that adding the AR Environment Probe manager “just works” for reflections, is that true for image based lighting as well?

No, it gets the environment map automatically. It actually combines two environment maps: one from the camera (which is currently not modifiable), and the “system IBL,” which is a fixed pattern of white highlights when the immersion dial is turned down (i.e., when you can see your surroundings) or the environment map corresponding to the simulated environment (the moon, e.g.) when the immersion dial is turned up. That one you can customize using the ImageBasedLight[Receiver] components.

Thanks for the clarifications! I think I get it now.

I think I got too caught up reading the ShaderGraph “PolySpatial Lighting” page and missed those details in the Material Support page here: PolySpatial Material support | PolySpatial visionOS | 1.2.3