41 lines
1.9 KiB
Markdown
41 lines
1.9 KiB
Markdown
# 2D to 3D
|
||
|
||
#### Spaces and Transformations
|
||
|
||

|
||
|
||
- **Model Space**
|
||
- Model space is relative to an individual model which is made up of vertices.
|
||
- A cube has one vertex at each corner which are positioned relative to the centre of the cube
|
||
- In model space there is no information about where a model is relative to anything in the world, there is only information about the relative positions of the vertices which make up the model
|
||
- **World Space**
|
||
- World space is relative top a larger coordinate system
|
||
- Vertices are positioned in model space and then all moved to the appropriate position in the world
|
||
- **View Space**
|
||
- View space has all vertices from the perspective of the viewer
|
||
- Vertices aren’t defined in view space. The world is moved relative to the viewer position
|
||
- **Clip space**
|
||
- Clip space is an intermediate space after vertices have been projected to what is going to be drawn to the screen
|
||
- **Normalised Device Coordinate space**
|
||
- NDC space is almost identical to the pixels on the screen.
|
||
- Vertices inside the NDC space will be rendered at those positions
|
||
- **Screen space**
|
||
- Screen space maps directly to the pixels on the screen
|
||
- From now vertices can be used to construct triangles, which are rasterised and the appropriate pixels are coloured
|
||
|
||
- Model Transform
|
||
- The transformation of vertices from model space to world space
|
||
- View transform
|
||
- The transform of vertices from world space to view space
|
||
- Projection transform
|
||
- The projection of vertices from view space to clip space
|
||
- Perspective Division
|
||
- The division of each component by its homogeneous $w$ component
|
||
- Viewport Transformation
|
||
- The mapping of normalised coordinates to vertices at screen pixel coordinates
|
||
|
||
#### View Space with Frustum
|
||
|
||

|
||
|
||
Everything outside the frustum isn’t rendered |