Three.js: Under the orthogonal camera, there is a problem with the halo

Created on 25 Sep 2017  路  13Comments  路  Source: mrdoob/three.js

I tried using a OrthographicCamera
in https://threejs.org/examples/webgl_lights_physical
I do not know if this is a bug

let height = 2;
let aspec = window.innerWidth / window.innerHeight;
camera = new THREE.OrthographicCamera(-2, 2, 2, -2,
    -1000, 1000);
camera.left = aspec * height / -2;
camera.right = aspec * height / 2;
camera.bottom = height / -2;
camera.top = height / 2;

camera.position.x = -4;
camera.position.z = 4;
camera.position.y = 2;
camera.updateProjectionMatrix();

image

Three.js version
  • [ ] Dev
  • [x] r87
  • [ ] ...
Browser
  • [x] Chrome
OS
  • [x] Windows
Hardware Requirements (graphics card, VR Device, ...)

All 13 comments

I assume you are referring to the long, narrow, white highlight. Correct?

I am unable to reproduce this on a mac.

@WestLangley
Yes i modified it into a OrthographicCamera and tried to move + rotate it, there would be such a problem.
long, narrow, white highlight.

Are you able to reproduce the problem with a different computer?

I reproduce the problem on other windows computers.

OrthographicCamera don't render Jsonloader object from blender. only PerspectiveCamera work
is there some solution ?

@FishOrBear Can you reproduce the problem with a perspective camera?

@WestLangley Perspective camera can not reproduce the problem.

OrthographicCamera
image

PerspectiveCamera
image

Probably because the renderer's eye position is wrong?

Sorry, I have no idea what you are doing. Perhaps someone else can address this.

@FishOrBear I'm also unable to reproduce. Can you provide a live version (maybe a fiddle) that shows the visual error?

@Mugen87
hi This is a simple example https://jsfiddle.net/q65t62k9/

I changed it OrbitControls.js So I control the camera

For the sake of simplicity I have embedded the code directly.

What you are seeing is a distortion of the specular highlight due to the orthographic projection.

This is not a three.js bug.

Also, I suggest you avoid a negative near plane. See this SO post.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boyravikumar picture boyravikumar  路  3Comments

filharvey picture filharvey  路  3Comments

alexprut picture alexprut  路  3Comments

zsitro picture zsitro  路  3Comments

jack-jun picture jack-jun  路  3Comments