Five of the industry’s leading fluid experts provide a selection of tips designed to help avoid that sinking feeling when simulating (and faking) fluid-filled scenes.
Movie effects and natural phenomena have always been awkward bedfellows. The real- world behaviour of fluids is almost impossibly complex, with a huge number of variables all affecting how liquids and gases move, transform, intermingle and disperse.
Then there’s the challenge of bringing such amorphous volumes to the screen. Rendering fluids, with their ever- changing densities, opacities, degrees of reflection and levels of refractivity, is something that requires many calculations to accurately trace and render. Little wonder the visual effects industry avoided CG water for so long.
Increased processing power, better renderers and regular research paper updates and breakthroughs have all helped to push the technology on, however, enabling both broadcast and film projects to benefit from spectacular effects shots featuring all-digital or digitally enhanced fluids. And like any cutting-edge technique that quickly becomes commonplace at a professional level, so the methods and tricks used to create convincing fluids have now trickled down to general user level.
Harnessing fluid dynamics in a packages such as Maya or using a dedicated off-the-shelf fluids application like RealFlow now gives any 3D artist a massive head start. But access to these tools doesn’t automatically make realistic fluids effects easily achievable. There’s also an art involved here. In part, this involves knowing which elements to focus simulation work on and which can be safely ignored or downplayed, and in part it’s about knowing when cheats and tricks will work just as effectively as more complex solutions.
Ultimately the aim is not only to create realistic-looking effects, but to do it as efficiently and painlessly as possible. Here, five experts from leading film and broadcast studios explain how to stay in control – and stay sane – when building convincing scenes of computer-generated fluid splendour.
START SMALL
When starting out with a fluid effect, it’s best to work on a low-res grid, while at the same time using the sort of resolution you think you’ll end up using. Spend time seeing what parameters you need to change to get the high-res simulation behaving the same. With this approach, you’ll see the differences you get from upping the resolution while using the same parameters; so you can iterate on the shot at a low-res, then have a good idea what parameters to alter to get the high-res sim behaving right. [GG]
TRY NOT TO SIMULATE
Try to make as few things dependent on the simulation itself as possible. Use plug-ins and tools for getting the rough fluid shape out of some geometry, or for pushing fluids around with regular meshes an animator can work with. You can get something that has the look of a fluid by doing an initial fluid sim that’s moving roughly the way you want, then caching that fluid and switching to particles. You make the cached fluid push the particles about, but any tweaks to the movement can come from doing the rest of the effect with particles that get driven by additional fields, meaning more interactive tweaks to the movement. [GG]
KEEP IT SIMPLE
Sometimes the easiest way to create a fluid sim is to tell your 3D application explicitly where the fluid should go. Rather than trying to capture everything using a simulation, you can instead hand-sculpt movement to an extent. Try painting a 2D grid with velocity vectors to create a template, then applying this as a force to the 3D sim. [GG]
GO FAST, THEN CLEAN UP
Running fast simulations and then cleaning them up makes it possible to get more shots into dailies. But tweaking simulations to run as fast as possible can create an unwanted side-effect: particles might not ‘find’ surfaces and so appear to teleport through them. Strategically placing kill objects at major leak points can be used to catch most of these, while a script to kill off very high-velocity particles will provide further clean-up. Any remaining ones can simply be painted out in comp. [SC]
CONSIDER ANGLES
One of the most important things with water is to get the reflective and transmitting qualities right. Water reflects light to a different degree depending on the angle it hits the surface. When looking down at a clear, shallow lake, for example, you should be able to see straight down to the bottom; but when looking across, the surface becomes more mirror-like as the distance increases. This is because light striking at oblique angles will be reflected, and light striking head-on will be refracted. In 3D, this is determined by a Fresnel function, which can be easily applied whether you’re putting your own shader together or using an off-the-shelf one. Within mental ray, for example, this can all be done with the mia_material under the brdf section. [DS]
DISPLACE FOR FREE
For the displacement of surface water, the usual trick is to layer up several noise patterns at reducing amplitudes – each of which approximates the shape of waves – but to vary their alignment with each other to represent different smaller wind forces and localised currents acting on the water surface. Alternatively, an open-source application such as the Houdini Ocean Toolkit will give superior high-end ocean displacement. [DS]
DIVIDE TO CONQUER
When trying to coax particles through small, tight regions, such as through a network of enclosed chambers and pipes, it’s sometimes easier to close off areas by building invisible walls, then positioning corresponding emitters in this position, with settings tweaked for that particular region of geometry. [SC]
FAKE FOAM
Foam can be difficult to create using a simulation, so instead consider using textures to create surface foam. Placing layered projection textures onto geometry that matches the displacements obtained at render time (again, a package like Houdini Ocean Toolkit can be used for this) will give a foam effect that deforms with the water surface as it moves. [DS]
SIMPLIFY SPRAY
Get around the problem of needing a large number of particles to give good definition of spray by using a flocking system to make particles coalesce to form globules. This gives a better impression of liquidity than just a simple particle spray simulation. By running a low-density simulation, involving collisions and other expensive calculations, then passing its motions on to a much larger number of particles, it’s also possible to obtain very granular renders without the simulation overhead. [DS]
MAKE YOUR WATER WHITE
In nature, quickly moving water is usually not crystal clear: in fact, it’s usually very white and opaque. Fast-moving water entrains a lot of air as fine bubbles, becoming foamy almost instantly – and foam has amazing light-scattering properties. So when shading CG water, remember that foam is common – in a lot of situations, it’s nearly 100 per cent of what you see. [MS]
RENDER SPRAY
When it comes to rendering spray, the ‘whitened’ appearance that everybody knows comes from the layering up of refraction and reflection, where millions of reflective/refractive surfaces add together like tiny mirrors to form a perfect diffuse reflection – in other words, white. With a renderer such as mental ray, something close to this can be achieved with mia_material. [DS]
USE PRACTICAL FOAM ELEMENTS
If the water is lit from below, you may find you’ll need shaders that involve a lot of subsurface scatter, but otherwise you can save a lot of render time by using practical shots of foam for texture-mapping your white water instead. [MS]
THINK 2D
It can sometimes be useful to use a rendered 3D simulation as a texture map. Think of dense clouds of bubbles rising to an ocean surface, as seen from above the surface. Because of the depth queue in the water, the dense cloud can only be seen to a shallow depth. A true particle simulation of the dense bubble cloud may require very high counts and be difficult to control. Instead, render a variety of much smaller fluid-smoke or fluid-particle simulations to animated textures from the approximate perspective of the camera and with appropriate depth queue. Then map these animated textures onto the water’s surface mesh. Since the depth queue is rendered into the animated textures, the illusion of fine bubbles as particles rising through the depth will be maintained. [JC]
BLEND IN 2D
Consider two opaque liquids being mixed together in a vat. Rather than a complex 3D simulation, use a 2D height field wave simulation to deform a surface mesh, and a 2D fluid simulation to create an animated texture map that mixes diffuse colours of the two liquids to apply to the surface mesh. [JC]
CHEAT!
For small running streaks, it’s often quicker to use a consumer progressive-scan video camera to shoot a real, dark-coloured liquid droplet running down a sheet of white poster board, preferably with a matte finish. It’s fairly easy to generate an alpha channel from the luminance. Then map your streak onto your mesh or grid-warp it into your comp as needed. If you want the streak to turn, you can simply turn the poster board as the droplet runs. Remember to add some tracking markers for stabilisation. [JC]
The Experts
MARK V STASIUK
A CG supervisor and co-founder of Fusion CI Studios, Mark’s credits include The Guardian, Poseidon and Primeval
GAVIN GRAHAM
A CG supervisor at Double Negative, Gavin’s credits include Stardust, Harry Potter and the Goblet of Fire and Doom
SAM COLE
Sam is a TD at Fuel VFX. His credits include Charlotte’s Web, The Painted Veil and House of Flying Daggers
JAMES COULTER
James works in Frantic Films’ R&D department. His credits include Final Destination 2, Blade: Trinity, and Superman Returns
DAN SEDDON
Dan is a TD at Framestore CFC. As well as his broadcast credits, his film credits include Alien vs Predator, Troy and Blade II
Source Here
1 comment:
Thanks for sharing,very informative
Post a Comment