Advertisement Jump to content
Sign in to follow this  

3D Point to 2D space?

This topic is 4887 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

Hi there dxdotnet1,
How are you doing?

The Problem
Transform 3d point to 2d space.

The Solution
If it's reverse picking you are talking about. Then the normal transformation pattern you will follow (Do you sense some Yoda speak in there?).

No really. Picking is just transforming your point from screen space to object space through Clip -> View -> World...
To go from 3D space to 2D it would be Object -> World -> View -> Clip space..

1) Set the World transformation matrix
2) Set the View transformation matrix
3) Set the Projection transformation matrix.

I hope this helps buddy. Cheerio

Share this post

Link to post
Share on other sites
i found this function in dx D3DXVec3Project
but what will happen in case the object is not visible in the view/camera? what do these function returned?

Share this post

Link to post
Share on other sites
Hi there dxdotnet1 :)
How are you doing again :)

"Projects a 3-D vector from object space into screen space."
This means that you can use this method. Even if it's not seen in screen space. The method will still return a 3d vector that has been projected from object space to screen space.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!