Project 6c: Bifrost

Goal To learn the basics of creating water effects using Mayas new procedural effects platform.

Bifrost is part of Maya's effects system. It allows you to simulate fancy realistic liquid effects right within Maya. We will be creating a simple splash by animating a ball flying into a pool of water and using Bifrost to create a liquid that will react with this animation.

  1. Download and rename this file. When opened, you should see a box named liquid_container that looks something like this:

    Note: The shape is not really important, as long as the liquid geo you create inside it fits well. However, the larger the body of water is, the more expensive the simulation will be, so we're sticking with a small box for this assignment.

  2. Next, create a separate piece of geometry that fits inside your box like water would. Name it liquid_emitter. This geometry is where the Bifrost effects will be contained.

  3. Create a small sphere. This is what we will use to interact with the bifrost liquid to create the splash. Create a new material for the ball, and tint it whatever color you want. White works pretty well. Name it ball. We will work with this ball a little later.
  4. To add the Bifrost effect to this inner water geometry (liquid_emitter), make sure you are in the FX menu set, then select it and simply go up to your top menu, click on Bifrost, and click Liquid.

    Note: Bifrost may not be automatically loaded into your Maya scene. To load it, go to Windows → Settings/Preferences → Plug-in Manager. Down near the bottom there should be several Bifrost plug-ins. Check Loaded and Auto load next to Apply to All for the Bifrost section. This will tell Maya to load Bifrost, and automatically load it from now on whenever you open it. You will also need the Arnold Renderer enabled for this assignment, which can be loaded by selecting the plug-in mtoa.mll.

  5. As soon as you do this, notice in your outliner that two new nodes have been created: bifrostLiquid1 (with liquid1 contained inside it), and bifrostMesh1, and there is a box around your liquid emitter. These are tools you will use to create your splash.

  6. Click on your bifrostLiquid1 node, and in the Attribute Editor, go into the bifrostLiquidPropertiesContainer1 tab. You can see now that there are tons of options and settings for you to adjust to create the effect you want. This is the main node we will use to create our liquid. One of the most important settings is under Emission. Under the Droplet tab, we can control the Threshold, which controls how particles break away from the main body of water. By lowering this value, it allows the material to break up more easily, giving you a splashier effect. Lower the Droplet Threshold to 0.800.

  7. Now we're going to go into the liquid_emitter's attributes and change some of those values. When you click on liquid_emitter, in the Attribute editor there is now a Bifrost tab named emitterProps1. (You can also select bifrostEmitterProps1 in the Outliner to find emitterProps1.) Firstly, make sure Continuous Emission is unchecked. This will stop Maya from constantly generating new particles in the scene, and just emit them from frame 1 and work with those. Next, make sure the Conversion Mode is set to Solid, not Shell. This tells Maya to just fill your emitter with particles instead of emitting particles outside your water shape. Then, under the Stickiness tab, change Strength and Bandwidth both to a value between 0.5 and 1.000. It's up to you to choose what you think looks best. These settings deal with the way the liquid collides with itself. Upping the stickiness will control how long the liquid particles hold on to each other before separating. When you're done, this is how your settings should look:

  8. Next we need to tell the liquid container you created to react with the liquid particles during the splash, so they don't just fall right through it. First select your box, liquid_container, and then select your bifrostLiquid1 node in the outliner. Once you have these selected, go back into your Bifrost menu at the top of the screen, and this time select Collider. Do the same thing with the sphere you created. First select your ball, then select the bifrost1 node and click Collider.
  9. Now we need to create some motion to make this splash. Animate your ball flying into the box. How you do this is up to you, but keep it short and simple. Make sure your motion is no more than 48 frames, and your timeslider is set to run from 1 to 100 frames. This way we can see how the liquid reacts once your ball has collided with it.

  10. Now we've created our liquid, told Maya what objects we want it to be interacting with, and changed some of the liquids behavior with the Stickiness and Droplet settings, we can see how our simulation works. Click on the bifrostLiquid1 node in your outliner, scrub to the first frame on your timeslider, and press play. As you can see, Maya is sending information to Bifrost and Bifrost is calculating how the simulation will work right in your scene, and you have the option to work on other things interactively while Bifrost makes those calculations. No color on the timeslider means the frames are queued for calculation, while a green color means they’re finished. Once the timeslider is completely green, the simulation has been fully calculated. If this does not appear on your timeslider, go to Bifrost > Bifrost Options, and check "Enable Scratch Caching" under "Scratch Cache Management". Looks pretty cool!

  11. Once we have our calculated simulation, we can go into the bifrostLiquid1 node and actually control how it's being displayed to us, to help us better visualize what the effect will look like and what it's doing. Go into the bifrostLiquid1 node in the Attribute Editor, and click on the liquid1Shape tab. First, display voxels by checking the box next to Voxels under the Display tab. Under Voxel Display (as well as Particle Display), there is a tab called Color Channel Remap. We can use this to adjust how the liquid simulation turns from blue to white. This is based on the velocity of the particles, so if we lower the Color Channel Max speed to 3.000, we can more easily see how the liquid is behaving. Adjust this value for both the Particle and Voxel Display.

  12. There are tons of settings that can be messed around with in Bifrost, like Gravity controls and wave simulations, and you are encouraged to play around with those in your free time. It's an awesome and powerful tool. But for now, we're going to call it good with our simple splash.
  13. Playblast your splash with both the particles and voxels displayed from an angle where we can see how your water is interacting with the box and ball.

To Render

  1. Now we're going to render three separate shots of your water. To make the bifrost effect renderable, go into the liquidShape1 node and scroll down to Bifrost Meshing, and check Enable.

    CAUTION: This may take a while. Bifrost is generating an extremely dense mesh. Be prepared to wait a bit for it to finish.

  2. Set up a couple lights to illuminate your water. It's up to you how you want to light it, as long as it looks realistic. An ambient or area light to create a base light and a spotlight for highlight works pretty well. Make sure to label your lights.
  3. Once your mesh is created, Bifrost automatically assigns an aiStandardSurface with some default values to the mesh. Experiment with the shader attributes and find a realistic look. Render a few different frames as you’re working to see how it’s looking.
  4. Once you have your color values and lights set up, hide the bifrost1 node in the outliner, and the liquid_emitter geo, so that the only thing visible in the viewport is the ball, liquid_container, and the bifrostMesh1. If the liquid_emitter is not hidden, a gray block will appear inside the water, which may also affect the color of the water. Render a frame of the water before the splash, a frame during the splash (during the impact of the ball), and a frame after the splash. Render using the resolution 960x540, and as a PNG.

 

Turn In You will be graded on the following: Turn the following into Collect-It on Catalyst: