It seems like Duncan Brinsmead has already documented solutions for nearly all my effects problems. Here is one that looks like it would work great for my underwater shot where liquid flows out of the container:
Brinsmead inkdrop
I spent Monday morning basically dissecting this effect. It's actually quite simple to set up. It's a basic 3D fluid with a constant color, high resolution, higher detailed solve, self-shadowing, and negative buoyancy to get it to flow down slowly instead of upward. The calculation times are pretty intense, though, running at a few minutes per frame. The render itself actually doesn't seem to take that long, about 20 seconds, but that's for a small preview size.
--------------------
I spent some time playing with Maya fluids and learning how to cache fluid dynamics. A point to remember: always have the file saved in the correct location with the project set correctly before starting the cache. One wrong move, and the whole cache file is destroyed. Also important, you have to save the file before Maya saves out the cache file from the temporary folder to the data folder in your project. Unfortunately, this makes it take longer to save the file and longer to open it. One should probably also back up the cache data so as not to accidentally save over it.
One interesting option I had not considered is the ability to create segmented cache files, meaning a new cache file for each segment of frames where you set the number of frames per segment. The advantage here is the ability to use different sampling settings for different segments. Also, it allows you to create caches for files that may otherwise be unmanageable, e.g. a 8 GB cache file broken up into four segmented 2 GB cache files. This will almost definitely be necessary because my test for the fluids cache was over 20 MB for 10 frames. Thus, it is possible that a three second shot with a high-res fluid simulation might well be over 2 GB, the maximum file size for an individual file in XP.
Another cool trick is the use the Paint Fluids tool, which can be used to paint attributes right into the fluid container using the artisan tool. With 3D fluids, this is done by painting on 2D slices of the container. You can either have autoset initial state checked, or, at the end of your painting, set the initial state of the fluid. There are tools to select how thick a slice is, to paint through multiple slices, or to even specify a subvolume within the container to paint in. Fluid properties can be exported or imported as "slice maps."
It's relatively easy to make a fluid collide with an object, but the main consideration is not the surface of the object, but the resolution of the fluid system. I found that fluid "leaks" out of the object (I have a bowl to "hold" the fluid"), but this problem is due to the fact that the geometry cuts some voxels in half. In this situation, if more than 50% of the voxel lies within the bowl (I think that's how it works), the voxel still contains fluid. Thus, if 60% of the voxel is within the bowl, the other 40% of the volume of that voxel will have fluid in it where it shouldn't.
I did a basic cache by doing Fluid Effects -> Create Fluid Cache. Maya saves out a file to the data folder in my project, one that is copied and renamed if the project or scene name is changed (due to saving the scene file with a new name). At this point, the fluid resolution was pretty low, and I did not have the fancy settings that Duncan used (self-shadowing, higher detailed solver), but I did have the default incandescence from temperature on. It dissipates from a glowing pink to a dark red. An example image (you can see the problem with the "leaking"):
I'm feeling pretty good about this effect, but I just need to integrate the liquid geometry in the bottle with the actual fluid effect. Then again, I could forget the geometry altogether and just have a bunch of fluid particles start out in the bottle. It will also be nice to have reference footage. I'm thinking of filling a bathtub up and dropping a small vial of blue food coloring mixed with glycerin or something to make it thicker. I'll experiment with different liquid densities and materials: water, glycerin, oil, paint etc.. That will be a fun project to film.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment