Hi, The MeshRenderers of my model are not on one Mesh. The Mesh in the model are distributed on GameObjects at different levels. Can I directly add the Grounding Shadows component on the Root GameObject to obtain the shadow effect?
Currently I don’t see shadows when I do this. If it doesn’t work, do I need to attach the Grounding Shadows component to each MeshRenderer?
We haven’t done any performance testing, but I wouldn’t expect the additional overhead per-MeshRenderer to be very high. I suspect that RealityKit simply renders a single shadow map for the grounding shadows, and that adding additional MeshRenderers simply means that they are rendered to that single map.
Through my testing, when I added the Shadow component to each MeshRenderer, AVP directly crashed and restarted (show apple logo). It seems that Shadow component also has a limit on the number of triangle data.
Models with relatively small triangular surfaces can be displayed, but the FPS is already very low.
Good to know! Unfortunately, this isn’t something that we have any control over or a way to fix. We simply translate our VisionOS Grounding Shadow component to the equivalent in RealityKit, GroundingShadowComponent. I would recomment submitting feedback to Apple about this issue via their Feedback Assistant app.