How to control reflection size

Hi!

Is there a way to control the size of the reflection? I used CubeCamera to create it.
Right now it looks like a “magnifying glass” rather than a mirror.


Also is there a way to make the texture less pixelated?

Here you can see my code: https://github.com/sapirmash/3D/blob/59ca1d0fb927d836ff3d559548d31d8dece985a9/ReflectionScene.html

Thanks!

Why are you using CubeCamera and not Reflector in your scene?

1 Like

Your cubecamera is at the center of the scene, so the sphere is close to it and thus there no surprise that the sphere looks big on the box.

2 Likes

I tried to use the Reflector but couldn’t find how to control the reflection intensity (so it won’t be like a mirror) or the reflective object color. Here’s an example of what I’m trying to achieve:


I saw that they used THREE.Mirror but didn’t find any documentation about that. Thanks!

Got it! When I played with the cubeCamera position it helps a bit but still the reflection looks off:

For reference, this is what I’m trying to achieve:


I just started to learn three.js so maybe I’m missing something. Thanks!

Use cubecamera for volumetric meshes
and reflector for one sided flat planes.
https://sbcode.net/threejs/cubecamera/
View the source in the example Iframe for JS example code.

And here is a reflector demo.
https://sbcode.net/threejs/reflector/

In a few days i will update these examples so that JS source is easier to read.

1 Like