Is their a way to only have Unity scene lighting?

Hello. I think I may be misunderstanding the usage of the Lighting node that PolySpatial gives. Is their a possible way to avoid using the Image Based Lighting that VisionOS supplies and only use Unity Scene lighting? ( and correct me if I’m using the wrong terminology here but what I mean is the lighting you get when you have URP lit material on an object and it gets lighting from the environments lighting is what I want to turn off/negate)

I dont understand this too. The documentation directly says to look for workarounds (make crutches). The documentation says that you can use a node in a shadergraph, but when you follow the direct instructions of the documentation - namely, you attach this node where the documentation indicates - the shader simply does not compile, reporting that the number of arguments has been exceeded. It’s simply remarkable that there is not a single sample using this option or at least a shader that will confirm the veracity of the documentation. At least I checked it in version 1.1.6

Yes; by using an Unlit shader graph target. I realize that it’s confusing that the object is lit while the target is Unlit, but the Lit target in this case applies to visionOS’s image based lighting.

1 Like

That’s not an issue we’ve seen before. If you can reproduce it in a bug report, please do so and let us know the incident number (IN-#####) so that we can investigate.

I was able to create a shader that only takes in unity lighting.

Create a new unlit shader graph (changing just the graph settings from lit to unlit did not work for me)

Although it only shows black in the Unity editor and I have to run the simulator or build to headset to get the correct lighting which can be a bit of a pain.

@kapolka Is there a way to control the alpha of the above shader? When i turn on alpha clipping and turn the material to transparent, I get fading within the editor but not in simulator builds.

Yes; by setting Surface Type to Transparent without enabling alpha clipping. In RealityKit, alpha clipping is all-or-nothing; if you enable alpha clipping, anything above the threshold will be fully opaque.

1 Like

First off thanks for answering these questions! I appreciate the help understanding this. I have a question on shadows.

Is there a way to show shadows from the the poly spatial lighting?

I have set Cast Shadows to be true and also attached the VisionOSGroundShadow component but can’t seem to get any shadows to show up (transparent or opaque).

Not at present. It’s something we’d like to support eventually, at least in some simple form (like a single directional shadow).

The VisionOS Grounding Shadow doesn’t use the Unity scene lights (like the PolySpatial Lighting node does); it creates a top-down shadow on visionOS (that is, only visionOS: you won’t see it in Unity play mode). It also requires that both the shadow caster and shadow receiver use visionOS’s image based lighting (that is, either they’re shader graphs with Lit targets or a supported standard lit shader like URP/Lit). That’s not something we have control over, the component is just a simple proxy for RealityKit’s GroundingShadowComponent.

Hope that helps!

1 Like

Does this mean that the Lit shader graph cannot only be affected by DirectionalLight on the Unity scene?

By default, a Lit shader graph will be affected by image based lighting (only). I went into more detail on the other thread, but briefly: To get a shader graph that’s only affected by directional lights, you can either (in PolySpatial 2.0.0-pre.9/visionOS 2.0 beta/Unity 6000) use a Lit shader graph, enable visionOS’s point/spot/directional lights, and use the VisionOS Environment Lighting Configuration component to remove the image based lighting; or, with PolySpatial 1.3.1, you can use an Unlit shader graph and the PolySpatial Lighting Node.

1 Like

Thank you for your response.
I apologize for the duplicate question, as I did not know how to use the Discussions Beta.

1 Like