User Tag List

Page 1 of 2 12 LastLast
Results 1 to 40 of 50

Thread: Physics Forests - A New Real-time Fluid Solver

Hybrid View

  1. #1
    9
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17

    Physics Forests - A New Real-time Fluid Solver

    We are developing a new fluid solver using machine learning, capable of simulation large simulations (for foam-less fluid ~10 million, with foam a bit less) with surface generation, rigid body coupling, multi-phase and rendering in real-time. The quality-running time trade-off is controllable.

    SIGGRAPH Real-time Live submission video (improved quality):


    Old simulations here:





    The method is perfectly stable in any circumstances, including when the incompressibility constraint can not be fully satisfied (non-simulated objects squash the water etc).

    We developed the alpha version of a plugin for UE4, mainly for designing purposes, but if there is any interest in the game development community, we can work on it a bit more to make it releasable. Based on my knowledge, a typical games give only several milliseconds per frame to a physics engine, and mostly only on CPU. We haven't optimized our method much (it's simply a basic vanilla implementation), so there is a large space for improvement (my guess is that 5x should be achievable). Also several approximations (height map and low precision/skip calculations outside of the region of interest) are possible, however 3ms on CPU with current hardware seems out of reach.

    If anyone's interested in our project, or is able to provide us some example scenario from UE4 with a lot of water, so that we can optimize an algorithm for a particular scenario, please send me a message or write a comment below.
    Last edited by lubor_; 05-26-2017 at 11:02 AM.

  2. #2
    0
    It looks great but I want some actual performance numbers. Because everything beautiful costs a lot.

  3. #3
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    All videos are actual real-time recordings with NVIDIA ShadowPlay. The number of fluid particles, foam particles and per frame running time in shown in each video at the bottom.

    In the fastest setting:
    1. 10M particles run in real-time
    2. foam decreases the performance by maybe 20-30%
    3. multiple fluids are a bit slower (we improved by maybe 30% since we recorded that video)
    4. particle rendering (sand) is slower than surface (water), dust(rendered as smoke) rendering is much slower
    5. rigid bodies are not optimized yet and for example in the last duck video they take ~10ms per frame

    All videos were recorded on TitanX, some of them run faster than the other, because we used different setting.

  4. #4
    0
    Cool I'll keep an eye on this.

  5. #5
    0
    Promoter
    Join Date
    Oct 2015
    Posts
    233
    This is incredible. One step closer to real-time fluid simulations in games. I could think of a hundreds of possible game ideas with this. But the problem I would see is unpredictability. Which is nice of course, but it could be hard to make "fair" games with this as there are so many variables to factor in. But some basic physic based games could be very fun. Maybe even like a waterslide game or wild river game where you have to avoid obstacles and such. But then you'd have to add something that only fluid simulations can give, because otherwise it's a bit overkill. xD


  6. #6
    0
    Quote Originally Posted by lubor_ View Post
    We are developing a new fluid solver using machine learning, capable of simulation large simulations (for foam-less fluid ~10 million, with foam a bit less) with surface generation, rigid body coupling, multi-phase and rendering in real-time. The quality-running time trade-off is controllable.
    It looks really awesome, could you show how it looks like with a quite low res so that the performance impact is only something like 3 ms? Does it scale linearly with the particle amount, so will 100 times less particles run 100 times faster? In games you often don't need super high accuracy.

    Quote Originally Posted by lubor_ View Post
    Based on my knowledge, a typical games give only several milliseconds per frame to a physics engine, and mostly only on CPU. We haven't optimized our method much (it's simply a basic vanilla implementation), so there is a large space for improvement (my guess is that 5x should be achievable). Also several approximations (height map and low precision/skip calculations outside of the region of interest) are possible, however 3ms on CPU with current hardware seems out of reach.
    Why do you mention the CPU here? Isn't the fluid sim only heavy on the GPU?

    Also, you mention CUDA, if you want this to be usable in games you should make it use OpenCL, direct compute or vulkan compute so that it runs on AMD and Intel GPUs too, for now direct compute is probably the best.

  7. #7
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by John Alcatraz View Post
    Does it scale linearly with the particle amount, so will 100 times less particles run 100 times faster? In games you often don't need super high accuracy.
    In practice the behavior is close to linear in a range 10k-100M. (at ~120M we run out of 8GB GPU memory). It is slightly sublinear up to 1M particles, and slightly superlinear from 5M. So if particles were twice the size in every dimension, it would be approx 8x faster and might fit into those 3ms.

    Quote Originally Posted by John Alcatraz View Post
    Why do you mention the CPU here? Isn't the fluid sim only heavy on the GPU?
    Typically physics library (Havok for example) runs only on CPU. Getting GPU computing power in AAA games except for rendering might be impossible. I hope this will change in the future

    Quote Originally Posted by John Alcatraz View Post
    Also, you mention CUDA, if you want this to be usable in games you should make it use OpenCL, direct compute or vulkan compute so that it runs on AMD and Intel GPUs too, for now direct compute is probably the best.
    We have an OpenCL version too (which was our original implementation), we switched due to better debugging tools for CUDA. We will consider other platform after we progress a bit further with the development.
    Last edited by lubor_; 04-06-2017 at 09:15 PM.

  8. #8
    0
    Quote Originally Posted by lubor_ View Post
    In theory it scale linearly, in practice the behavior is close to linear in a range 10k-100M. (at ~120M we run out of 8GB GPU memory). So if particles were twice the size in every dimension, it would be approx 8x faster and might fit into those 3ms.
    That sounds nice.

    Quote Originally Posted by lubor_ View Post
    Typically physics library (Havok for example) runs only on CPU. Getting GPU computing power in AAA games except for rendering might be impossible. I hope this will change in the future
    I don't quite follow your here. As you said below the fluid sim can run either on CUDA or on OpenCL, which is both GPU. So if you run this, then it will take GPU time, not CPU time. You are saying "Getting GPU computing power [...] might be impossible", but its exactly what you are doing as far as I can tell, so it doesn't make any sense to me what you say here?

    Quote Originally Posted by lubor_ View Post
    We have an OpenCL version too (which was our original implementation), we switched due to better debugging tools for CUDA. We will consider other platform after we progress a bit further with the development.
    Great!

  9. #9
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by John Alcatraz View Post
    You are saying "Getting GPU computing power [...] might be impossible", but its exactly what you are doing as far as I can tell, so it doesn't make any sense to me what you say here?
    Yes, you are right. I should have skipped all that nonsense. I just wanted to say there is no way we get it working in 3ms on this scale on CPU (we had such offers).

  10. #10
    0
    Quote Originally Posted by lubor_ View Post
    Yes, you are right. I should have skipped all that nonsense. I just wanted to say there is no way we get it working in 3ms on this scale on CPU (we had such offers).
    I would think that everyone knows that doing this in 3 ms on a CPU is absolutely not possible

    You say you might be able to make it 5 times faster, if you then double the particle size and that makes it 8 times faster, then that means its 40 times faster. That means all of your demos would run at way less or slightly above 1 ms, which would be super fine in a game. Now these numbers are Titan X, so something like 2 or 3 ms on a 970 is still great.

    If it really works out like that, I definitely see this being used a lot. Sounds a bit too good to be true though actually

  11. #11
    0
    Saw the papers on this last year(ish?) very cool to see it just brought to a plugin and etc.! I'm curious, what's the deployment of the neural network like in terms of inference bit depth? Can you go through the built trees in 8bit like I've seen others?
    Last edited by Frenetic Pony; 04-06-2017 at 10:16 PM.

  12. #12
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by Frenetic Pony View Post
    I'm curious, what's the deployment of the neural network like in terms of inference bit depth? Can you go through the built trees in 8bit like I've seen others?
    we don't use NN, we use our own variant of regression forests with max depth 20

  13. #13
    0
    Supporter
    Join Date
    Jun 2015
    Posts
    1
    That simulation looks amazing!
    As for interest in the game development community, here are a bunch of things that would be cool to have:
    1. Blueprints integration. Would be kinda cool to be able to attach fluid emitter to movable BP actor, be it a weapon or just a fluid container.
    2. Flooding simulation and water resistance. I work on game with underwater vehicles in it, and I had to simulate underwater movement by making a 6-axis zero gravity vehicle. One hell of workaround that requires a lot of additional parameters to look right. The very fact that you have a working buoyancy already makes me happy, but it would be even more cool if it would be possible to tweak buoyant actor sinking, ideally with visual flooding inside the mesh or without it by just tweaking parameters.
    3. Wave generator.
    4. Ability to make unlimited distance water pool with blueprint actor.
    5. Cut out zones in fluid surface for objects/landscape placement
    Will keep an eye on this thread, in current state imo this simulation looks better than the vast majority of currently existing solutions. I know it is probably a bit too early to ask, but I assume you targeting unreal marketplace with this thing, so I would like to know about theoretical pricing for final version.
    Anyway, keep up the good work, this is just incredible.

  14. #14
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by Raindance View Post
    1. Blueprints integration. Would be kinda cool to be able to attach fluid emitter to movable BP actor, be it a weapon or just a fluid container.
    We started implementing unreal plugin only ~2 weeks ago, so far we are able to visualize the result, but the simulation is defined outside of unreal. We plan to do a full integration within a few weeks. Attaching the source to a movable BP actor should not be a problem; from the simulation point of view it is the same as in that teddy bear video, where we controlled the emitter by the mouse.
    Quote Originally Posted by Raindance View Post
    2. Flooding simulation and water resistance. I work on game with underwater vehicles in it, and I had to simulate underwater movement by making a 6-axis zero gravity vehicle. One hell of workaround that requires a lot of additional parameters to look right. The very fact that you have a working buoyancy already makes me happy, but it would be even more cool if it would be possible to tweak buoyant actor sinking, ideally with visual flooding inside the mesh or without it by just tweaking parameters.
    It should be already possible, all these tweaking parameters are already there.
    Quote Originally Posted by Raindance View Post
    3. Wave generator.
    that should be possible with a small additional external force (slight modification to what was used in the last dust video in "various materials")
    Quote Originally Posted by Raindance View Post
    4. Ability to make unlimited distance water pool with blueprint actor.
    I don't fully understand this request. Unlimited simulation would be possible only if we simulate the water only in some region of interest and elsewhere it would be governed by a wave equations. We plan to work on various approximation methods like this in the near future.
    Quote Originally Posted by Raindance View Post
    5. Cut out zones in fluid surface for objects/landscape placement
    That can be already done and it was used for example in the sandcastle scene.
    Quote Originally Posted by Raindance View Post
    I know it is probably a bit too early to ask, but I assume you targeting unreal marketplace with this thing, so I would like to know about theoretical pricing for final version.
    It is a bit too early, it will depend on the interest and on what will our plugin eventually include. We also work on a few other applications of our method (so far in the released videos both acceleration prediction and surface generation are done using machine learning), we will release videos when we are happy with the quality.

  15. #15
    0
    Quote Originally Posted by Raindance View Post
    in current state imo this simulation looks better than the vast majority of currently existing solutions. I know it is probably a bit too early to ask, but I assume you targeting unreal marketplace with this thing, so I would like to know about theoretical pricing for final version.
    If they get this to a state where its usable in many games, I would definitely advise against putting it on the marketplace. They should go the more common middleware way of doing custom licensing, with options for indies and for AAA. There would definitely be big companies interested in this, and those are willing to pay a lot more than indies.

    I would suggest doing it like InstaLOD does: http://www.instalod.io

    An indie version for something like $79 and custom licensing for bigger companies

  16. #16
    0
    Looks like some Houdini type sims... Very nice!

    teak
    "A little bit of nonsense now and then is cherished by the wisest men..."
    -- Willy Wonka

    twitter: @teak421 -- Smooth Zoom Camera Plugin for 4.14+: here.
    Source Build with Optional Plugin Tutorial: here.

  17. #17
    0
    Infiltrator
    Join Date
    Mar 2014
    Posts
    20
    I can see this being very useful for making offline simulated assets, like realistic looking riverbeds with pre-simulated water flow.

    Although Real-time fluid simulation in AAA titles might be a few years out in terms of hardware, having a user-friendly way to create water flows & structures that have been baked for placement in static worlds would have a variety of applications and presumably be vastly more performant than a real time simulation.

  18. #18
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by JonTerp View Post
    Although Real-time fluid simulation in AAA titles might be a few years out in terms of hardware, having a user-friendly way to create water flows & structures that have been baked for placement in static worlds would have a variety of applications and presumably be vastly more performant than a real time simulation.
    The technology development is in a very early stage and so far we just tried to figure out the right setting, such that the simulation looks reasonable, can handle interactions (so far rigid bodies, but in principle the method can be similarly combined with other kinds of objects) and can generate surface. I'm aware that the technology is not practically useful yet as it is, but there is a large space for improvement not only by raw optimization of the GPU code, but also by simulating a different level of details depending on the distance from the camera (either using height map, wave equations for ocean, varying sized particles, ..) . All these tricks would cause stability problems in our methods, but our regressor would be just fine with that. Basically, it should be possible to run arbitrary large scene with only 1M predictions per frame. But all the tweaking and optimization will take some time.

    The main reason we advertised our method was to get some feed-back from the people from the field, and potentially get some assets/designed scenes to tune all these LOD hacks (so far that doesn't seem that easy). It might be too early for our method even after we do all the things we plan, but I just case how this would be the case in 5 years.

  19. #19
    0
    Quote Originally Posted by lubor_ View Post

    If anyone's interested in our project, or is able to provide us some example scenario from UE4 with a lot of water, so that we can optimize an algorithm for a particular scenario, please send me a message or write a comment below.
    an ocean.

    a mountain river coming down to plains where it starts meandering.

    water and sand interaction

    just to mention 3 things i would use this for. If i could.

  20. #20
    0
    really impressive, especially the video mixing water and sand.
    nice job, i 'm keeping an eye on it

  21. #21
    0
    I saw this tread from last streaming.
    Looks very amazing. Just curious how much fast it can render it.

  22. #22
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by MeepMeep View Post
    Just curious how much fast it can render it.
    all fluids except sand are rendered at a mesh, so the rendering is way faster than for example in FLEX
    sand (or any non-transparent particles) can be also rendered quite fast because we can skip large majority based on signed distance, which is calculated anyway
    foam is rendered at circular sprites (same as in other systems) so if you zoom too much, it might get a bit slower

    edit: hard to quantify exactly, but it was about ~1-4ms in all those simulations (except that "dust" video)
    it's already included in the time shown
    Last edited by lubor_; 04-09-2017 at 04:33 PM.

  23. #23
    0
    Must run < 10ms on 5 years old hardware then someone is going to find some uses for this in games.

  24. #24
    0
    Quote Originally Posted by BrUnO XaVIeR View Post
    Must run < 10ms on 5 years old hardware then someone is going to find some uses for this in games.
    I wouldn't say that, 2 ms on 2 year old hardware sounds better. It doesn't need to run at all on 5 years old hardware.

    I would want to use this in VR, and there no one has older hardware. The worst GPU this would have to run on is a GTX 970. As long as its possible to adjust how expensive it is, maybe by setting simulation accuracy or just giving people with a GTX 970 thicker fluids (bigger particles) than people with a 1080, its completely fine

  25. #25
    0
    Quote Originally Posted by John Alcatraz View Post
    I wouldn't say that, 2 ms on 2 year old hardware sounds better. It doesn't need to run at all on 5 years old hardware.

    I would want to use this in VR, and there no one has older hardware. The worst GPU this would have to run on is a GTX 970. As long as its possible to adjust how expensive it is, maybe by setting simulation accuracy or just giving people with a GTX 970 thicker fluids (bigger particles) than people with a 1080, its completely fine
    By the time the game ships a 970 gonna be ~5 years old

  26. #26
    0
    Hi lubor_,

    We are working on a game where we need avalanche to occur on random locations of the map. that will be specified by the Player. So I wanted to know
    1. Can Physics Forests Fluid System be optimised for this big scenario? i.e. Avalanche would occur on real sized mountains.
    2. Can your fluid system be customised to act like snow avalanche?
    3. Can these generate collision Hit events or anything like it?


    Would like to hear from you if these things are possible.

    Best Regards
    Sumit Das

  27. #27
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by Sumit Das View Post
    1. Can Physics Forests Fluid System be optimised for this big scenario? i.e. Avalanche would occur on real sized mountains.
    2. Can your fluid system be customised to act like snow avalanche?
    3. Can these generate collision Hit events or anything like it?
    1. yes, and scaling is a bit easier for sand/snow, because particles don't need to be simulated, where nothing is moving
    2. yes, snow is a customized sand
    3. we can calculate the impact of snow on any movable (atm only rigid) object every frame. I think with a cumulative sum you can get what you want.

  28. #28
    0
    Great work so far, having it for waterfalls and forest streams, as well as for waterflowing over a mill wheel will be very nice to see and uses I am interested in.

  29. #29
    0
    Proud of you all, shouts out to you for experimenting with this. I'm assuming the goal is to implement this kind of simulation in real time games? I see some of the other devs here saying that this would be useful for offline sim, but that's essentially what Houdini is for and I'm sure that's not what you're going for. What are the specs of the rig running those simulations? Sorry if this was already answered, didn't see it.

  30. #30
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by thenegaverse View Post
    What are the specs of the rig running those simulations?
    NVidia TitanX Pascal (the one from Aug 2016)
    CPU is (almost) not used at all

  31. #31
    0
    When you say Machine Learning, do you mean something similar to this? https://www.youtube.com/watch?v=iOWamCtnwTc&feature=youtu.be
    When is saw that my thought was ; "This needs to be in Unreal."

    This is absolutely fantastic though, as a hobby game developer, ((I also work at Ubisoft but only as an artist there)) I have...or will have a sort of large dock scene where I am trying to get the ocean to behave like a real ocean, for a stealth like game, so for me this is a really real question; Can or would this be able to be used to simulate realistic motion of an ocean on a about a kilometer of dockyard shoreline with rocks and coastal armoring blocking larger incoming waves from the open ocean to create shallow calm areas where small boats are moored? The level is smaller but the shoreline is really bendy heh. Right now I'm using flowmaps that control heightmaps but...A physically simulated ocean would be really pleasant to watch, especially for a game where you mostly sit around watching from the shadows.

    I would love to get my hands on this to experiment with...Much like everyone else here I guess. I love experimental technology.

    PS: I would gladly sacrifice the chamfers on my stone wall assets or the density of my grass to implement this. I honestly believe technology like this is more interesting for a player to at least look at than a really detailed rock.
    Last edited by MischievousM; 04-11-2017 at 07:48 PM.

  32. #32
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by MischievousM View Post
    When you say Machine Learning, do you mean something similar to this? https://www.youtube.com/watch?v=iOWamCtnwTc&feature=youtu.be
    When is saw that my thought was ; "This needs to be in Unreal."
    the general idea is based on the our old paper, mentioned also there in the description ( https://www.inf.ethz.ch/personal/ladickyl/fluid_sigasia15.pdf ), but it has been significantly modified, so that the results are better, and all the new features are possible (rigid coupling, multiple fluids, granular materials, surface generation, etc).
    Quote Originally Posted by MischievousM View Post
    Can or would this be able to be used to simulate realistic motion of an ocean on a about a kilometer of dockyard shoreline with rocks and coastal armoring blocking larger incoming waves from the open ocean to create shallow calm areas where small boats are moored?
    we plan work in the very recent future on various tricks combining those methods with ours to make it scale to that size
    simply it is simulated where you are looking, elsewhere some tricks are applied, and there is a smooth transition between those two

  33. #33

  34. #34
    0
    Supporter
    Join Date
    Mar 2016
    Posts
    1
    Looks really amazing =) It`s based on Nvidia Flex or somth different ?

  35. #35
    0
    This looks amazing! wish we could see more, I would love to use it one day!

  36. #36
    0
    Infiltrator
    Join Date
    Mar 2015
    Posts
    21
    Good work @lubor_! Keep it up!
    Level Designer @ Avalon Games LLC, “The man who asks a question is a fool for a minute, the man who does not ask is a fool for life.” - Confucius

  37. #37
    0
    I really like what you are doing! I have a couple of questions, is it running on the main rendering thread or could you offload it to another cuda processor and leave the main card rendering? Is it restricted to viscous liquids at the moment, or can you add in other physical attributes like surface tension and non-Newtonian viscosity behavior? Is it possible to use it for gases?
    Looks great though, well done.

  38. #38
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    Quote Originally Posted by researn View Post
    could you offload it to another cuda processor and leave the main card rendering?
    we haven't tried, but it should be possible
    Quote Originally Posted by researn View Post
    Is it restricted to viscous liquids at the moment, or can you add in other physical attributes like surface tension and non-Newtonian viscosity behavior?
    Cohesion(surface tension)/adhesion forces are possible (used for example for honey or mercury in "various materials"). The only non-newtonian viscosity we tried was used for sand. I've seen some (real) videos of various weird non-newtonian fluids, I would need to see a mathematical description of that behavior to see if it's possible to simulate in our framework.
    Quote Originally Posted by researn View Post
    Is it possible to use it for gases?
    We are working on it, we release videos, when we are happy with the quality.

  39. #39
    0
    Infiltrator
    Join Date
    Apr 2017
    Posts
    17
    A nice waterfall:

  40. #40
    0
    Excellent work.
    I have had an interest in realistic water in Unreal Engine for a long time.
    My target to build a realistic forest river (stream) that interact with rocks, have foam, etc, like in this video:
    https://youtu.be/RsuafL_X270?t=18s
    It is seems that this is achievable with your plugin.
    Hope that you will release it on Unreal Engine Marketplace soon.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •