kinda hard to explain but what I want to do is place meshes about 200 of them I guess it would be in world space then each time a player moves the camera with point to there current location, what is the best way to get the cords for the mesh not all 200 need to be shown on the screen at one time just maybe 30 -40 tops, im just kinda at a loss on how to figure this out any help would be great
thanks

3D map
bluemoon2181
You want to load your 3D mesh objects from a file.
You need to give them appropriate coordinates so that they appear in the correct position on the **screen**.
As an example, you might want a 3D teapot mesh to always appear in the top-left of the screen as the end-user sees it.
Correct so far
If so... It's not a straightforward question, nor is it a particularly common way of constructing a 3D world. You'd have to do various bits of matrix-maths magic in order to go from a screen-coordinate (say 100,100) back to an appropriate 3D coordinate in world space.
Functions like D3DXMatrixInverse() when applied to the world*view*proj*vport matrix should allow you a "backwards" route from screen-space to world-space. Alternatively you can feed the necessary pieces into D3DXVec3Unproject() to do it all in one-step.
Hopefully I haven't gone off in the wrong direction with that one, but post back if you still need help...
Jack
HJ Liu
thanks
Magnus Green
If it concerns 3D maps, can you tell us what books/articles you've already read to try to understand this non-trivial challenge (there's a colossal variety of ways to do 3D mapping, so we need you to tell us where you're starting from).
iJatin
Try this: Find an entry level book on 3D terrain mapping, like Frank Luna's book "Introduction to 3D Programming with DirectX 9.0" Or you can dive deeper by reading Greg Snook's "Real-Time 3D Terrain Engines".
You might also want to search the colossal number of discussions on 3D terrain mapping at www.gamedev.net or on USENET newsgroups.