Saturday, January 19, 2013

Some status updates and source code reorganization post

This is just to let all of you know that for most of the source codes and stuff shared on this blog, I used my university web space. Now as I have graduated, my account has been disabled. This means that you would not be able to access the shared source codes. I will try my best to copy the contents to another web server (dropbox or google docs) but this will take some time. Meanwhile, if there are any urgent requests, please put them here. I will try to post them online and place the links on this blog entry.

Please feel free to comment and let me know if there are any missing archives.

OK here are the archives:

For PhysX tutorials
PhysX 2.8.4 >
   http://dl.dropbox.com/u/5513476/PhysX_Stuff/PhysX_Tutorials_2.8.4.zip
PhysX 3.0.0  >
   http://dl.dropbox.com/u/5513476/PhysX_Stuff/PhysX_Tutorials_3.0.0.zip
PhysX 3.1.0 >
   http://dl.dropbox.com/u/5513476/PhysX_Stuff/PhysX_Tutorials_3.1.0.zip
Cloth in PhysX 3.2.1 >
   http://dl.dropbox.com/u/5513476/PhysX_Stuff/Cloth(PhysX_3.2.1).zip
Cloth in PhysX 3.1 >                                    
   http://dl.dropbox.com/u/5513476/PhysX_Stuff/SimpleCloth(PhysX3.1).zip
EZmesh skeletal animation viewer:
   http://dl.dropbox.com/u/5513476/SkeletalAnimation/EzMeshAnimationViewerSkinned.zip
GLSLShader class:
   http://dl.dropbox.com/u/5513476/GLSLShader.zip
GLSLPathtracer
   https://dl.dropboxusercontent.com/u/5513476/GLSLPathTracer%28bin%29.zip

