   How to locate an object with screen rect?
  I have some objects which's FVF are defined with D3DFVF_XYZ. Every object has its own transform matrix, and its vertices are normalized as: x=-1,y=-1...Now I want to put the object in the screen with specific rect, for example the object is a rectangle, and I want to make it at (0, 0, 100, 100). How can I get the scale factor and translation factor?I don't want to use D3DFVF_XYZRHW or ID3DXSprite, because I want the object has full 3D features.Following is my code:void CD3DObj::SetPosition(int x, int y, int width, int height){// get the scale factorD3DXVECTOR3 vtScreenTopLeft, vtScreenBottomRight;D3DXVECTOR3 vtWorldTopLeft(-1, -1, m_ZOrder), vtWorldBottomRight(1.0f, 1.0f, m_ZOrder);World2Screen(&vtScreenTopLeft, &vtWorldTopLeft);World2Screen(&vtScreenBottomRight, &vtWorldBottomRight);float fScaleX = abs(((float)width) / ((float)(vtScreenBottomRight.x - vtScreenTopLeft.x)));float fScaleY = abs(((float)height) / ((float)(vtScreenBottomRight.y - vtScreenTopLeft.y)));D3DXMATRIX matScale;D3DXMatrixIdentity(&matScale);D3DXMatrixScaling(&matScale, fScaleX, fScaleY, 1.0f);D3DXMATRIX matTranslation;D3DXMatrixIdentity(&matTranslation);D3DXMatrixTranslation(&matTranslation, ?, ?, 0);// Apply the rotation matrices to complete the world matrix.D3DXMatrixIdentity(&m_MatTransform);D3DXMatrixMultiply(&m_MatTransform, &matScale, &matTranslation);}And I found the texture of object is blured sometimes. I can't set accureate tu and tv for vertex.Is there anyone can help me? Thanks.   
  The blurred object is because of the texel/pixel "feature" of DX9. Take a look here :http://msdn.microsoft.com/en-us/library/bb219690(VS.85).aspx(if you want to go fast, just add or remove 0.5 to the world matrix and it should work not blurred anymore)For the Screen Space problem...if you are drawing textured quads why don't you just use an Orthogonal projection Off center?   ;  I think the world looks like more real with perspective projection than orthogonal projection. Is there no way to locate object in screen with perspective projection?   ;  Hi feal87, thanks for you help. I took your suggestion for mapping texture.I have found a way to resolve these two issues (texture mapping and location object in screen), below is my code, now it locate the object accuratly:Maybe it's not right way, but it works. Only me meet this issue? or my question is too stupid? Or nobody manages objects in this way?void CD3DObj::ToScreen(D3DXVECTOR3* pVtScreen, const D3DXVECTOR3* pVtWorld, const D3DXMATRIX* pMatWorld){if (pMatWorld)D3DXVec3Project(pVtScreen, pVtWorld, m_DX->GetViewport(), m_DX->GetMatProjection(), m_DX->GetMatView(), pMatWorld);elseD3DXVec3Project(pVtScreen, pVtWorld, m_DX->GetViewport(), m_DX->GetMatProjection(), m_DX->GetMatView(), m_DX->GetMatWorld());}void CD3DObj::ToWorld(D3DXVECTOR3* pWorld, const D3DXVECTOR3* pScreen, const D3DXMATRIX* pMatWorld){if (pMatWorld) D3DXVec3Unproject(pWorld, pScreen, m_DX->GetViewport(), m_DX->GetMatProjection(), m_DX->GetMatView(), pMatWorld);elseD3DXVec3Unproject(pWorld, pScreen, m_DX->GetViewport(), m_DX->GetMatProjection(), m_DX->GetMatView(), m_DX->GetMatWorld());}void CD3DObj::SetupTransform(){int height = GetRectH(m_RcWindow);int width = GetRectW(m_RcWindow);D3DXVECTOR3 vtScreenCenter, vtCenter(0, 0, m_ZOrder);ToScreen(&vtScreenCenter, &vtCenter);vtScreenCenter.x = m_RcWindow.left + ((float)width) / 2.0f - 0.5f;vtScreenCenter.y = m_RcWindow.top + ((float)height) / 2.0f - 0.5f;ToWorld(&vtCenter, &vtScreenCenter); // get the scale factorD3DXVECTOR3 vtScreenTopLeft, vtScreenBottomRight;D3DXVECTOR3 vtWorldTopLeft(-1, -1, m_ZOrder), vtWorldBottomRight(1.0f, 1.0f, m_ZOrder);ToScreen(&vtScreenTopLeft, &vtWorldTopLeft);ToScreen(&vtScreenBottomRight, &vtWorldBottomRight); float fScaleX = abs(((float)width ) / ((float)(vtScreenBottomRight.x - vtScreenTopLeft.x)));float fScaleY = abs(((float)height) / ((float)(vtScreenBottomRight.y - vtScreenTopLeft.y)));D3DXMATRIX matScale;D3DXMatrixIdentity(&matScale);D3DXMatrixScaling(&matScale, fScaleX, fScaleY, 1.0f);D3DXMATRIX matTranslation;D3DXMatrixIdentity(&matTranslation);D3DXMatrixTranslation(&matTranslation, vtCenter.x, vtCenter.y, 0);// Apply the rotation matrices to complete the world matrix.D3DXMatrixIdentity(&m_MatTransform);D3DXMatrixMultiply(&m_MatTransform, &matScale, &matTranslation);}   