Jump to content

Occlusion Culling Options


Scott Richmond
 Share

Recommended Posts

I'm prototyping a small 3D isometric game and I'd like to have the ability to drop in, for example, 30,000 cubes as a floor. Or really, any number of models and assorted items. But the point is - There would be lots over a large area. The question is, how can I cull unseen objects in an efficient manner from the render pipeline?

Using an isometric camera I'd only ever be looking at maybe 10% of the total amount of entities out there.

Would I:

1. Render all entities on the map and then try to cull them by:

1a. Using the LE2 OC - I've tried this and it appears very inefficient in general. I think the time its taking to traverse the entity list is larger than just rendering the primitive cubes I'm testing with. I also have heard that if I group entities together into larger chunks, it would help a lot. However I don't know how?

1b. Try to organise the entities into some form of octree and .hide() .unhide() them based on region.

2. Don't render everything in the first place. Only create and render the objects the player is looking at by keeping track of camera position. Delete entities as they fall out of range. But would this create lots of stutter as the player scrolls around?

 

Addendum: I also heard that, for example with these cubes I'm testing with, if I copy instead of create for each cube that helps? Any documentation on this?

 

Any other ideas? Tips on how to render faster?

Programmer, Modeller

Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64

Visual Studio 2008 | Photoshop CS3 | Maya 2009

Website: http://srichnet.info

Link to comment
Share on other sites

CopyEntity(cube) makes a new GPU instanced cube, so it's much faster than CreateCube.

 

For games with lots of cubes, the best is to remove all inner faces. You only need to do this once when a new cube is added or removed, so there is no FPS loss per frame, and the FPS gain is huge, since you then only have the outer hull left.

 

The easiest way to remove inner faces, is to check which faces are overlapping. This won't remove all inner faces, but at least half of them.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Agreed. And that approach can be taken further by stitching the cubes together and generating an outer shell as well. It is something I have thought about. But, I may yet still choose to go for a model approach if I'm not getting the quality I want with simple primitive cubes. And if thats the case, then I won't be able to apply such optimizations.

The game concept is fairly open-ended at this point.

Programmer, Modeller

Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64

Visual Studio 2008 | Photoshop CS3 | Maya 2009

Website: http://srichnet.info

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...