btDbvt and Rendering

User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

btDbvt and Rendering

Post by projectileman »

Hi.
How is btDbvt class used for rendering and filtering non-visible objects ?
Specially in the culling and occlusion queries?
Is there any clue on the collideOCL() method? how it sorts the primitives front-to-back?

thanks.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: btDbvt and Rendering

Post by Erwin Coumans »

View frustum culling uses the dynamic AABB tree against the frustum volume.

Occlusion culling is done using ray casting, accelerated by the dynamic AABB tree. It fires a ray for each pixel in the occlusion map and records the first hit object.

The Extras\CDTestFramework demo has a toggle to visualize the occlusion map, when using btDbvtBroadphase.
Hope this helps,
Erwin
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

Re: btDbvt and Rendering

Post by projectileman »

Thanks Erwin for your quick responce. I couldn't found it by myself.... so thanks.