Sign in to follow this  
Curry

Occlusion culling?Complement CHC++ in webgl

Recommended Posts

Hi,

I am trying to implement an occlusion culling algorithm in my webgl-based rendering project. I've read some papers and want to use the CHC++ to accelerate the culling.

However, I have already batched the objects with the same material in the GPU memory.  Further more, I use drawInstance in my application. Since in CHC++, we have to break up the batches and drawInstance seems not suitable.

I am considering a cost/benefit function to determine whether to break up the batches. But it seems to be very difficult to find such a function.

Is anyone has any suggestions? Any suggestion is welcomed.

Best regards,

Curry

Share this post


Link to post
Share on other sites

IMHO, CHC++ is irreparably flawed, in that it requires low-latency (<1 frame) CPU->GPU->CPU communication. This will always result in CPU and GPU idle time, and can't really be fixed in general.

 

If you want to use a depth-buffer based dynamic occlusion system, then your options are to either do it on the CPU, such as: https://github.com/GameTechDev/MaskedOcclusionCulling ... but these techniques require SIMD intrinsics to be fast, which aren't available in javascript.

Or do it on the GPU, but also move all of the draw submission to the GPU as well, using Draw-Indirect, which I don't think is available in webgl.

 

There's a lot of other kinds of occlusion culling techniques to look into though, e.g.

http://www.gamasutra.com/view/feature/131801/occlusion_culling_algorithms.php?print=1

http://www.gamasutra.com/view/feature/131388/rendering_the_great_outdoors_fast_.php?print=1

http://www.gamasutra.com/view/feature/164660/sponsored_feature_next_generation_.php?print=1

Share this post


Link to post
Share on other sites

IMHO, CHC++ is irreparably flawed, in that it requires low-latency (<1 frame) CPU->GPU->CPU communication. This will always result in CPU and GPU idle time, and can't really be fixed in general.

 

If you want to use a depth-buffer based dynamic occlusion system, then your options are to either do it on the CPU, such as: https://github.com/GameTechDev/MaskedOcclusionCulling ... but these techniques require SIMD intrinsics to be fast, which aren't available in javascript.

Or do it on the GPU, but also move all of the draw submission to the GPU as well, using Draw-Indirect, which I don't think is available in webgl.

 

There's a lot of other kinds of occlusion culling techniques to look into though, e.g.

http://www.gamasutra.com/view/feature/131801/occlusion_culling_algorithms.php?print=1

http://www.gamasutra.com/view/feature/131388/rendering_the_great_outdoors_fast_.php?print=1

http://www.gamasutra.com/view/feature/164660/sponsored_feature_next_generation_.php?print=1

 

Thank you Hodgman.

I am a newbie in visibility computation. The suggestions you made are quite useful to me:)

Didn't learn about Draw-Indirect yet. But I'll look into it.

Honestly, I didn't calculate the benefit and cost of batching the meshes together.  I didn't figure out the way of estimating it yet.
Anyway, thanks a lot!

Share this post


Link to post
Share on other sites

This is an old technique, but I actually use spatial hashing, and some brute force for frustrum culling.

 

 

Then a low red CPU rasterizer based on dice's presentation. Works very well so far.

Share this post


Link to post
Share on other sites

This is an old technique, but I actually use spatial hashing, and some brute force for frustrum culling.

 

 

Then a low red CPU rasterizer based on dice's presentation. Works very well so far.

Seems a good way for PC applications. But we are trying to do this with webGL. So I don't consider the software culling a good method. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this