• ### What is your GameDev Story?

#### Archived

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

# Testing of an vertex is visible

This topic is 6079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
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 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.
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.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 15
• 11
• 9
• 9
• 42
• ### Forum Statistics

• Total Topics
634131
• Total Posts
3015718
×