PolySpatialGroundingShadow not casting shadows on meshes

We’ve added PolySpatialGroundingShadow components to our meshes, but we only see shadows being cast in simulator onto the real world objects, not onto each other.

Very similar to this forum post, we originally only added the component on the object we want to cast the shadow, but also adding the component onto the receiving mesh is not working for us.

Our 2 objects (intended shadow caster and receiver) are both using a custom unlit Shader Graph shader. We are on 0.6.2 polyspatial packages, Unity 2022.3.12.

PolySpatialGroundingShadow sounded like it would work great for us, we don’t need real dynamic light shadows, just a shadow from straight above would work. We are porting these shaders from a non-polyspatial game where we used a custom code node to sample shadow map, but we can’t have custom code nodes in shader graph on Vision OS.

Are we missing something in how to use PolySpatialGroundingShadow correctly? Any other ways to cast a shadow onto unlit materials? Is this possibly something that would be covered by Improved Shader Support?

This grounding shadow component translates directly to the RealityKit GroundingShadowComponent | Apple Developer Documentation on visionOS. I believe this component explicitly only casts shadows onto real world objects, and not meshes.

The shadows cast by PolySpatialGroundingShadow/GroundingShadowComponent only affect objects with Lit shaders (either shader graphs or built-in shaders like URP/Lit). We plan to add shadow support to the PolySpatial Lighting Node at some point, which would give you more options for shadows in Unlit shaders.

1 Like

Looks like Unlit objects don’t cast shadows on Lit objects, either; both the caster and receiver have to be Lit.

Thanks, that helps. We’ll see if we can get around that for now, otherwise we’ll wait for shadow support in the lighting node.

1 Like

PolySpatialGroundingShadow worked with a object with Mesh renderer, but doesn’t work with Skinned mesh renderer. Would it be possible to make it compatible with Skinned mesh renderer in the next version at Unity side based on the architecture?

Casting shadow makes contents great, so I’d like to use the feature as much as I can.

Thanks

2 Likes

Similarly we found that the Polyspatial Gaze Highlight component does not work on skinned mesh renderers either.

1 Like

Thanks for the info! We’ll fix this in a future release.

1 Like

For the PolySpatial Hover Effect, a workaround is to put the hover effect component (as well as a collider, which is always necessary for the hover effect component–it can just be a trigger collider) on the parent (or any ancestor) of the root bone of the skeleton. This doesn’t work for the grounding shadow, unfortunately.

2 Likes

Is there any plan for roughly when it will be ready for support? Thank you.

You mean the fix for skinned mesh renderers? It will be in the next release, which we plan to put out soon.

1 Like