Adjust Spatial Adaptivity and Time Stepping solver attributes.
- [Voiceover] Bifrost is a very powerful simulation engine. It has the ability to reproduce almost any liquid simulation you could imagine. However, it still requires that you tune the simulation to your specific needs. That's what this chapter is about, tuning and disk output. And by tuning, I mean setting the simulation parameters so that you will get a reasonable result on the screen. Just dropping an emitter into a scene and making it collide with things is never good enough.
You have to, on some level, understand how the calculation is being performed, so that you can optimize it for your particular needs. Let's take a look at the Bifrost Liquid Properties. In the Outliner, click on Bifrost Liquid Properties One, and in the Attributes Editor, we want to go to the Bifrost Container Node. We previously set our Master Voxel Size to a fairly small size of 3.3 centimeters, in the Bifrost Universe.
It's about one and a quarter inches. Each one of our fluid voxels is about one and a quarter inches, or 3.3 centimeters on a side. And, that is just barely small enough to give us a reasonable looking result in this shot. We could go smaller, but remember that decreasing the Master Voxel Size will vastly increase the calculation time, because that Master Voxel Size is on a cubic scale. Additionally, it interacts with these parameters down here.
Let's talk about these. In Adaptivity, we have Spacial Transport and Time Stepping. Spacial Adaptivity is a method for reducing calculations in areas of the fluid that are interior to the liquid, and also not moving very quickly. We want that to be on. Also, Delete Exceeding Particles is another optimization routine. It calls particles in regions of low voxel resolution. We want that to be on as well.
Then, Transport and Time Stepping. These are the attributes that relate to collision accuracy. Remember from the last chapter, we had some issues with collisions. Particles going through the walls and so on. We can fix that now using these attributes. First, let's talk about Time Stepping. This is the number of iterations of the Solver per frame. And, the first most obvious thing that we can do to improve the quality is to increase the Max Time Steps.
I'll set that to a value of seven. We also need to look at Time Step Adaptivity. Adaptivity is a weighting factor, and higher values increase the likelihood of more steps being subsampled. We're always going to get at least one step per frame. As we increase Time Step Adaptivity, we're more likely to go into that frame and sample it more than once, or subsample it. The Time Step Adaptivity is on a non-linear scale, and it is also related to the Master Voxel Size.
Adaptivity is connected to the speed of particles relative to voxel size. So, reducing the Master Voxel Size will usually trigger additional subsamples, even if you didn't change anything down here. Adaptivity is another super sensitive attribute. At a value of zero, we will only get one sample per frame. One step per frame. If we increase this up to a value of 0.5, then we will get additional subsamples when particles move greater than one voxel per step.
If we increase it a bit more to .75, now subsampling will occur when particles move greater than half of a voxel per step. But, here's where things get strange. If we increase the Time Step Adaptivity to its maximum of one, now subsampling occurs almost always whenever particles move greater than .001 voxels per step.
So, changing the Time Step Adaptivity from a value of .5 to a value of one resulted in a thousand times more sensitivity. So, this is a crazy attribute. We want to set this to a value of .9. And, that means that with a very fast moving fluid, we will get probably seven Time Steps per frame.
But in regions where the fluid is moving more slowly, we will have fewer samples. All right, so that's our Time Step. Then, we have Transport Step. Time Stepping is the global iterations, and it includes several phases of calculation. Time Stepping includes a Voxelization Phase, which is responsible for collisions. Time Stepping also includes Pressure and Transport, or Transform Phases.
But, Transport has its own section here, and this is the movement of particles, and it is within each Time Step. Transport Steps are subdivisions of each Time Step. And, they only deal with interpolating Particle Transforms, after the Voxelization, Collision, and Pressure have all been calculated. Transport steps are computationally cheap. They are very useful in this case, with mostly static collisions.
Our Collider Objects aren't moving very quickly. I'm going to set the minimum number of Transport Steps to 10, and leave the maximum at a thousand. And again, increase the Transport Step Adaptivity, so we'll be more likely to have more Transport Steps. Set that to 0.9 as well. These are good parameters for this particular simulation, but you sill find at different scales, and different frame rates, and different time durations even, different camera angles, and so on, will all require different setting for the Master Voxel Size and the Adaptivity settings.
So yeah, this is a good setting for our particular case. We are going to need to build a Playblast because increasing all of these Adaptivity values will of course increase our Simulation Time even further. Let's go ahead and create our Playblast. Windows, Playblast. As before, hold down the Escape key to cancel the calculation. I stop the Playblast at about frame 140. The collisions are better. We're getting a few particles flying outside the boundaries.
I'm not gonna be too concerned about that because in fact, I'm going to call off all of the particles behind the camera. We'll do that in the following movie using a Kill Plane.
- Understanding Bifröst
- Analyzing the node structure
- Emitting from a polygon mesh
- Colliding with objects
- Pushing and damping fluid motion with accelerators
- Caching Bifröst simulations
- Meshing liquid and exporting to Alembic
- Shading with the Bifröst liquid material
- Designing mental ray materials
- Layering shaders with Bifröst channel data
- Adding mist with an Aero simulation
- Texturing an Aero material