Understanding the Basics of Bifrost in Maya

In 2012, Autodesk bought the Naiad fluid simulator from Exotic Matter. The official press release stated that "Naiad technology may find its way into future Autodesk offerings". Fast forward three years and in Maya 2015, that technology resurfaced as Bifrost. Or, technically, Bifröst. Accenting aside, Bifrost is an incredibly powerful fluid simulation tool that's now available directly in Maya. Let's go over some of the core concepts you'll need to understand to get started with the basics of Bifrost in Maya.

An Unfortunate Name

39937_01 Although this doesn't really have to do with the functionality of the fluid simulator, there's a fairly common issue that many users, especially home users, come across when they're trying to use Bifrost. The issue is simply that Bifrost doesn't seem to work and you end up with every frame failing to calculate. This happens because of a virus out there that shares the name Bifrost. What this means is if you install Maya while your anti-virus running, the chances are pretty good the Bifrost plug-in will get either blocked or quarantined and once you try to use Bifrost, Maya won't be able to calculate the frames. If you've tried simulating on a fresh install of Maya and Bifrost is just saying all of your frames failed in the Script Editor, chances are pretty good you've come across this issue. The fix for this issue is to shut off your anti-virus temporarily and run through a repair on your installation of Maya. I'd also recommend reporting it as a false positive so hopefully more anti-virus companies will be able to correctly determine the difference between Bifrost the virus and Bifrost the fluid simulator. You can repair your installation of Maya by either uninstalling and reinstalling completely (with your anti-virus turned off to ensure it doesn't stop Bifrost) or you should be able to hop into your Control Panel and run a repair by clicking the "Uninstall/Change" option in Programs and Features and then running the Repair or Reinstall option as you can see in the screenshot above.

How Bifrost Works

The technology behind Bifrost is referred to as "fluid implicit particles", or as it's more commonly referred to in the industry, a FLIP solver. If that sounds familiar it's because Bifrost isn't the only fluid simulator to use a FLIP solver. For example, RealFlow's Hybrido uses a FLIP solver. Since it's using a FLIP solver, what that means is Bifrost's simulation speed for larger scale fluid simulations is better than Maya Fluids. That's not to say you can't do small scale fluid simulations with Bifrost, but with a FLIP solver you're able to get an incredibly high amount of particles in your simulations without losing stability. If you have trouble seeing your Bifrost particles, you might try switching to a wireframe mode in your viewport so they're easier to see. It's also worth pointing out that you can only see Bifrost particles if you're using the Viewport 2.0 renderer.

Creating Bifrost Simulations

39937_02 The creation of Bifrost simulations is extremely simple. All you need is a polygon object you want all of your particles to emit from. Select the object and then go to Bifrost > Create Liquid to have Maya set everything up for you. Once your particles are created, you'll need to simulate your Bifrost particles to get them to show up. To do this, hit Play on the timeline to have Bifrost simulate everything. Maya will go through and playback, but sometimes it may take longer for Maya to calculate the Bifrost particles themselves. As you can see in the screenshot above, your timeline will fill up with yellow for frames that have yet to be evaluated and green as Maya evaluates them. Even though creating Bifrost fluids is simple in and of itself, getting them to do what you want is where things get complex. Since there's really an infinite number of uses for Bifrost, getting too advanced with various techniques is outside the scope of this article.

Controlling Bifrost Particles

39937_03 Like many other particle technologies, you don't really move around Bifrost particles like you do objects in Maya. Instead, you'll apply what are referred to as accelerators to control the particles. If you've used other particle engines you may be used to terms such as fields with Maya's other particle systems or daemons in RealFlow. You can think of an accelerator in Bifrost as being similar to these other terms from other engines. To create an accelerator, you'll again want to have a polygon object that is going to be your accelerator. Select your Bifrost node (e.g., bifrost1) and then Shift-select the polygon object you want to be your accelerator. Finally, go to Bifrost > Add Accelerator to hook the object up as an accelerator for your simulation. Once your accelerator is hooked up, you can adjust its attributes in the Channel Box.

Bifrost Particle Interactions

An essential element of any particle system is how they can interact with objects in your 3D scene. To do this with Bifrost, all you need to do is to add in a collider object. The process for creating a collider is very similar to creating an accelerator. Start by creating a polygon object you want your Bifrost particles to interact with. Then, select your Bifrost node (e.g., bifrost1) and Shift-select the polygon object you want to be your collider. The last step is to go to Bifrost > Add Collider to have Maya hook up the nodes for proper interaction. Just like your accelerator, from there you can adjust any of the collider object's attributes through the Channel Box.

Optimizing Bifrost Particles

Since any particles can start to get out of hand really quickly, it's always a good idea to optimize your scenes whenever possible. With Bifrost, you can set up what's referred to as a killplane to help with this. Again, if you've used other particle systems, like RealFlow, you may be familiar with kill daemons. A killplane in Bifrost works very similarly, except that a killplane is as the name implies, just a plane. So if you want to create a cube, for example, you'll need four killplanes. Unlike creating accelerators or colliders, the process for creating a killplane doesn't need any polygon objects to start with. Instead, just select your Bifrost node (e.g., bifrost1) and then go to Bifrost > Add Killplane. Your killplane will be added to the origin of your Maya scene. From there, you can move, scale or rotate the killplane as you would any other object. 39937_04 It's worth pointing out that killplanes are infinite, meaning the scale of the killplane doesn't really matter. As you can see in the screenshot above, any particles that pass by a killplane will die off regardless of the location of the actual killplane itself.   Now that you're familiar with the basic concepts of Bifrost, you can dive into some more advanced Bifrost tutorials by hopping over to our Maya dynamics section to find a wide range of Bifrost tutorials. If you have specific Bifrost concepts you'd like to see covered in a future article, feel free to let us know in the comments below!