• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Transformation

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

3 replies to this topic

### #1null434  Members

Posted 19 September 2013 - 09:24 AM

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, 19 September 2013 - 09:26 AM.

### #2Seabolt  Members

Posted 19 September 2013 - 10:15 AM

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.

Perception is when one imagination clashes with another

### #3null434  Members

Posted 19 September 2013 - 12:00 PM

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?

### #4Juliean  Members

Posted 19 September 2013 - 12:07 PM

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.