FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Culling and Bullet

2 posters

Go down

Culling and Bullet Empty Culling and Bullet

Post  Faikus Fri Jun 05, 2009 4:32 am

Hi,

it seems to me resource culling is based on the object's sio2 coordinates saved in _SIO2object->_SIO2transform->loc. For physical objects, however, their "real" coordinates are computed by bullet and stored in _btRigidBody. Bullet's coordinates are transferred to sio2 coordinates in sio2ObjectRender, but this method is not called if the object has been culled. It seems this is a problem if Bullet moves the object back into the frustum: since the object is culled based on its (old) sio2 coordinates, it never gets the updated Bullet coordinates that would prevent it from being culled again. So objects that once were outside the frustum and are moved inside the frustum by Bullet are not shown.

Faikus

Posts : 23
Join date : 2009-05-26
Location : Berlin

Back to top Go down

Culling and Bullet Empty Re: Culling and Bullet

Post  sio2interactive Fri Jun 05, 2009 6:18 pm

Like in tutorial06


sio2ResourceRender( sio2->_SIO2resource,
sio2->_SIO2window,
sio2->_SIO2camera,
SIO2_RENDER_SOLID_OBJECT | SIO2_RENDER_CLIPPED_OBJECT );


This will force the clipped object to update their physic matrix, but not render them if they are out of the frustum...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Culling and Bullet Empty Re: Culling and Bullet

Post  Faikus Sat Jun 06, 2009 5:44 am

Ok, that works. Is the flag SIO2_RENDER_CLIPPED_OBJECT supposed to be used in all scenarios with physics objects? Is there another reason for this flag? Why, for example, doesn't the engine just update sio2's coordinates for all physical objects from their bullet coordinates at the end of sio2PhysicRender?

Faikus

Posts : 23
Join date : 2009-05-26
Location : Berlin

Back to top Go down

Culling and Bullet Empty Re: Culling and Bullet

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum