Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

garcia

Testing of an vertex is visible

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

How do I test if an single vertex (x,y,z) is visible. I have drawn things behind and may draw polygon in front of it. I only need to do this very little, so a slow opengl way is fine. Sorry i am a new to opengl and sorry for bad english

Share this post


Link to post
Share on other sites
Advertisement
Salut,

Si tu parles frnçais, lis ceci :

Il s''agit du Frustum Culling. Tu trouveras un lien (en anglais) qui t''expliqueras comment l''implémenter. Personnelement, j''ai utilisé cette technique pour tester si des polygones étaient visibles ou pas dans mon moteur 3D.

Le lien :

http://www.markmorley.com/opengl/frustumculling.html


Hi,

Here''s a link for using frustum culling. I used this technic for my engine and it''s works well ...

http://www.markmorley.com/opengl/frustumculling.html



========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/

Share this post


Link to post
Share on other sites
I don''t think fustrum is the answer here.
There are 2 ways.
line of sight ''ray trace'' test. mathmatically testing if the line between you and the point is clear,
or,
do a depth read at the point after you have done all your rendering and logic calculations.
using glReadPixels.
use gluProject to find where on the screen to read.
It MUST be done after as many other calculations as possible. Otherwise, you could litterally lower your frame rate to as low as 20% of it''s original speed (I''ve managed even less).
When you have the depth value, you will need to work out what values equate to a visible point... Ie, if you are rendering a lens flare, then don''t use depth testing when rendering your sky. That way, when you do the depth test, the value you get back will always be the clear value if it is visible.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!