Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

occlusion culling

Name: Anonymous 2010-09-30 19:20

sup /prog/,

So I'm gonna make myself a isometric game that is built up with cubes so one of the important things to me is occlusion culling when there are a ton of cubes on that screen to be drawn. As of right now i'm making a quick java version for quick deploy and easy access with swing, etc.(Later it'll be ported to either C or C++).

As of right now i kinda have an idea of how i could attack this by rendering 2 frames. Here's how it would work:

1st Frame:
-Rendered from left -> right; front -> back
-As it's rendering it would check each cube based on it's hit box to see if it is covered or partially visible
-If partially visible(or completely) =>Draw cube; add to a Array containing all the cubes that will be drawn in the 2nd frame
-else => Discard that cube and move to the next one

2nd Frame:
Very easy render from right->left; back -> front with all of the cubes that will be visible in that frame.


In theory this method should work if implemented correctly, but my question to /g/ is does anyone know of a simpler more optimized way of doing occlusion culling(without using openGL or restricting myself to DirectX).

Name: Anonymous 2010-09-30 20:25

>>4
>how do you plan on determining which cubes are visible in your "first frame"?
-As it's rendering it would check each cube based on it's hit box to see if it is covered or partially visible
-If partially visible(or completely) =>Draw cube; add to a Array containing all the cubes that will be drawn in the 2nd frame
-else => Discard that cube and move to the next one
I would run pixel checks in the frame to see if something is there or not there.


and yeah i could make it so i break the map up into chucks and then run those chucks through to see if they would be visible or not.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List