Advertisement Jump to content
Sign in to follow this  

Point Picking and Lighting in Direct3D

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

1) How can I accurately pick a coordinate within a scene? Put an object over there
2) How can I control lighting in D3D? Do ambient lighting, directional lighting.
Are there guidelines on these sorts of topics?

Share this post

Link to post
Share on other sites
To pick a coordinate in 3d space, you will first need to transform the 2d cursor coordinates on your screen to a 3d ray in view space, then transform that 3d ray in view space to a 3d ray in world space. Then if your just trying to pick a specific point, you would test to see if the ray intersected with that point. If your trying to test if the ray picked an object, you will test each triangle in the object for an intersection with the line.

For lighting, there are many different ways to do it, and many many lessons and tutorials on the internet. These are questions that shouldn't be too difficult to find the answer to using google ;)

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!