Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Graphics pipeline
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Camera Transformation ==== [[File:View transform.svg|thumb|upright=1.5|Left: Position and direction of the virtual viewer (camera), as defined by the user. Right: Positioning the objects after the camera transformation. The light gray area is the visible volume.]] In addition to the objects, the scene also defines a virtual camera or viewer that indicates the position and direction of view relative to which the scene is rendered. The scene is transformed so that the camera is at the origin looking along the Z-axis. The resulting coordinate system is called the camera coordinate system and the transformation is called ''camera transformation'' or ''View Transformation''. : The view matrix is usually determined from the camera position, target point (where the camera looks), and an "up vector" ("up" from the viewer's viewpoint). The first three auxiliary vectors are required: :{{Code|1=Zaxis = normal(cameraPosition β cameraTarget)}} :{{Code|1=Xaxis = normal(cross(cameraUpVector, Zaxis))}} :{{Code|1=Yaxis = cross(Zaxis, Xaxis )}} : With normal(v) = normalization of the vector v; : cross(v1, v2) = [[cross product]] of v1 and v2. :Finally, the matrix: <math>\begin{pmatrix} {xaxis}.x & {yaxis}.x & {zaxis}.x & 0\\ {xaxis}.y & {yaxis}.y & {zaxis}.y & 0\\ {xaxis}.z & {yaxis}.z & {zaxis}.z & 0\\ -{dot}({xaxis}, {cameraPosition}) & -{dot}({yaxis},{cameraPosition}) & -{dot}({zaxis},{cameraPosition}) & 1 \end{pmatrix}</math> : with dot(v1, v2) = [[dot product]] of v1 and v2.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)