I also posted this to HDR Background becomes a tiny cube when using Three.OrthographicCamera and is unable to properly light meshes. · Issue #21140 · mrdoob/three.js · GitHub because I was not sure if it was a bug or something wrong on my part.
Describe the bug
A clear and concise description of what the bug is. Before submitting, please remove unnecessary sections.
When using THREE.OrthographicCamera
and HDR Lighting, The HDR Lighting does not cover the background, and it is instead a tiny cube that is hard to spot at first but can be seen.
A problem with this is that the mesh does not get the proper lighting that it needs. It appears to be black, and the colors are hard to find. However, the mesh still has the “metalness” retained in it.
To Reproduce
Steps to reproduce the behavior:
- Go to
Glitch :・゚✧ and remix the project. Do this to edit it. - Change the
want_to_see_bug
variable tofalse
- Click on “show”
- Use your mouse to find the glasses mesh. They shouldn’t be visible at first, so you will have to use OrbitControls to find them. You will have to move your cursor to the right while clicking the screen to find them. You can clearly see the HDR Background as well.
Picture of Expected results:
- To see the bug, change the
want_to_see_bug
variable totrue
- You will be able to see the glasses immediately. They will be darker this time. If you look closely, you may notice a little speck.
Picture of Expected results:
6.Zoom into the speck. You will see the hdr background.
What you should see:
You can find the code if you click the link in the “live example” section.
Live example
Expected behavior
I expected to see the glasses, with the expected color and texture, as well as the HDR Background actually acting like a background and not as a little speck.
Platform:
- Device: [Desktop, Mobile]
- OS: [Windows, MacOS, Linux, Android, iOS]
- Browser: [Chrome, Firefox, Safari, Edge]
- Three.js version: [dev, r???]
- I am not sure about the THREE.js version as I used
https://threejs.org/build/three.js
. I assume it gives the latest version. Also, For my RGBELoader(which loads texture for hdr background) I usedthree@0.116.1
and for my GLTFLoader(which loads the 3d model) I usedthreejs/r122
. Not sure if those mean versions but they were present in the links.