Nvidia FLEX , GPU based multi domain solver

Couldn’t find a thread when searched.
Could also not find a official homepage for it to check out the license and stuff like, can it be used to bake sims to disk.
Anyway it looks impressive already and has many of the simulations I would use, rigid, soft, fluid, particles.

Anyone focused on real-time physics? would be cool if a developer is interested in it. And maybe fork Blender repo and try to integrate it. Like you select FLEX for physics and Blender uses it. Just dreaming. But if there is, I would contribute donation, time to make art and maybe help getting a funding going for it.

Since it’s from a vendor it’s probably never gonna replace the default physics in Blender but would be neat to have it as an option. Especially since it runs @60 fps. For smaller VFX jobs it would be just such a killer feature to enable.

The PhysX engine and SDK are available for Microsoft Windows, Mac OS X, Linux, PlayStation 3,[SUP][3][/SUP][SUP][4][/SUP] Xbox 360[SUP][5][/SUP] and the Wii.[SUP][6][/SUP] The PhysX SDK is provided to developers for free for both commercial and non-commercial use on Windows. For Linux, OS X and Android platforms the PhysX SDK is free for educational and non-commercial use.[SUP][7][/SUP]

this is old engine, bro watch the new 2014 conf… they made totaly new physics engine

I think it is extremely unlikely to be under a license that the GPL would allow Blender to use.

Got a link for that?

made a new? here’s from the blog post.

When FLEX is integrated into PhysX 3.4

Afaik physX is up at version 3.3 so maybe for next version.

1:20… and R&H is history…

R&H still exists though…

Also, impressive, but they weren’t fooling anyone saying that real time scene was ANYWHERE close to the shot from the movie.

yeah I saw that video, I think it’s PhysX where FLEX is being merged into.
@m9105826 yeah, the RT with the whale? I was not so impressed by the look of that. those particles and waves. :S
but the smoke/fluid particles where amazing later on.

Found interesting quotes from one of the developer behind FLEX.

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.

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

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.

So… just wow!. Wooooow, what it is, is actually pretty awesome. As I see it, it could be almost like Cycles but for Physics, if you have a GPU that can handle it, you can run it on GPU and if you don’t you can use CPU in the future if they do a CPU implementation.

I guess FLEX is pretty nice but tieing up Blender to Nvidia even further would not be such a good idea in my opinion. We are already depending on CUDA for GPU rendering in Cycles, it would not be good to also be dependant on FLEX for physics simulations.

it would not be good to also be dependant on FLEX for physics simulations.

because? what

Well what is neat with Cycles is that is has a implementation for everything, C for CPU, CUDA for nvidia, OpenCL for any vendor using it. AFAIK OpenCL on nvidia worked, but OpenCL on AMD cards mainly doesn’t work because of the vendor.

This could be the same thing with Flex. but one major thing that will never have it merged with blender source is that it’s never ever gonna be open sourced, at least I think.

But it could be a addon, plugin or custom build of Blender.

It couldn’t, the GPL won’t allow that - it would require you to include or offer the source code for everything required to build it, and you probably won’t be able to distribute the source code for FLEX. At best, it could be a separate application launched by Blender with communication via TCP sockets (like Octane).

Alright, might be waste of time trying to implement it in Blender, besides Bullet is almost all in Blender by now, and reading their forums it seems GPU OpenCL (rigid bodies only sofar) is in current versions 2.8X and planned for the longly awaited 3.X release.

Only thing I haven’t seen in Bullet yet is a fluid solver. Rest is in there, Rigid/Soft/Cloth.

Flex is still a massive improvement over Blender’s physics, even 7 years later. Would be great to get it in.

Mantaflow in version 3 gets a speed boost at least.
rB5a02d0da7a88 (blender.org)

Simulations will run up to 50 percent faster due to better utilization of CPU cores, though I am not sure how much room the devs. have for optimization without resorting to GPU code.

1 Like

Mantaflow seems to have pretty decent CPU utilization when I use it to create simulations. This new patch is definitely a welcome step, however I do hope that BF considers supporting proper GPU utilization for MF.

Was this patch submitted in time for 3.0?