"Getting Started with WebGL 3" camera parameters and lighting models

Source: Internet
Author: User

Perspective Camera: Perspectivecamera (FoV, Aspect, near, far)

1, Perspective FoV: This is the most difficult to understand, my understanding is that the eyes open angle, that is, the size of the angle of view, if set to 0, pretty close your eyes, so what can not see, if 180, then may think your horizon is very broad, but in 180 degrees, often objects are very small, Because he's got a smaller percentage of your entire viewable area.

2, near the surface: This, represents your near the cutting surface distance. Add, you can also think of the distance from the eye distance, assuming 10 meters away, please do not set a negative value, three.js silly, do not know how to forget,

3, far plane distant: this, it means that you are far from the cutting surface,

4. Aspect ratio aspect: the aspect ratio of the actual window, that is, the width divided by the height. The larger the value, the greater your width.

Orthographic projection camera: Orthographiccamera (left, right, top, bottom, near, far)

1. Left parameter

Left: the vertical distance from the center point of the camera.

2. Right parameter

Right: The vertical distance from the center point of the camera.

3. Top parameters

Top: The vertical distance of the top plane from the center point of the camera.

4. Bottom parameters

Bottom: The vertical distance from the base plane to the center point of the camera.

5. Near parameters

Near: The vertical distance from the center point of the camera to the nearest plane.

6. Far parameter

Far: the vertical distance from the center point of the camera from the remote plane.

For the illumination model, as with OpenGL, it is important to note that the position of the directional light is a vector, the range of the items should be between (0,1), the other light is considered to be placed in the space of a position of a lamp, so the range can be very large.

As with other modules, the light that needs to be added is an object that declares a lamp and then determines the type, position, and color.

"Getting Started with WebGL 3" camera parameters and lighting models

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.