:: Back to news index ::

Introducing NVIDIA FLEX: unified GPU PhysX solver

with 8 comments

About a month ago, NVIDIA has revealed a new unified GPU accelerated physics framework – NVIDIA FLEX – at “The Way It’s Meant To Be Played” press event in Montreal.

Today, Miles Macklin, physics programmer at NVIDIA and lead-developer of the FLEX system, has joined us to share first-hand details about this exciting technology. So what is the NVIDIA FLEX exactly ? What are the main features of FLEX ?

Miles Macklin: FLEX is a multi-physics solver for visual effects.

It grew out of the work I did on Position Based Fluids, which was later extended to support two-way coupling between liquids and different object types such as clothing and rigid bodies.

The feature set is largely inspired by tools like Maya’s nCloth and Softimage’s Lagoa. The goal is to bring the capabilities of these off-line applications to real-time games.

The types of materials that FLEX is designed to simulate are:

  • Liquids (water, goo)
  • Granular materials (sand, dirt)
  • Environmental cloth (flags, newspapers)
  • Rigid bodies (environmental debris)
  • Soft bodies (inflatables / tetrahedral meshes)

The solver uses a unified representation for all these material types, which means they can interact with each other in a fully coupled way.

However this unified representation also comes with some limitations. It wouldn’t, for instance, be suitable to use for a character controller, or ray-casts. Those would still be better suited to a traditional rigid body physics engine. Is collision detection in FLEX re-using some of the PhysX SDK algorithms, or is it completely new pipeline?

Miles Macklin: It is a separate solver and does not share the collision detection pipeline with PhysX.

That means you can use FLEX by itself (independent of PhysX) but need to manually mirror collision objects into FLEX for them to interact. FLEX supports most standard collision primitives to make this easy.

When FLEX is integrated into PhysX 3.4, manual mirroring will not be required. Will FLEX support cross-PhysX SDK and/or APEX interactions? For example, can FLEX liquid crush a destructible asset?

Miles Macklin: Two-way coupling between different materials works best when they are all part of the same solver, but in theory you could use a FLEX liquid to affect a traditional destruction asset with some code to arbitrate between the two. Are the authoring tools planned for FLEX? Is it going to support LOD and scalability features, similar to APEX?

Miles Macklin: It is likely that we will build authoring tools into at least one major game engine. I expect higher-level features like LOD will be built on-top of the core solver library. Is FLEX purely GPU accelerated library, or will it support CPU execution? Is it plausible to see FLEX ported to OpenCL or DirectCompute?

Miles Macklin: Right now we have a CUDA implementation and a DirectCompute implementation is planned. We are considering a CPU implementation.

I have also built FLEX for Linux (Ubuntu 12.04 64bit) and it works great, in some cases it is faster than Windows. Are you planning to release FLEX for third-party developers? Is it going to be included in PhysX SDK or APEX package, or available as stand-alone SDK?

Miles Macklin: It will be initially available as a stand-alone SDK that can be used alongside PhysX 3.3.x for a select group of early adopters, and later FLEX will become a first-class feature of PhysX 3.4.

I often say that FLEX is a low-level library because the core solver interface is very minimal (a single C header file). So users who want just the solver can embed that into their applications and build tools on top of it, or they can use the tools we develop inside of PhysX / APEX. What future have you prepared for FLEX – computer games or computer graphics?

Miles Macklin: Initially we’ll see FLEX in games, but I am particularly interested to see if we can apply it in offline graphics as well.

To date, NVIDIA FLEX looks like a huge leap for GPU accelerated physics, but will it gain enough momentum to become really popular? Time will tell.

Written by Zogrim

November 12th, 2013 at 11:08 pm

8 Responses to 'Introducing NVIDIA FLEX: unified GPU PhysX solver'

Subscribe to comments with RSS

  1. Hi Zogrim, thanks for article. Im really looking forward to see flex in games.

    btw: Are you planning to make some “physx in batman origins” video? Maybe now with shadowplay it might be easier for you? I really like the smoke from shock gloves and the smoke during first bossfight reacting to helicopter (from video, i have really crappy pc right now).




    13 Nov 13 at 2:01 am

  2. So NV planned to use DirectCompute for Flex? Thats interesting. It will be interesting to compare releases of CUDA and DC performance.




    13 Nov 13 at 12:46 pm

  3. Vojtech: Maybe now with shadowplay it might be easier for you?

    I had no problems with FRAPS recoding before, but now I have certain difficulties with free time, needed to produce a video with appropriate quality.

    But Arkham Origins video is in plans :)




    13 Nov 13 at 2:11 pm

  4. Great article and video. Good line of questions.

    (by the way, the phrase for “up until now” is “to date” rather than “to the date” – not sure if that was a typo or translation subtlety :)




    14 Nov 13 at 11:37 am

  5. Looking forward to see it inplemented in 3ds Max
    future release, as Physx 3.* feature.
    Hoping that will happen.



    Luiz Eduardo Mihich

    18 Nov 13 at 7:45 pm

  6. What solver do you use for rigid and soft bodies? Are they also based on position-based dynamics?




    1 May 14 at 1:26 am

  7. will Flex sdk beta be available through gameworks?



    Tom Smith

    24 Sep 14 at 5:55 am

  8. Tom Smith:
    will Flex sdk beta be available through gameworks?

    Not very soon) In late 2015




    25 Sep 14 at 3:04 pm

Leave a Reply

Refresh Image
Copyright © 2009-2014. | About project | Privacy Policy
PhysX is trademark of NVIDIA Corporation