How to remove the impact of AR real environment light sources on materials

The 3D furniture model I built uses some smooth specular reflection materials. I hope to only reflect the HDR image of the ImageBasedLight component I set myself, without reflecting the light source of the AR real environment. How to achieve this in the following scenario?

  1. How to avoid being affected by the light source of the AR real environment when using PBR materials

  2. When using Shader Graph, how can EnvironmentRadiance not be affected by the light source of the AR real environment?

Hi @xuhengfei

Have you tried attaching an ImageBasedLightReceiverComponent to your furniture model?

In order for a model to be affected by the lighting of an ImageBasedLightComponent it must have an ImageBasedLightReceiverComponent referencing the entity with the ImageBasedLightComponent. Here's an example:

// Create an image based light component from an environment resource texture.
let imageBasedLightComponent = ImageBasedLightComponent(source: .single(environmentResource))

// Add the image based light component to an entity.
let lightSourceEntity = Entity()
lightSourceEntity.components.set(imageBasedLightComponent)

// Add an image based light receiver component to the entity you want lit by the image based light source.
furnitureModel.components.set(ImageBasedLightReceiverComponent(imageBasedLight: lightSourceEntity))

In this case, you can replace furnitureModel with the entity that displays your 3D furniture model.

Hey @xuhengfei,

Adding on to what @Vision Pro Engineer said above, you also would need to make use of an EnvironmentLightingConfigurationComponent with an environmentLightingWeight of zero to remove the AR light sources.

Best regards,

Greg

How to remove the impact of AR real environment light sources on materials
 
 
Q