반응형
본 글은 국민대학교 김준호 교수님의 "컴퓨터 그래픽스" 강의자료 정리 목적으로 만들었습니다.
글 자료의 모든 권한은 김준호 교수님께 있습니다.
Vertex Processor
Overview of Vertex Processor
Vertex Processor
- Converting object representations from one coordinate system to another
- Object coordinates -> Camera coordinates -> Screen coordinates
rotation, trans등을 해서 카메라 기준으로 보여지게 해준다
- Object coordinates -> Camera coordinates -> Screen coordinates
ModelView matrix
What is modelView Matrix?
The composition of a model matrix and a view matrix
- OpenGL manages the model matrix and the view matrix together
- Model matrix
- 3D transformation of an object (or model) in the world coordinate system
- View matrix
- 3D transformation of a camera in the world coordinate system
- this is the extrinsic parameters of the camera
We can obtain the camera coordinates by multiplying the ModelView matrix to the object coordinates
카메라가 어떻게 놓여있는지와 관련되어있음
입력 : 물체의 좌표계에서 바라본 위치
결과 : 카메라의 좌표계에서 바라본 위치
카메라의 관점에서 물체의 위치를 나타낸 것.
Projection matrix
What is projection Matrix?
projection matrix P transforms camera coordinates into clip coordinates
The canonical view volume is defined in the clip space
표준적인 view volume으로 표현해 쓰기 편하게 하겠다.
평행하지 않은 걸 평행하게 바꿔버리기 때문에 homoginius코딩은 무한을 유한으로 표현할 수 있다.
어떠한 view frustum 이라도 -1 1사이의 길이 2의 정육면체로 변환할 수 있다.
Viewport
Viewport matrix W transforms clip coordinates into screen-space coordinates
w까지 곱하면 우리가 보는 화면이라고 볼 수 있다.
winx,winy, are screen-space coordinates
winz is depth coordinate
- 설정 안건드리면 0~1 범위임x y z의 방향 주의
반응형
'컴퓨터그래픽스' 카테고리의 다른 글
[23-1 컴퓨터 그래픽스 정리] shader programing part1 (0) | 2023.07.13 |
---|---|
[23-1 컴퓨터 그래픽스 정리] Clipping, Rasterization (0) | 2023.07.13 |
[23-1 컴퓨터 그래픽스 정리] transformations (0) | 2023.07.13 |
[23-1 컴퓨터 그래픽스 정리] Objects (0) | 2023.07.13 |
[23-1 컴퓨터그래픽스 정리] Camera (0) | 2023.07.13 |