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

Thread: Occlusion Culling Technique

  1. #1

    Occlusion Culling Technique

    Everyone who ever has implemented an octree knows that the scene can have a lot of overdraw unless you have some sort of occlusion culling. There are many different techniques to implement it. After trying an image based technique and hardware occlusion culling tests with not much succes I decided to implemented my own.

    It works with occlusion planes and can cull boundingboxes which I use in the octree of the engine. It creates lines from the camera to the 8 points of the boundingbox and checks if they pas thought the occlusion plane. If one of the lines doesn`t go through the occlusion plane then the boundingbox is visible and the content of the box can be rendered. A pretty simple technique but it works pretty well.

    The demo can be found here:
    http://www.genesisdevice.net/otherpr...xperiment.html

  2. #2

    Occlusion Culling Technique

    Very interesting. I planed a voxel based engine few years ago and I decided to use octrees but it was too slow. As you say there was a lot of overdrawing. I'll study your code and may be I'll can success with that project.
    No signature provided yet.

  3. #3

    Occlusion Culling Technique

    This technique I believe can be used verry efficiently for this. Tonight I`m going to work on some optimalisations in the line-quad collision to make it faster for large scale use.

  4. #4
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Occlusion Culling Technique

    I will take a look when I get home. I'm also interested for in this technique.
    NecroSOFT - End of line -

  5. #5

    Occlusion Culling Technique

    very interesting indeed. I'm gonna have a play with this as well
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  6. #6

    Occlusion Culling Technique

    Hope you find it usefull. I just added it to my engine and it works great. The only prob is now that I have to place my occlusion planes manually. The next step will be generating the OC planes.

  7. #7
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Occlusion Culling Technique

    I got some optimization: now you check a cube (8 lines). why not make a "billboard" of your cube. I don't say this works in all situations, but you cast 4 lines instead of 8. Just turn the billboard towards the camera.
    NecroSOFT - End of line -

  8. #8

    Occlusion Culling Technique

    Not a bad idea, but is has some drawbacks. First of all the size off the billboard is tricky. To small and the object in the box can be culled even when it`s visible. To large and the object might not be culled even if its invisible. Even calculating the size is difficult. A high tower for example may use a smaller bilboard when viewed from above then when viewed from the front. How would one calculate this? Also when this calculation is done on runtime would it be faster then calculating the 4 extra lines? Also the billboard must rotate towards the camera. This requires some calculations to. In my opinion using the AABB best solution.

    On another note, I optimised the calculations quite a bit today. The most costly part of the calculation was checking if the line intersection of the plane is inside the quad. I did this by calculating the angles between the intersection point and the quadpoints. If these added to 360 degrees the lines passes though the quad. This however does a lot of costly arccos operations. I found a method on the internet without using this. After some time test the calculations 40 % faster in worse case! Not bad.

  9. #9
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Occlusion Culling Technique

    A tower is a bad example, but a sphere or other round/square thingy would be exelent for billboard culling.
    NecroSOFT - End of line -

  10. #10

    Occlusion Culling Technique

    True, but this would lead to a state where the designer has to chose between different OC methods. I rather just keep it simple.

    How is your Necro3d Engine 2 comming allong btw? Just read the latest GameDev magazine. Sound verry interresting the plugin structure for all the modules. Also what kind of culling methods do u use?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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