Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Frustum Culling

  1. #1
    Intern Newbie
    Join Date
    Nov 2003
    Posts
    45

    Frustum Culling

    Have anyone tried using Frustum Culling to speed up the rendering in a game? I don't know why even I have implemented such method, there is not much improvment in the FPS..(Even I have tried the sample in game tutorial, I find that even I have done the frustum culling, there is still not much improvement from the sample..)

  2. #2
    Junior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Silicon Valley
    Posts
    218

    Re: Frustum Culling

    It depends on the application. But if you're drawing a significant number of triangles you'll find that frustum culling is absolutely necessary to get a decent framerate.

    For a reasonable field of view (say, 45 to 60 degrees) frustum culling will cause you to send less than a tenth of your geometry to your graphics card on average.

  3. #3
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: Frustum Culling

    For static meshes, use display lists, and do not do your own frustum culling.

  4. #4
    Intern Newbie
    Join Date
    Nov 2003
    Posts
    45

    Re: Frustum Culling

    Sorry, could you explain why? And in what case should I use frustum culling? And is dynamic meshes referred to some meshed generated in run-time? (ie. currently I am loading a heightmap to generate the terrain, it is static one, right?)

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: Frustum Culling

    Originally posted by ZbuffeR:
    In fact, if you do culing yourself :

    1) the CPU has to compute what is viewable and what is not : slow with many triangles
    2) you have to send to the GPU the (new) data at each frame : slow with many triangles

    If your terrain has a HUGE number of triangles, you can split it in several regions, put each on a display list, and do basic culling on the cpu for each region. So you avoid totally the problem 2) and limit severely the problem 1).

    Hope I explained it well.

    PS: to start, forget the culling totally, it will not be useful if you have less than about 500x500 triangles.

    [This message has been edited by ZbuffeR (edited 01-10-2004).]

  6. #6
    Intern Newbie
    Join Date
    Nov 2003
    Posts
    45

    Re: Frustum Culling

    Dear ZBuffeR,

    Thanks very much for your detailed explaination. Um... I am going to make a terrain which is going to accomodate near hundred users, so. I think the terrain size will be over 100000 x 100000. um.. I think your opinion is good actually..but just because I am new to computer graphics.. it is rather difficult for me to think of how to speedup the rendering and do the culling

  7. #7
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: Frustum Culling

    Start first with much less triangles, just a little advice.
    You can have a super-large terrain with only 2 triangles you know.
    After you have a working prototype, you can think about LOD, culling, etc. to have much detailed terrain. But do not try to do everything at once.

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: Frustum Culling

    Maybe you should explain how you did the culling first. Are you using a hierarchical approach?

    -- Tom

  9. #9
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Florence, Italy
    Posts
    209

    Re: Frustum Culling

    check this out, it might help you. http://cslab.wheaton.edu/~dthulson/p...s/frustum.html

  10. #10
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,411

    Re: Frustum Culling

    First get it to work.

    THEN make it fast, if it turns out it's not working fast enough.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •