Jump to content
  • Advertisement
Sign in to follow this  
saravanan_nanothink

Directx Modeller

This topic is 3157 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 Everybody, I am new to this forum, i am from India, i am currently developing a modeler application in directx, so, how can we implement vertex and edge picking thru mouse as like object and face picking. Thank you, Any code samples are greatly appreciated. If i implemented it successfully, then i will post my code publicly.

Share this post


Link to post
Share on other sites
Advertisement
You can vertex pick by just a single poll of the verts, project then compare with mouse position or a select box.
That gets heavy once there is too many verts, but it should work up to about two hundred thousand points.
If your dealing with a model thats heavier pointwise than that (like your making zbrush) probably a point list render of the points and gather the ids under the mouse by reading off the texture.

Edges could be selected just like verts, except you project the edge 2 verts at a time and use a line point proximity test against the mouse - and you actually do the work in 2d.

Theres lots of ways of going about what you said, just figure something out that works with the software and hardware your using, fastest method being the best... but even ease of implementation is important too.

Back face culling is important too, just make points that dont have a face pointing towards the camera unclickable.
An even better method than that is to use a zbuffer, and thatll make sure you cant click on hidden verts.

Calculating triangle adjacency is important, you should work out how to do that because alot of the time youll be using it.

Hope this helps a little.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!