How to use realtime environment as the cubemap?

If we use the AR mode (shoud removed the world skybox), and the model is a imported GLB, we can’t define the cubemap in the material. So how could we reflect the environment from Camera on the model surface?

You can take a look at this example:box-reflection. This example shows how to create a cubemap dynamically using cubemap-renderer.js

Rather than removing the cubemap from the scene, instead remove the skybox layer on the camera

Or, apply the cubemap to the environment mapping on the material at runtime

If most of the models are imported glb, we can’t apply the cubemap mapping to material in advance. :sweat_smile:

You can add the cubemap to the material at runtime (see Can't seem to change cubeMap on Material by Code)

Or add it the scene at runtime and don’t render the skybox layer (see Changing cubemap settings on the fly (via code) not producing desired results)

Or add it to the scene in the Editor and don’t render the skybox layer which is what I did here: How to use realtime environment as the cubemap? - #3 by yaustar

thank you, We will try it!