21 comments:

  1. Hello,

    Can you post your skeletal animation code here, or send it via e-mail? I'd like to have a look at it, if possible.

    ReplyDelete
  2. Hi Patryk,
    Sure, I will post it here asap. Thanks for the request.

    Regards,
    Mobeen

    ReplyDelete
  3. Hi Mobeen,

    Thank you very much.

    Regards,
    Patryk.

    ReplyDelete
  4. Hello,

    Just a friendly reminder about the skeleton animation, as you promised to post it here. :)

    Patryk.

    ReplyDelete
  5. Hi Patryk,
    Really sorry. I have been really busy these days. Thanks for reminding me. Here you go.
    http://dl.dropbox.com/u/5513476/SkeletalAnimation/EzMeshAnimationViewerSkinned.zip

    This is a simple EZMesh file viewer. You can get details about EZMesh format from here:
    http://codesuppository.blogspot.sg/2009/11/test-application-for-meshimport-library.html

    and the EZMesh project is hosted here:

    http://code.google.com/p/meshimport/

    Controls for the program:
    Press ',' to go to previous animation frame
    Press '.' to go to next animation frame
    Press 'l' to enable looping otherwise the animation stops at the last/first frame.

    Thanks,
    Mobeen

    ReplyDelete
  6. Hi, i have a problems with running aplications from your page, still have problems "Error 1 error C2664: 'PxCreatePhysics' : cannot convert parameter 2 from 'physx::PxDefaultAllocator' to 'physx::PxFoundation &' "
    What should i do with this problem? I have that same on visual 2k8 and 2k10. I have win7 64bit.

    ReplyDelete
  7. Hi Mobeen,

    Thanks for your code! I'll have a look later.

    Patryk.

    ReplyDelete
  8. Hi Adam,
    Which PhysX version are you using? It seems to me that your order of parameters to the PxCreatePhysics function is wrong. It is expecting the PxFoundation reference and is getting PXDefaultAllocator reference.

    See if this helps.

    Hi Patryk,
    Thanks. I hope it is useful for you.

    Regards,
    Mobeen

    ReplyDelete
  9. Hey,
    I am using physX 3.2, now i have installed mvs 2k8 and trying run your tutorial project simplebox and have this problem. Samples from sdk its working fine. Meaby u will try to help me? I need only to working this project as bouncing box with use physx :) i need meaby to add some files to folder where i use this? i'm first time use physx, but very need only to work this bouncing box and will be good for me for start :) meaby u can help me and send to me e-mail with working "simplebox"?

    ReplyDelete
  10. Hi Adam,
    Make sure you have setup the visual studio paths as given in the earlier tutorials. http://mmmovania.blogspot.sg/2011/05/getting-started-with-physx-3.html

    I think for 3.2 you might need to modify some paths but as far as I can predict this should solve your problems.

    ReplyDelete
  11. Hi, i have a problem to init Physics. Also to samples "getting"

    i have break on "PxCreatePhysics" the message error is:

    Unhandled exception at 0x75eac41f in ..../.exe: 0xC06D007E: Module not found. Can hel pe me.Thanks.I use Vs 2008 sp1

    ReplyDelete
  12. HI blenangel74,
    Could you share the following
    1) Physx version
    2) which OS win (winxp/7/8) or linux

    I think you have not copied the dlls from the physx directory to you solution directory. See of this helps.

    ReplyDelete
  13. Hi,

    I am using physx3.1 on linux environment. I try to run GettingStarted tutorial but I get the following error:

    main.cpp: In function 'void InitializePhysX()':
    main.cpp:26:126: error: invalid initialization of reference of type 'physx::PxFoundation&' from expression of type 'physx::PxDefaultAllocator'
    /opt/PhysXSDK/Include/PxPhysics.h:808:29: error: in passing argument 2 of 'physx::PxPhysics* PxCreatePhysics(physx::PxU32, physx::PxFoundation&, const physx::PxTolerancesScale&, bool, physx::PxProfileZoneManager*)'

    PxCreatePhysics does not accept PxDefaultAllocator as a pass-by-reference input. So should I initialise it?

    Thanks,
    Puren

    ReplyDelete
  14. Hi,
    The API has changed. You need to call it like this

    static PxPhysics* gPhysicsSDK = NULL;
    static PxDefaultErrorCallback gDefaultErrorCallback;
    static PxDefaultAllocator gDefaultAllocatorCallback;

    void InitializePhysX() {
    PxFoundation* foundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback);
    if(!foundation)
    cerr<<"PxCreateFoundation failed!"<<endl;
    gPhysicsSDK = PxCreatePhysics(PX_PHYSICS_VERSION, *foundation, PxTolerancesScale());
    if(gPhysicsSDK == NULL) {
    cerr<<"Error creating PhysX device."<<endl;
    cerr<<"Exiting..."<<endl;
    exit(1);
    } else {
    cout<<"Congratulations! PhysX setup successful"<<endl;
    }
    }

    ReplyDelete
  15. Thank you for your answer.

    Can I ask one more question about physx?
    Is there any way to model a deformable solid object using physx sdk? In the sdk's manual, it talks about rigid body and particles. So I imagined that the particles would be a way to simulate deformable objects. But when I read the related part in the manual, it just talks about debris, smoke and liquid behaviour. I checked the code snippets in the sdk. But I didn't see anything related to deformable solid objects. There is the cloth simulation but that is not what I want.

    I want something which I can simulate bending, cracking, cutting and various behaviour of an object when a certain force is applied. I know that there is Apex for fracture simulations. But it is only for Windows and I do not have an access to a windows computer with nvidia cards.

    My aim is to use the simulation engine for estimating the next state of a manipulated solid object in real life in order to track it in real-time by setting the right properties. Do you think Physx is the right way to go? If it is, can you suggest a tutorial?

    Best,
    Püren

    ReplyDelete
  16. HI,
    Unfortunately, the new version of PhysX v 3.x has stopped support of deformables. The only deformable now supported is Cloth but I dont think that will help you much as it can only model piece of cloth.

    All of the physics engine I have seen (PhysX, Bullet, Havok) are based on the position based dynamics approach so their workings are similar.

    I would suggest you take a look at PhysX v 2.8.4 which has more deformable object support with a lot of simple examples given in samples. I would also ask you to have a look at other physics engines like Bullet physics engine and Havok physics engine as well for comparison.

    ReplyDelete
  17. Thank you a lot.
    I will look into those that you suggested.

    ReplyDelete
  18. Hi, I am new to PhysX SDK. It might be stupid question but is it required to have NVIDIA GPU installed. I have 'AMD radeon R9 200'. when I installed PhysX SDK and try to run samples it was showing error "The program cannot start because nvcuda.dll is missing". how can I fix this with current GPU? and is it possible to do game development with PhysX SDK and GPU other than Nvidia?

    ReplyDelete
  19. On an NVIDIA hardware, PhysX should work both on GPU and CPU. However on AMD hardware, it should work on CPU only. The nvcuda.dll error you are getting is because you do not have an NVIDIA hardware thus the driver does not provide nvcuda.dll that is only required for PhysX on GPU. You should be able to run PhysX on CPU. To enable PhysX to use CPU, we have a setting in the NVIDIA Control Panel. I think there should be a similar setting in ATI Catalyst but I can't test this as I do not have AMD hardware.

    ReplyDelete
  20. Hey, thanks for quick reply. I'll try your suggestions and let you know. Apart from this can you tell me is there any other opensource physics engine & gaming engine other than PhysX? I want to make car crash simulator likely similar to BeamNG or GTS V game car driving. As a java programmer I used JmonkeyEngine but it has lots of missing features what is required for my project. I am open for C++ or C#. I tried to get source of 'rigsofrods' but it might not available now. I just need some guidance on which tools and what libraries I should use. I'll glad if you help me on this.

    ReplyDelete
  21. For other open source engines, there is Bullet which is awesome too. Other than these you can also look at Havok, Tokamek, Newton physics engines which are good too.

    ReplyDelete