Is this a horrible idea for LOD?

Started by
3 comments, last by RolandofGilead 21 years, 4 months ago
Large objects need to be seen from far away, obviously, but for smaller objects, but is there any problem simply calling glFrustrum() before drawing the small stuff and again when drawing the big stuff? How fast is OpenGL''s view volume clipping?
Advertisement
quote:
How fast is OpenGL''s view volume clipping?

The clipping itself is extremely fast. Changing the clipping planes however, is an expensive state change. It will vary with hardware and drivers. Basically, it''s a matrix update (projection matrix), along with a clipping plane extraction. It shouldn''t hurt, if you do it two or three times per frame, but not for every single object.

But why would you want to do that ? I guess you want to use a different far plane to cull away small objects ? Not a good idea. If you are after better performance, then you''ll need to do the high level culling on the CPU, using some form of hierarchical object structure.

The bottleneck of most modern engines is not the rendering speed of the 3D card, but the transfer speed of the AGP bus. Leaving the culling to the 3D card won''t help in that situation, as your data is still transfered over the bus, just to be discarded by the hardware later on. Pretty much a big waste of resources. If you cull your object on the CPU, then it''s data isn''t transfered anymore. This will speed your engine up.

/ Yann
Use VAR/VAO, don''t transfer the whole scene each frame.
If you are making a proper engine you''ll need the cpu for the physics, logic and etc, so only do very simple culling on it.
Don''t know anything about glFrustum, so I can''t help you there, just wanted to point some things out .
Damn, I hate those smileys.
The problem is exactly the same with VAR/VAO. High level culling should (must) be done on the CPU. That''s what structures such as octtrees are for. Approximating highlevel culling through lowlevel culling on the GPU is a waste of resources, in terms of transfer, transform pipeline saturation (a vertex is still processed by the GPU, before being culled), and VRAM/AGP memory usage.

This topic is closed to new replies.

Advertisement