image stretched for BHV point light source
Mathadon opened this issue · 2 comments
When zooming way out and rotating the camera in this example:
https://erichlof.github.io/THREE.js-PathTracing-Renderer/BVH_Point_Light_Source.html
The image looks like this:
The image is stretched out along just one axis. This seems wrong?
Hello @Mathadon ,
This is actually correct behavior. Since our human eyes don't normally see with this extreme FOV, it makes it difficult to comprehend what going on with the abnormally stretched images. I was able to reproduce your view, but I turned my camera:
My image shows a little better what's happening under the hood. At this extreme FOV (167 in the above image), the only time objects appear normal is if they are right in the center of the viewport. The further out objects are from the center, the more severe the stretching becomes. In this extreme case, you can actually have one object (the Stanford Bunny) with normal looking feet, but then as you get up into its ears that are farther from center, it becomes massively more stretched. This is theoretically what would happen to us if we were able to fly through a black hole: if we flew in head-first, then our upper bodies would be way more stretched than our feet (that hadn't caught up yet with our head's amount of gravity pull). The scientific name is 'spaghetti-fication' - ouch, LOL.
I think why it appears as one axis in your image is that you just happened to fly the camera up to the right spot and then rotated at just the right angle to catch the bunny's ears and light sphere where they are farther out from the center than the bunny's feet. If you look closely, the bunny's feet in your image actually don't look distorted at all, because they are nearer the center of the viewport. If you were to rotate your camera, you could probably make it look like it was stretched on any axis.
-Erich
@erichlof thanks for the quick and detailed answer! The main thing that I probably missed is that by scrolling my mouse, I thought I was moving the camera but in fact I was expanding the FOV (field of view), which I understand from that name to be the 'looking angle' of the camera. Then the result indeed makes perfect sense.
I dug around the documentation again and found that I have to use the "wasd" keyboard buttons to move the camera instead, then I indeed get the expected result.
I had tried the arrow keys but those don't control position either.
Perhaps to avoid having people make the same mistake as I did it would make sense to:
- change the default behaviour of the scroll button (or arrow keys)
- or, display on-screen camera instructions by default
Thanks for the great work (and permissive software license) :)