Archive for January 18th, 2017

PhysX: articulated vehicle in PEEL 1.1

Wednesday, January 18th, 2017

This video is a variation on a test scene I previously posted. This is now a configurable test in PEEL 1.1.

The chassis, wheels and axles have relatively large mass ratio differences (40 to 1), which makes things difficult for the iterative solver.

However, as explained in the previous video, using an articulation solves the problem. This is what you see in the beginning of this new video: the vehicle uses an articulation, and everything behaves as expected.

This also shows that articulations can emulate hinge joints just fine, by just setting the joints’ limits properly. There are for example 5 articulated hinges in this simple vehicle.

Now if you disable articulations in the UI and restart the scene, it gets created with regular PhysX joints. And as you can see, the results are not as convincing. Out-of-the-box, it behaves badly (it’s easy to bend the wheels, etc).

But there are still various ways to improve things.

First, you could just use more homogeneous masses. It may not be ‘realistic’ but if it doesn’t actually change the driving experience in the game, it doesn’t really matter. In the video I just set all masses to 1.0 to show that things look more stable & robust that way, i.e. the mass difference is really what breaks this particular setup. It does not have to be 1.0: things become equally stable if you use ‘mass = 40′ for everything.

Now, if you don’t want to change the masses, the usual tricks can be used. Here I just show one of them: create the constraints multiple times. In the video I show what happens if you create them 8 times: while not becoming as robust as articulations, the joints still become visibly more robust.

You could also create them more than 8 times, or increase the solver iteration counts for the vehicle, and so on. Basically there are multiple ways to make such a scene work fine.

PEEL 1.1

Wednesday, January 18th, 2017

PEEL 1.1 has been released. You can grab it here:

https://github.com/Pierre-Terdiman/PEEL

Here’s a copy of the release notes:

* January 2017: v1.1 - the PhysX 3.4 issue.

This new version celebrates the official release of PhysX 3.4 and its built-in support for GPU rigid bodies. There is now a “Use GPU” checkbox in the PhysX 3.4’s options panel. Just check that box to run the scenes on the GPU. It uses CUDA, so you need an Nvidia graphics card for this to work - and a recent one for good performance. Otherwise the regular CPU version is of course still the default, and it runs everywhere.

Many changes have been made over the last two years. Some of them are listed below:

PEEL app:

  • implemented smoother camera motion (when using cursor keys).
  • added support for prismatic joint limits.
  • added support for distance joints (only exposed in PhysX so far).
  • added support for cylinder shapes.
  • added support for articulations (PhysX).
  • added support for aggregates (PhysX). This improves performance of ragdoll scenes quite a bit.
  • added initial/experimental support for vehicles.
  • various test scenes have been added or revisited.
  • introduced support for configurable tests (per-test UI dialog). As a result, some similar-looking tests have been merged together.
  • added tool-specific UI to edit tool-specific parameters. For example the picking force can now be modified in the main UI.
  • added camera tracking tool.
  • added support for per-test keyboard controls etc.
  • improved wireframe overlay rendering (’X’ key). Now enabled by default.
  • new Pint caps have been added, as well as comments explaining their role better.
  • new test categories have been added.
  • tests can now access the font renderer to draw some debug text on screen. See for example the “AngularVelocity” test in the API category.
  • tests can now access the debug renderer to draw some debug data on screen. See for example the “COMLocalOffset” test in the API category.
  • replaced “ComputeWorldRay” with its ICE counterpart to fix some accuracy & performance issues in the raytracing test. The raytracing test became an order of magnitude faster after that.

Stats plugin:

  • now displays gravity vector.
  • added support for articulations & aggregates.

Bullet:

  • added new PINT plugin for “Bullet3-2.85.1″ (from Oct 15, 2016).
  • Bullet3-2.85.1: exposed more solver settings to the UI for this version. I also set the default “erp” value to 0.8 for this plugin, which improves the behavior a lot in jointed scenes like for example FixedJointsTorusStressTest. In previous Bullet plugins however I kept Bullet’s own default value (0.2) because increasing it to 0.8 creates “dancing stacks” (see e.g. LargeBoxStack30).
  • Bullet3-2.85.1: for this version I used 4 solver iterations by default, since this is what PEEL also uses for other physics engines. It should then be a little bit faster than before, since we used 5 iterations by default in the previous Bullet plugins (2.79 to 2.82). However I noticed that Bullet’s own default value is now 10 iterations. Not sure if this is really necessary. Play with the settings until you find a good compromise.
  • constraints are now properly released.
  • collision margin has been reduced. That way the ConvexStack2 test doesn’t explode anymore.
  • support for cylinders has been added.

Newton:

  • Newton’s PINT plugin has been revisited by Julio Jerez.
  • sleeping can now be deactivated (except in 3.14).
  • the per-test gravity vector is now taken into account (it was previously ignored).
  • we can now use Newton 3.9 and 3.13 at the same time: I just switched to static libs for 3.13.
  • the 3.13 libraries have been updated. It is now using the stable version from Jun 17, 2015.
  • added new PINT plugin for Newton 3.12 (from May 24, 2015).
  • added new PINT plugin for Newton 3.14 (trunk from Jan 3, 2017).

Havok:

  • better tracking of memory usage.
  • started to share code between all Havok plugins.
  • exposed more parameters to UI.
  • initial (incomplete) support for “articulations”. Currently disabled because it crashes in some scenes.
  • support for cylinders has been added.
  • support for kinematics has been enabled in old versions of Havok.
  • free versions of Havok are not available anymore (see https://www.havok.com/pcxs_redirect/) so I will not be able to add and test newer versions in PEEL.

PhysX 3.x:

  • the UI has been unified for all 3.x PINT plugins except 3.1.
  • new parameters have been exposed to the UI.
  • default contact offset value has been increased (decreasing performance here and there but otherwise increasing stability).
  • max angular velocity has been properly setup to a higher value in all PhysX plugins. The default value in PhysX is quite small, which makes some tests fail and perhaps give the wrong impressions.
  • added some quick preconfigured settings to tweak PhysX for either performance or accuracy.
  • the PhysX allocator (on the PINT side) is now thread-safe.

PhysX 3.4:

  • the PCM regression (in PEEL 1.01) has been fixed.
  • the overlap/sweep performance regressions (in PEEL 1.01) have been fixed.
  • the 3.4 architecture has changed significantly since the PEEL 1.01 version, to make the code compatible with GPU rigid bodies.
shopfr.org cialis