I am working on an iOS App with ARKit 3 and RealityKit. I want to create virtual 2d planes within the room containing images. Therefore I used
Adding a material to a ModelEntity programmatically
But images which aren't nearly white will get displayed very dark, nearly black. I also tried out UnlitMaterial
. It indeed created a little better result but the images are still way to dark. This problem persists over JPEG and PNG files.
On earlier versions where I used SceneKit I solved a similiar problem through
sceneView.automaticallyUpdatesLighting = true
sceneView.autoenablesDefaultLighting = true
I guess the image did enlight itself through this code.
How can I solve the problem in RealityKit?
Possibly related: https://forums.developer.apple.com/thread/119265