1

I am using VideoMaterial material on plane, in RealityKit to play video over an object in AR. This works easily, but I would like the video to change brightness based on the real world lighting. I thought this is done automatically, but with the VideoMaterial it doesn't work.

Can you please advice me whether it's possible to do this?

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
user1207524
  • 251
  • 2
  • 12
  • 27

1 Answers1

1

RealityKit's VideoMaterial does not respond to lighting. VideoMaterials are basically UnlitMaterials, which means that scene lighting doesn’t affect them.

In SceneKit, in exactly the same way, LightingModel.constant does not react to light.

P. S.

Add an extra semi-transparent top plane with SimpleMaterial to integrate a video into environment.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
  • 1
    I thought this would be the case, but is there perhaps any workaround to this how I could make the video look more blended into the environment despite this? – user1207524 Nov 02 '22 at 23:24
  • 1
    Use a semi-transparent plane with SimpleMaterial over a plane with VideoMaterial, that will catch highlights from light sources. – Andy Jazz Nov 04 '22 at 06:39