If an object is overlapping something...
then will the thing behind the object be drawn?
err, i mean, if i were to draw a HUGE square that covers a screen up, is there anyway to tell opengl to NOT render or draw anything behind it? Sure theres a straight forward way of checking to see if an object is completely overlapped or not.. but i''d thought that might not be efficient..
anyone know how to deal with this?
you''re talinkg about a form of culling. There are several forms of culling in general:
1) frustum culling
2) normal culling
3) visibility occlusion
2 and 3 can overlap, but in my view they mean different things. you''re talking about visibility occlusion - probably the most difficult of the culling techniques, but efficient engines have it. One solution is the portal technique - an advanced topic (google it if you''re really interested), another is a mixture of painstaking normal culling and (binary) tree traversal (I''m assuming you''re talking about a world that''s been divided into somekind of a tree structure - bintree, quadtree, octree). i don''t know how much experience you have with 3d programming, so i''m assuming relatively little (based on the question) - my apologies if i''m wrong
. anyway, probably the first type of culling you should have a look at is frustum culling - read the article by Mark Morley (google) and you''ll hopefully get the hang of it. next try normal culling (checking if a poly''s normal is facing away or towards the camera), and then the portals and such.
a slightly different approach to your question: there is actually a fourth form of culling that you can do little to control, that takes place inside the gpu - it is the last line of defence agains overdraw. namely, the gpu will never draw objects that are not visible. however, anything you send down the pipeline (any vertex, texcoord, normal), is computed by the gpu before exculded from the final frame. therefore the answer is: if you draw a bunch of stuff and a large quad over it, only the quad is physically drawn onto the screen, but anything below it goes through the whole gauntlet as well until it is left out by the depth test or does not appear on the screen at all.
hope i wasn''t shooting blanks here and hopefully you find this useful,
Crispy
1) frustum culling
2) normal culling
3) visibility occlusion
2 and 3 can overlap, but in my view they mean different things. you''re talking about visibility occlusion - probably the most difficult of the culling techniques, but efficient engines have it. One solution is the portal technique - an advanced topic (google it if you''re really interested), another is a mixture of painstaking normal culling and (binary) tree traversal (I''m assuming you''re talking about a world that''s been divided into somekind of a tree structure - bintree, quadtree, octree). i don''t know how much experience you have with 3d programming, so i''m assuming relatively little (based on the question) - my apologies if i''m wrong

a slightly different approach to your question: there is actually a fourth form of culling that you can do little to control, that takes place inside the gpu - it is the last line of defence agains overdraw. namely, the gpu will never draw objects that are not visible. however, anything you send down the pipeline (any vertex, texcoord, normal), is computed by the gpu before exculded from the final frame. therefore the answer is: if you draw a bunch of stuff and a large quad over it, only the quad is physically drawn onto the screen, but anything below it goes through the whole gauntlet as well until it is left out by the depth test or does not appear on the screen at all.
hope i wasn''t shooting blanks here and hopefully you find this useful,
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement