How do I eliminate flickering and vibrating artifacts when using shadows?

When I use a DirectionalLight with a Shadow component, I often see vibrating graphic artifacts, from wiggling at the edges to distracting herringbone patterns across flat surfaces.

To a lesser degree I also see similar artifacts along the edges of straight objects alongside ground shadows when .receivesLighting is set in sceneUnderstanding.

I discussed these with Michael in our RealityKit lab earlier. I understand this might be "shadow acne" and the shadow's depthBias parameter may effect it.

Can we have an overview of these issues and an approach to adjusting parameters to eliminate it?

  • This video clip shows a slight case, especially on the planks and briefly on the box. https://vimeo.com/561098852 The awkward bit for debugging is, the problem can disappear but then reappear over time with the same parameters.

  • hey! I'll do some more investigating internally to see if I can figure out your issue, and I'll report back if I figure out anything. Also, I passed your feedback about not receiving an email from the entrepreneur camp to WWDR, so they should be aware that you had this problem.

Add a Comment

Replies

Hi! We are still investigating to see if this is an issue on our side. Can you clarify a few things for me:

How many virtual lights do you have in the scene and what type (directional, spotlight). Is there a specific light type that is causing this issue?

What is the approximate distance between the virtual lights and the visual objects? Do you see any difference if you move the lights closer or further away from the objects?

Has this been a 'known issue' that you've encountered, or is this a new issue you are seeing in iOS 15?

Finally, please make sure to file this issue on Feedback Assistant if you haven't already. That will give us a way to track this issue internally and we can hopefully get it assigned to an engineer to investigate. Also, if you are able to create a small sample project that reproduces this issue, that would help immensely with debugging. I will try to create one on my side as well.

  • I am seeing this issue as well. Do you still need a sample project? Then I could provide one.

  • @arthurfromberlin, We can reproduce the issue internally. However, I am happy to take a look at the sample project to see if you're doing something different from how we reproduced it. Feel free to share it on Feedback Assistant.

  • Okay great, my Feedback number is: FB9517992 I've attached a sample project as well as a video recording.

    Do you know of any current workaround for this? I've been struggling with this issue since at least March. Apparently Spotlight can create raytraced shadows which look better but of course have the disadvantage of not emitting the light as evenly as a DirectionalLight. Also they seem to illuminate the shadow catcher plane in addition to casting shadows which is not what I want.

    Is there a chance that this will be fixed with the final iOS 15 release in September?