Home Technical Talk

How we created fluidmeshes and clouds for Battlefield 1

polycounter lvl 6
Offline / Send Message
Demno polycounter lvl 6
Hey!

I wanted to share a video with you. It's a recording of a presentation I held at the SideFX booth during GDC. It covers how we used Houdini to create fluidmeshes and spawnsurfaces for clouds in Battlefield 1.

Hope you find it useful!


Replies

  • Anchang-Style
    Options
    Offline / Send Message
    Anchang-Style polycounter lvl 7
    Wow that's actually really awesome. 
  • Grusti
    Options
    Offline / Send Message
    Grusti polycounter lvl 10
    very interesting talk! thx for sharing
  • Gambit23
    Options
    Offline / Send Message
    Gambit23 polycounter lvl 6
    Ohh thank you! I really want to know about clouds more!
  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    Well, this is ingenious. Thanks for sharing. I've been struggling with making volumetric clouds in UE4.  This one looks volumetric and less resources draining than ray marching clouds. I've been struggling with making volumetric clouds in UE4. I used hand modeled shapes and some noises with tesselation but this technique seems way better. I might take another spin to houdini, my last try didn't go well though. 
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    igi said:
    Well, this is ingenious. Thanks for sharing. I've been struggling with making volumetric clouds in UE4.  This one looks volumetric and less resources draining than ray marching clouds. I've been struggling with making volumetric clouds in UE4. I used hand modeled shapes and some noises with tesselation but this technique seems way better. I might take another spin to houdini, my last try didn't go well though. 
    Yeah, raymarching is still too expensive if you want to actually fly around in it. For a cool skybox, they might be fine though, depending on your target platform.

    We tried some volumetric lighting techniques as well, but it caused to many issues and not enough fidelity to warrant it. Simple tricks usually work the best :)
  • VictorSantos
    Options
    Offline / Send Message
    VictorSantos polycounter lvl 12
    Thanks for sharing! Really cool techniques and great talk.

    Can't wait to give it a try, I've been trying to find an excuse to learn some Houdini! :smile: 
  • WaYWO
    Options
    Offline / Send Message
    WaYWO greentooth
    super impress ! :smiley:
  • LaurentiuN
    Options
    Offline / Send Message
    LaurentiuN interpolator
    Thanks for the video, crystal clear to understand even if i dont know Houdini.
  • EricElwell
    Options
    Offline / Send Message
    EricElwell insane polycounter
    Great stuff! Thanks for sharing
  • Lt_Commander
    Options
    Offline / Send Message
    Lt_Commander polycounter lvl 10
    Thanks for sharing! I'm still wrapping my had around Houdini in an art pipeline but there's so much stuff I've seen people say it can do, it's kind of mind boggling. Concrete start-to-engine stuff like this really helps to make some of its power clear! 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I don't know man, many games used ray marching nowadays just so as nicely as something like this, on acceptable framerare...For me this seems poor. sry. You definitely have nicely optimized overdraw but I'm not sure anymore if this is such a huge issue until some amount.

    I mean it does look alright but you can get the same or better look through the ray marching method. I just feel like this does not worth the effort. When you can shoot rays and calculate stuff for almost free if you have some certain budget for specific elements of graphics.

    You would still probably want to bake it down into 3d flipbooks at the end, but you wouldn't need to go between houdini and your engine. Also it would be pure volume rendering with semi dynamic parameters. 

    This is just my opinion though.

    Anyways, here is a thing to consider. There is the ps4 and pro with some fps and resolution and raymarching still holds up and runs fine...

    Also , no sprite and normalmap bullshit...  :|

    Still looks fine though...

  • RyanB
    Options
    Offline / Send Message
    Cool techniques, inspiration for Houdini noobs like me.
  • throttlekitty
    Options
    Offline / Send Message
    Obscura said:
    I don't know man, many games used ray marching nowadays just so as nicely as something like this, on acceptable framerare...For me this seems poor. sry. You definitely have nicely optimized overdraw but I'm not sure anymore if this is such a huge issue until some amount.

    I mean it does look alright but you can get the same or better look through the ray marching method. I just feel like this does not worth the effort. When you can shoot rays and calculate stuff for almost free if you have some certain budget for specific elements of graphics.

    You would still probably want to bake it down into 3d flipbooks at the end, but you wouldn't need to go between houdini and your engine. Also it would be pure volume rendering with semi dynamic parameters. 

    This is just my opinion though.

    Anyways, here is a thing to consider. There is the ps4 and pro with some fps and resolution and raymarching still holds up and runs fine...

    Also , no sprite and normalmap bullshit...  :|

    Still looks fine though...

    They're doing that cloud system as the playable level, that's a lot of area to be covering at all times. I dunno man.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    So you need good sorting... Thats kinds tricky but still not that heavy.


    Anyways.
    There are nice tech papers about ray marching, you should check them out...  Its really not that horrible as you would imagine, if you do it in a nice way.

    Would you do parallax? Ray marching a volume texture to get different effects is roughly the same amount of stress on your videocard. 
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Obscura said:
    So you need good sorting... Thats kinds tricky but still not that heavy.


    Anyways.
    There are nice tech papers about ray marching, you should check them out...  Its really not that horrible as you would imagine, if you do it in a nice way.

    Would you do parallax? Ray marching a volume texture to get different effects is roughly the same amount of stress on your videocard. 
    I'd love to see some examples of raymarched volumes running on this scale!

    As for papers, check this presentation out: http://www.frostbite.com/2015/08/physically-based-unified-volumetric-rendering-in-frostbite/
    On Page 42 you can see one of my early tests for the cloudsetup where we still tried to use volumetric shading. There were too many issues when making an entire level out of it so we had to scrap that idea.

    Another one we looked at was the Horizon Zero Dawn clouds. While cool, they don't work if you want to fly around in them. They also take up 2ms on the PS4. (Same issues with Simuls Truesky, but with even worse performance) That was the ENTIRE fx budget for BF1. With that, we wouldn't have been able to have a single gameplay effect. With our method, we were able to have dogfights with 20+ planes and two burning airships.

    As for raymarched volumetextures, one of the best results I've seen comes from Ryan Brucks at Epic. His tests look cool, but the textureresolution needed for a gameplay area over 1 km across would make a PS4 scream in agony. Not to mention that I was repeatedly told by our rendering engineers that it would too expensive.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Horizon - Zero Dawn:

    http://killzone.dl.playstation.net/killzone/horizonzerodawn/presentations/Siggraph15_Schneider_Real-Time_Volumetric_Cloudscapes_of_Horizon_Zero_Dawn.pdf

    As far as I understand, this implementation is even crazier than a normal box volume.

    I would show this one for entire level example. Though I don't really have an example for good sorting, in a game. But there is this one by Ryan Brucks. It shows nice lighting, opacity, easy connection with the above noise generation, and some sorting:

    http://shaderbits.com/blog/creating-volumetric-ray-marcher


  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Obscura said:
    Horizon - Zero Dawn:

    http://killzone.dl.playstation.net/killzone/horizonzerodawn/presentations/Siggraph15_Schneider_Real-Time_Volumetric_Cloudscapes_of_Horizon_Zero_Dawn.pdf

    As far as I understand, this implementation is even crazier than a normal box volume.

    I would show this one for entire level example. Though I don't really have an example for good sorting, in a game. But there is this one by Ryan Brucks. It shows nice lighting, opacity, easy connection with the above noise generation, and some sorting:

    http://shaderbits.com/blog/creating-volumetric-ray-marcher


    I'm guessing you didn't see my edit above.

    Keep in mind, Ryan didn't start posting about this stuff until a few months after we shipped the game. Seeing as his work is partially based on the Horizon presentation, I doubt he's managed to optimize it further. I mean, look at the end of the Horizon paper, they have already optimized the hell out of it and it still is way to expensive.

    Edit: Oh and I do have some insight in the Horizon way of doing it, since Frostbite has done the same: http://publications.lib.chalmers.se/records/fulltext/241770/241770.pdf

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I indeed not see. Yeah well, these were just me personal thoughts.Although Thanks for the link and you might be right hehe. Here is an another one about Frostbite and volume ray marching to get volumetric lighting:

    http://www.frostbite.com/2015/08/physically-based-unified-volumetric-rendering-in-frostbite/

    So I'd still say its becoming "common" to use ray marching here and there, surprisingly often. I would still come up with the same example, its not much more expensive than a parallax with shadows.

    Though I would be interested if Houdini could be used to create and bake the volume textures. Normally, using Ryan's method, I would generate and even bake it inside Unreal but thats a pain.
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Obscura said:
    I indeed not see. Yeah well, these were just me personal thoughts. Thanks for the link. Here is an another one about Frostbite and volume ray marching to get volumetric lighting:

    http://www.frostbite.com/2015/08/physically-based-unified-volumetric-rendering-in-frostbite/
    Yeah... That's the one I posted. I worked with Seb to create examples for that presentation. Using the clouds above...

    If you are interested in using Houdini to generate the volumes, check out my GDC talk from this year where I show how to do just that. It's in the GDC Vault and is called VFX Bootcamp: Like a Mace to the Face - Leaving the Battlefield to go it alone. It's around the middle in the Houdini tricks section.

    If you do find any examples of where raymarching used in a comparable way, please do post them. I'd love to prove that pesky army of rendering engineers wrong.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I'm checking out the GDC vault but I don't have a subscription and so far it seems pretty expensive...

    So there was ray marching used in the latest Battlefield games, to simulate volumetric lighting, and far clouds. And you ended up using sprites for these clouds, because they are very close and could intersect with the meshes?


    Did you use lit material for those sprites? Or some sort cubemap lighting?

    Thanks for the information though, but for me, this kinda poves that re ray marching method is indeed suitable for games in specific cases. Cool stuff. and yeah I'll probably check out some Houdini 1d to 2d.
  • Next
    Options
    Offline / Send Message
    Next polycounter lvl 12
    Hey Demno , your video was really interesting and i decided to install the trial version of houdini and try to recreate your demo with the torus. I got it working, my only problem is the torus gets reppelled from the surface and when i try to increase its density everything just gets way to splashy. Any speacial tweaks you made for your example to get it this smooth? - I started watching tutorials, but till now i did not come across a solution. 
    Any tipps are appreciated thx
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Next said:
    Hey Demno , your video was really interesting and i decided to install the trial version of houdini and try to recreate your demo with the torus. I got it working, my only problem is the torus gets reppelled from the surface and when i try to increase its density everything just gets way to splashy. Any speacial tweaks you made for your example to get it this smooth? - I started watching tutorials, but till now i did not come across a solution. 
    Any tipps are appreciated thx
    Hmm... Sounds like it's reading in the solvers in the wrong order. Try going into the AutoDopNetwork and click the Merge node. Click the little black arrow next to RigidBodySolver1. I recorded a gif of it here:
    https://media.giphy.com/media/3oKIP5LZTgco7JYyuA/source.gif

    If that doesn't help, upload the file and I can check it out in the morning :)
  • Next
    Options
    Offline / Send Message
    Next polycounter lvl 12
    Hey thx for the quick reply. Sadly this was not the issue they are in the right order, but my result, also isnt as crazy as yours.
    I am sure it is an absolute beginner problem :smiley:
    Here is a DB link to the file: https://www.dropbox.com/s/sm2mzllkaxfboun/TorusSplash.hipnc?dl=0 
    i hope the link works...
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Obscura said:
    I'm checking out the GDC vault but I don't have a subscription and so far it seems pretty expensive...

    So there was ray marching used in the latest Battlefield games, to simulate volumetric lighting, and far clouds. And you ended up using sprites for these clouds, because they are very close and could intersect with the meshes?


    Did you use lit material for those sprites? Or some sort cubemap lighting?

    Thanks for the information though, but for me, this kinda poves that re ray marching method is indeed suitable for games in specific cases. Cool stuff. and yeah I'll probably check out some Houdini 1d to 2d.
    Again, it wasn't used because it was too expensive and had other issues when used at this scale, which is why I find it confusing that you keep referring me to papers written by the people who worked on it.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Clear. Thanks.
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Next said:
    Hey thx for the quick reply. Sadly this was not the issue they are in the right order, but my result, also isnt as crazy as yours.
    I am sure it is an absolute beginner problem :smiley:
    Here is a DB link to the file: https://www.dropbox.com/s/sm2mzllkaxfboun/TorusSplash.hipnc?dl=0 
    i hope the link works...
    Found the issue! FLIP doesn't play well with small objects. You can massage a bunch of values to get it to work, but the easiest solution in your case would be to simply set the scale of your torus back to 1 and then increase the size of the fluid tank to compensate. That value is right next to the water level. Then it should splash just fine :) 

    Let me know how it goes.
  • Next
    Options
    Offline / Send Message
    Next polycounter lvl 12
    Alright thx  :) . I wil try this when i get home - i let you know if it worked!
  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    I took another try on Houdini thank to video above. I am having problems with converting sky rig into polygons. None of the converter nodes seemed to work. Remesh, Convert, Convert VDB and others didn't work. So I tried to remesh sky rig inside the rig but I got this:

     

     I can convert cloud nodes into polygons without problems. Please help. 
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    igi said:
    I took another try on Houdini thank to video above. I am having problems with converting sky rig into polygons. None of the converter nodes seemed to work. Remesh, Convert, Convert VDB and others didn't work. So I tried to remesh sky rig inside the rig but I got this:

     

     I can convert cloud nodes into polygons without problems. Please help. 
    I Just tried it in the Apprentice version of H16 and it works. After the skyrig, drop in a convert vdb node and set it to polygons. Nudge the isovalue to a really small positive value, like this:


    However, I'm afraid this is as far as you can go with the apprentice edition. Last I checked, you can't export meshes out without buying a license.

    The error you got when trying to add things in the skyrig is because it's a locked node (to prevent accidentally breaking it). If you want to add things inside of it (only needed if you know what you are doing) you have to rightclick the skyrig and hit "allow editing of content". Then it'll work like any other subnet.
  • igi
    Options
    Offline / Send Message
    igi polycounter lvl 12
    wow thank you. It worked. I think one of the reasons why people fail with learning houdini are quirks like this. And lack of people helping here. I'm on apprentice edition. Also I managed to export it as OBJ to Modo :) (no FBX option though)

      
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    Glad it worked! :)

    If you want to learn Houdini get on the "think procedural" discord and the ODForce forum. Most helpful community I've ever encountered.
  • Next
    Options
    Offline / Send Message
    Next polycounter lvl 12
    I got it working too! Now everything is splashy ;)
  • Demno
    Options
    Offline / Send Message
    Demno polycounter lvl 6
    So, maybe a bit late for some of the splashartists out there, but if anyone is interested; I've created a step by step tutorial for creating splashmeshes. From empty Houdini scene to finished effect in unreal. 

    Check it out!
    https://sidefx.com/tutorials/splashmesh-houdini-for-games/
  • xChris
    Options
    Offline / Send Message
    xChris polycounter lvl 9
    This is soooo good! This video just pushed me to finally dive into Houdini :D 
Sign In or Register to comment.