CubeCamera inject texture to planar 3D object

Hi all,

I am not an expert with three.js but i was just wondering if it’s possible to inject an environment texture captured by a camera to just one face of a cube using one single camera instead of 6 as the CubeCamera does. Basically to work as a mirror for one single face. I have tried CubeCamera but the texture injected is spherical and does not “reflect” the environment properly. Thank you very much!

Related: Cube mapping reduce distortion

Have you tried using THREE.Reflector for this use case? It’s essentially a mirror (which can be used for any planar reflective effect):

Thanks very much for the reply @Mugen87 i will try. Just one question is the reflector not more expensive as injecting the texture as the CubeCamera does?

The generation of a cube render target is way more expensive than Reflector. CubeCamera needs six render passes whereas Reflector needs only one.

Noob question, but thanks again for clarifying! I was under the impression that after the CubeCamera creates the texture with 6 cameras and injects into the object the only processing cost would be for that image depending on it´s size and on the other hand the Reflector would be dynamic and lower my FPS as it would be updating all the time. So CubeCamera would be more expensive untill complete the task but Reflector would be more expensive at runtime. Once again thanks!

For clarification: My last post assumed you are updating the cube camera per frame like in this example:

Only then you can compare it with Reflector (because it is intended for real-time reflections).

Sorry for not being more specific, thats not the case, i have an Aframe project and in that project i have a reflective glb model flat tiled floor, i was trying to inject some reflection to that model. I saw a tutorial that accomplishes that but using the Three js CubeCamera but the image created is distorted that is why i asked if there was an option that is based on the same component but with only one camera. Thanks.