NVIDIA FleX 1.1.0 released

We are pleased to announce the release of FleX 1.1.0, available immediately to all registered NVIDIA developers. FleX 1.1.0 is the largest update to FleX since its initial release, and this post will cover a few of the most notable new features.

To get started, the latest release package is available from the developer zone here.

New Direct3D 11/12 support

To better serve the game development community we now offer Direct3D 11/12 implementations of the FleX solver in addition to our existing CUDA solver. This allows FleX to run across vendors on all D3D11 class GPUs. Direct3D gives great performance across a wide range of devices and supports the full FleX feature set.

Using Direct3D simply requires linking against the D3D simulation libraries. FleX can run directly on a game’s existing Direct3D device and render context by passing them to NvFlexInit().

GDC 17 Presentation

Session Description: Particles have many uses, from low to high complexity: non-colliding sparks, shell casings colliding against the ground, particle-particle collision for rigid debris, particle grids for cloth, up to fluid dynamics. Now that Async Compute allows us to utilize otherwise wasted GPU cycles, it is attractive to move more of these effects to D3D Compute.

New collision shape API

It is now easier to specify collision shapes to FleX. We've overhauled the API to better match PhysX by adding native support for box primitives, convex mesh instancing, non-uniform scale, and reducing the amount of data developers need to specify. See NvFlexSetShapes() for details.

In addition, FleX will now interpolate transforms for moving convex shapes and find the approximate time of impact. This improves robustness for particles colliding against fast moving character collision shapes.

New local-space simulation

In games it is common for objects or characters to move in non-physical ways, e.g.: fast player turns, or large animated accelerations. Coupling physical simulation with these objects is a challenge for real-time solvers because of the large constraint errors these movements can introduce.

In FleX 1.1 we have introduced a new “moving frame” API that allows simulating FleX particles in the local space of an attached accelerating rigid frame, e.g.: a character’s root bone transform. The inertial forces from this frame's movement can then be added in a controlled fashion that limits the effect of non-physical movements. See the NvFlexExtMovingFrame API for details.

New UE4.14 integration

We have updated the FleX UE4 integration to UE4.14.3 and included our Direct3D solver as the default (CUDA can still be enabled through build configurations). If you are a registered Unreal developer you can find the Github repository
here.

(Note that you must be logged in to view this page)

We’ve added new test maps for level-streaming, collision against landscape components, local-space simulation, and more. UE4.15 support will follow shortly.

New buffer-centric API

Supporting Direct3D has required some re-architecting of the core FleX API. Data provided to FleX must now be provided through a buffer object similar to the concept of a Direct3D buffer. This allows FleX to make sure data is sent to the GPU as efficiently as possible, and ensures that synchronization is performed correctly. See NvFlexAllocBuffer() for details on how to manage buffers.

Release Notes

New API style, for consistency with other products the API has now an NvFlex prefix and follows a naming convention similar to PhysX

Add support for DirectX, in addition to CUDA there is now a cross platform DirectX 11 and 12 version of the FleX libraries that Windows applications can link against

Add support for max acceleration clamping, see NvFlexParams::maxAcceleration, can be useful to reduce popping with fast moving kinematic shapes and large interpenetration

Add support to querying compute device, see NvFlexGetDeviceName()

Add support for flushing compute queue, see NvFlexFlush()

Add support for multiple library instances, NvFlexInit() now returns a library which is bound to a single compute device

Add support for local space particle simulation, see NvFlexExtMovingFrameInit() and two new local space fluid and cloth demos

Add support for CUDA 8.0.44

Remove NvFlexError enum, errors will be reported through the NvFlexErrorCallback passed to NvFlexInit()

Remove NvFlexMemory enum, users should use the new NvFlexBufferType

Fix bug in inflatable constraint solver that could cause some shapes to generate NaNs