Hello guys, I do have a virtual environment in which I have a mesh. I want the mesh to be mirrored onto a glass which is very close nearby.
I can't just duplicate it because it varies depending on from which position you are looking at it.
Is there a possibility to mirror a mesh via reflections? It shouldn't reflect real world objects - just a virtual mesh.
Thank you guys
This is possible. Follow these steps:
- Generate an IBL from the virtual mesh.
- Use ImageBasedLightComponent and ImageBasedLightReceiverComponent to receive lighting from your HDRI map
The session Optimize your 3D assets for spatial computing covers the use of the ImageBasedLightComponent and the ImageBasedLightReceiverComponent. The relevant portion is at the ~16min mark.
Here are 2 semi related tips:
-
You can use EnvironmentLightingConfigurationComponent (released in visionOS Beta 2) with environmentLightingWeight set to 0 to remove the surrounding environment lighting.
-
Glass varies in appearance. Here are some PBR settings to get you started.
var material = PhysicallyBasedMaterial()
material.baseColor = .init(tint: UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 0))
material.metallic = 0.0
material.roughness = 0.05
material.specular = 0.5
material.blending = .transparent(opacity: .init(0.5))