Sign in to follow this  

Transform States

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm used to copying tutorials to learn how to do things. I want to know what its really doing though. What I am talking about are the transform states that the device uses. I'm just going to guess based on what I think they do. the D3DTS_WORLD transforms world space to a specific location. The D3DTS_VIEW transforms the camera of what will be display in world space. D3DTS_PROJECTION is how things are projected into world space. I don't know any others. So let me put these items into a class. D3DTS_WORLD would be used to move objects around, D3DTS_VIEW would be for a camera, D3DTS_PROJECTION would be used for how things would look so I would put it into like a scene manager or something. If anyone knows these are correct could you please explain maybe a little bit more than I can, I'm just really guessing, and if there are others that you know what they do please post. thanks

Share this post


Link to post
Share on other sites
WORLD moves objects from object space to world space. ie: It moves, scales, and rotates your meshes.

VIEW is your camera's position and direction.

PROJECTION is mix of things. FOV is how wide your view cone is. A small FOV is like a zoom lens. Often a D3DX_PI/4 (45 degree) view is used. ASPECT controls how wide a pixel is compare to how tall a pixel is. This depends on your screen mode, window size, display (4:3 TV or 16:9 HD TV). For full screen, it's often set to 1, or 4.0/3.0. You could put in a 16.0/9.0 option for people with wide screen displays. NEAR and FAR clipping planes control the minimum, and maximum view distances. These affect the distribution of values in the Z buffer as well as how distant an object is before you can't see it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
... VIEW is your camera's position and direction. ...
A small correction: VIEW transforms coordinates from world space to view space. View space is determined by the camera's position and orientation. VIEW is the inverse of the camera's position and direction.

Also, PROJECTION transforms from view space to a space with a variety of names (but effectively is the window on your screen).

Here is the transformation pipeline:

Model coordinates -> D3DTS_WORLD -> World coordinates -> D3DTS_VIEW -> View space coordinates -> D3DTS_PROJECTION -> Normalized device coordinates -> Viewport transformation and window system -> Screen coordinates.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this