I love using PhysX, OpenGL and C++ so far! Today I messed around with cloth materials in it to see what I could do… and got some really nice stuff out of it.
MyCloth* CreateCloth() { NxClothDesc clothDesc; clothDesc.globalPose.t = NxVec3(4,7,0); clothDesc.thickness = 0.3; clothDesc.flags |= NX_CLF_COLLISION_TWOWAY | NX_CLF_VISUALIZATION | NX_CLF_TEARABLE; return (new MyCloth(scene, clothDesc, 8, 6.5, 0.25)); }
Over the next couple of weeks I’ll be starting work on my Games Engines assignment using PhysX: I’ve been tasked with creating physics based version of breakout, changing the game to suit a 3D environment, but keeping the basic idea of a ball breaking blocks. I have a couple of designs in mind, but I’ll leave them for another blog post once I have some sketches done!
I really want to use cloth in my game… not sure how I’ll incorporate it, but I love the way it moves and looks. Especially when NX_CLF_TEARABLE is enabled and the entire thing falls apart! The addition of wind and other forces to a cloth object are also really good-looking. Below are some screenshots from my tests earlier today: