RhinoPhysX Alpha release is here!

with 13 Comments

As the title implies, I’ve just finished the alpha release of RhinoPhysX. The goal here is to implement a nice, easy to use, physics engine in Rhino. There are of course other (very awesome) physics plugins, but none of them specialize in the standard physics simulations: rigid bodies, cloth, and particles (fluids). Fortunately, PhysX has just released version 3.3 of their SDK – which does all these things! And (new to this release) lets all the different actors in physics scene react to each other (note: there are some limitations).

A huge shout out should go to the great folks at Physxdotnet! RhinoPhysX relies heavily on their wrapper to get PhysX working nicely with RhinoCommon. I did have to make quite a few changes to Physxdotnet to get everything up and running with Physx 3.3 – and actually I think a more targeted wrapper for RhinoCommon is probably needed for future releases. However, Physxdotnet is great.

NOTE: This is an alpha release! Expect some strange crashes and weird behaviour – use at your own risk. Oh, and it’s 64 bit only. You also need the VS2012 Redistributable.

Download it here (will work until May 1, 2014)

RBodies

 

Here are some videos:

  1. RigidBodies
  2. Cloth
  3. Fluid

Features:

  • Fully integrated with the Rhino environment – simulation loop and setup is done behind the scenes.
  • Box, Sphere, and Convex rigid body simulation
  • Triangle mesh rigid static simulation.
  • Interact with the physics simulation with Kinematic actors
  • Cloth interacts with all scene geometry (note: try to avoid convex colliders and cloth interaction – it will most likely crash Rhino)
  • GPU Fluids!
  • Collision enabled Joints.

There are a ton of settings that I haven’t yet exposed with RhinoPhysx – currently, the focus is on ease of use. To install, just double click the RHP file (the little Rhino icon) after extracting.

Basic usage:

Before you can do anything else, you must initialize the physics scene:

  • rpInitialize – This will create a new scene and erase any previous simulation data.

Then, add some actors:

  • rpRigidDynamicActor – Use the collider options to select the kind of rigidbody you want (convex is the slowest).
  • rpRigidStaticActor – You can use this to add any arbitrary triangle mesh to the simulation. Please make sure the vertices are unique and welded! Also, make sure the normals are facing the right way.
  • rpClothActor – The “stiffness” setting is probably the most interesting.
  • rpFluidActor – Select a box to defined where the fluid emits from. The settings are a bit delicate – the most important being the rest distance. Make sure it is something reasonable.
  • rpJoint – Select two or more rigid bodies to create a joint. Setting these up is a bit tricky, so they might not work as expect in this release.
  • rpRemoveActor – Select some actors to remove.

Then, start simulating:

  • rpSimulate – starts the simulation
  • Esc” will pause/unpause the simulation

If you want to start over, use just call rpInitialize again. You can also interact with the rigid bodies of the scene:

  • rpInteract – click and drag on a rigid body (only rigid bodies work!) to move it around. Hit Esc to leave this mode.

 

 

 

13 Responses

  1. Steven
    | Reply

    I’m having a bit of trouble installing the plugin. Could you provide instructions on installing RhinoPhysx?

    • Steven
      | Reply

      Here’s what Rhino says when I try to load it:

      Could not load file or assembly ‘PhysX.Net.dll’ or one of its dependencies. The specified module could not be found.Unable to load plug-in C:\Program Files (x86)\Rhinoceros 5\Plug-ins\RhinoPhysX\RhinoPhysx.rhp

      Note: I’m running Rhino 5.

      • danhambleton
        | Reply

        Hi Steven,

        RhinoPhysX is 64 bit only. From the looks of it, you are loading it from Rhino 32 bit. Try right clicking it and making sure that it loads with Rhino 64 bit. Also, don’t move the RHP out of the RhinoPhysX (unzipped) folder. It depends on having those files there.

        Hopefully that works :)

  2. simonin
    | Reply

    Dear Daniel,

    I have similar issues than Steven, but I work on Rhino 5.0 SR8 64bits, and put all files into: C:\Program Files\Rhinoceros 5.0 (64-bit)\Plug-ins\RhinoPhysX…

    Always the same error at loading of RhinoPhysx.rhp:
    Could not load file or assembly ‘PhysX.Net.dll’ or one of its dependencies. The specified module could not be found.

    Could you have any ideas to solve this problem?…

    Regards

    • danhambleton
      | Reply

      Strange. Are any of the dlls blocked? If you right click PhysX.Net dll, go to properties, can you uncheck the “blocked” box?

      • Luis
        | Reply

        Daniel, there are no dlls blocked, it seem like the .rhp can´t initialize the installation process…

        Thanks for your quick response!

        Luis

      • danhambleton
        | Reply

        K, just did some tests and there is something strange going on (I also got the DLL dependency not found error message). It wasn’t there before, promise!

        I’ll post some more info asap.

  3. Luis
    | Reply

    Daniel,
    Why I can’t install the rhinophysx plugin, the popup rhino window say that can’t find the PhysX.Net.dll and the others dependencies.
    Thanks!

    • danhambleton
      | Reply

      Hi all,
      I’ve made a couple adjustments to the release. Try this new build (same link as before) and follow the instructions on the download page. You will need the VS2012 Redistributable package.

  4. young
    | Reply

    hi i am testing the plug in. i am using multiple brep geometry made of trimmed surfaced then join, and turned into closed mesh.

    when i make them rpstaticdynamic, upon simulation they are flying away from each other like they are exploding. they are modules i designed with the concept of topological interlocking.

    when i make them rpcloth, the mesh faces all explode and everything comes down like a house of cards. as they do, rhino crashes.

    whats the mesh geometry type to work with physix? what the best way to prepare geometry for physix? and when geometries are close to each other, should they have some gaps other wise they will repell each other with a lot of force?

    • danhambleton
      | Reply

      Hi there,

      Can you post a file? I’ll take a look. Note that the current release is pretty fussy with the quality of the meshes. Vertices must be unique and welded, normals must be unified, etc. I’d like to incorporate some internal checks for this sort of thing, but for now it’s all up to the user.

  5. Ufuk Bircan Özkan
    | Reply

    Hi,
    I installed the plugin -i guess- successfully. I run the rpRigidDynamic command, but I can’t select any object on the scene. Same applies to rpRigidStatic. I don’t know how to start using the plugin.
    Any solution?

    • danhambleton
      | Reply

      Hi there,

      RhinoPhysics only works with meshes for now. Also, you need to make sure that those meshes are “healthy” – no doubled vertices, unified normals, etc. In the next release, I will make sure this process is hidden from the user, but for now, you have to explicity create the meshes.

      This person made some great tutorial videos.

Leave a Reply