Disable culling in PhysX

Started by
4 comments, last by cgrant 10 years, 2 months ago

Does anybody know how to disable culling in PhysX?

Advertisement

Can you explain what you mean by culling in physx?

AFAIK, physx doesn't cull anything, and it would be stupid to do as it would disable parts of the, well, world, and it has nothing to cull from, like a camera/viewport, are you referring the actors sleeping?

Edit: Try to give us an example of the problem, maybe there's an alternative solution.

-MIGI0027

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

from nvidia:

A mesh may be treated either as double-sided or single-sided (see below for how to specify this). Backface culling is enabled for single-sided meshes, disabled for double-sided ones.

Further down on that page this is precified:


It is also possible to generate hits for both front-facing and back-facing triangles of a mesh, using 
PxHitFlag::eMESH_BOTH_SIDES flag. A mesh is treated as double-sided if either 
PxHitFlag::eMESH_BOTH_SIDES or 
PxMeshGeometryFlag::eDOUBLE_SIDED is set, so a mesh with eDOUBLE_SIDED flag will always be treated as double-sided regardless of whether PxHitFlag::eMESH_BOTH_SIDES is set or not. If a mesh should sometimes be treated as single-sided and sometimes as double-sided, create it as single-sided and specify PxHitFlag::eMESH_BOTH_SIDES for the query, or set it in the hit filter callback.


So you could disable this culling by specifying PxMeshGeometryFlag::eDOUBLE_SIDED when creating your geometry with your actor.

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

Sure,the problem is I don't know where to put that flag.

The shape doesn't accept it,the PxTriangleMeshGeometry doesn't accept it....

off: why u no come online on skype?

EDIT:

Doesn't matter,set it,and set this flag too: PxShapeFlag::eSCENE_QUERY_SHAPE

My character controller still falls through the ground.



Like
0Likes 1Likes
Like

Posted Today, 09:00 AM

Sure,the problem is I don't know


Which version of PhysX are you using? In 3.3 The PxTriangleMeshGeometry constructor does accept PxMeshGeometry flags...see the API reference

This topic is closed to new replies.

Advertisement