# Transformation

This topic is 2132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'd like to know which transformation matrix put the 3d objects into viewing frustum? Is that view matrix? And is that projection matrix is just to create the viewing frustum, if not, then what does?  And also what is projection space?

Edited by null434

##### Share on other sites

There are four distinct spaces that objects get transformed into:

An object starts in Model Space (generally), then get's multiplied by the world matrix, putting it into World Space.

Then that matrix gets multiplied by a view matrix putting it into view space.

Then that matrix gets multiplied by the projection matrix putting it into Projective or Homogenous space.

Homogenous space is where all on screen vertices are in a Unit Cube. This is where the "w" divide happens, clipping the 3D locations into a 2D screen space coordinate system.

There is also another, less used, transform applied here, called the viewport transformation. It's what determines the bounds of the 2D locations.

##### Share on other sites

Thanks. Another question: I read from a tutorial  from Directx SDK that explains how render a flat triangle on screen and it said the vertices of the flat triangle are already defined in screen space. My question is how to let Direct3D know I define vertices in object space? It looks like Direct3D automatically sees the vertices put into vertex buffer as untransformed?

##### Share on other sites

It looks like Direct3D automatically sees the vertices put into vertex buffer as untransformed?

Screenspace is from (-1, 1) to (1,-1) on x / y. So if you specifiy a triangle with points on those four corners, they don't need to be transformed anymore, since they now fill the whole screen no matter what, and thus they are in screen space. Plus, Direct3D does indeed see all vertices put in untransformed, you apply all additional transforms in the vertex shader, and what comes out there is considered to be in screen space. So if you just throughput vertices like in that example, you are just fine.

• 12
• 18
• 29
• 11
• 24