Thursday, April 21, 2011

Update

Rather than talk about the piece as a whole, I deemed it more appropriate to write about the work I've been doing on each shot this past week.
My intention is get finish off the majority of the 3D by the end of the week, and spend the rest of the time fine tuning the compositing and editing and getting the audio in.
The plan is mostly on target, the two major vfx scenes are finished and rendered, leaving the rolls (which do not require perfect matchmoving, as objects will not be colliding with anything, and I can reuse dynamic effects used in other scenes) and the post-roll stand up shot, which will incorporate bricks dropping and littering the background.
I would be totally on target if it wasn't for a couple of irritating snags.  More on that later.


Wall Pull Shot Progression
Scene Reconstruction
The scene was reconstructed using the locators from the Boujou export as a guide.  The floor was recreated using my briefly tried and tested technique of evenly placing passively colliding rigid-body spheres on the ground locators, then dropping a fairly stiff simulated cloth over them. It's long-winded but it works.
The wall was quick and simple to construct, with the brick placement and texture based directly on this photograph taken at the shoot:



After a little perspective correction in order to straighten the lines to make UV placing easier, the picture was cropped, resized, and ready to be used as a texture.
Each brick has the same texture on each face, the reasoning behind this was to allow making a variation of different bricks a quick and easy process by simply dragging the UV coordinates to a different part of the brick texture.


This is the finished wall in it's entirety:



The next stage was to take the wall, and dynamically simulate it's destruction.


Dynamic Simulation
A selection of bricks in the centre of wall were made into separate dynamic objects, leaving the outer edges to be used as a passive collider.  The bricks made dynamic are highlighted here:


The process of destroying it was simple.  The activation of the dynamics on each brick is carefully timed with the action in the footage, so each "pull" turns on a few bricks.
The bricks themselves are flung out using a powerful air field situated behind the wall, and angled toward the Andrew's position in 3D space.
This is the animation of the wall on it's own:


All that was then needed was to fine tune the timing of the rigidbody activation, the power of the air field and the collision properties of the bricks in order to get the collision with the floor correct, then the simulation was baked and ready to be rendered.


Rendering
I've made the decision to render the majority of the vfx work using 3Delight.  There are a number of considerations behind this.  The main reason is that motion blur renders a lot faster than with mentalray.  Given the amount of experimentation with getting the motion correct in this piece, rendering speed is a high priority.  Other reasons for the decision are that setting up render passes and associated file destinations is a faster and easier process. I also find it's use of sets for setting up render layers to be far more intuitive and stable than relying on Maya's system alone.


Compositing
For the most part, the composition of this is simple.  These are the following layers currently present:

  • Adjustment (for preliminary, overall colour correction)
  • Footage (with a mask for foreground objects)
  • 3D composition (contains grass hit effects)
  • Brick render pass (dynamic and static, color corrected to match footage)
  • Brick shadow pass (colour corrected to match footage lighting)
  • Hole mask (used to darken the area where the hole is made)
  • Footage (main, background footage)

As the rendered material was textured using a photograph taken under the same lighting conditions the main footage, the colours neatly matched up.  An Exposure adjustment was added to the rendered bricks, pushed up a little and that was all that was required.
To avoid having to mask around Andrew in the few frames where he is in front of the wall, the wall fades in a few frames before the dynamics occur.  Given how well the colour and pattern matches, the fade is unnoticeable.


The 3D composition layer uses camera animation imported from Maya, and is currently being used to the effect of the bricks kicking up dirt and grass.  This adds some much needed physicality to the scene.
The effect itself was created in Maya using a combination of particle effects and geometry instancing.
So far there are only two variations have been required, as the effect is subtle enough to not appear repetitive.  These are the animations, one for a hit and one for a skid:

I decided to incorporate these effects in the compositing process, rather than render them all in the scene as the process was faster to implement and make changes to.  Rendering each effect in scene would have had no advantage in this instance, especially given the simplicity of them and brief period they are on screen.


The following is the current state of the shot and vfx breakdown of the scene geometry and cg components in action:

Wall To Andrew Shot Progression
Matchmoving
The footage for this was far less effective than I had originally hoped.  My initial thoughts were that there was a lot of parallax information contained in the background trees.  What I didn't take into account was that the mass of crossing branches created a constantly changing pattern.  Even after placing a number manual tracks the solve still had large problems.
Fortunately, the frames where the wall was in shot matched well and only in the subsequent parts the solve had issues.
After the wall is out of shot, a perfectly accurate solve is not necessary, as no objects rest or come into contact with the ground.  All I need for this shot is the translation and rotation to match up well enough to look convincing.

Due to the poor solve, some frames of the camera animation jumped excessively, a couple went a few hundred units away and faced the wrong direction, and toward the end a fast backwards motion occurred that shouldn't.
The camera animation was fixed through a process of editing the animation curves in the graph editor, smoothing out animation where needed, deleting wildly inaccurate key frames and scaling down the curve that caused the backwards motion.  During this I discovered that as long as the position of points on the curve retain their relative positions, large changes can be made to adjust the animation.
While time consuming, the manual adjustment was far more successful than the trial and error method I was using in boujou.


Bricks
Since this shot occurs immediately after the Wall Pull shot, the broken brick wall and individual brick assets, as well as the associated texture were reused, negating the need to replace and reposition them.
This shot also has a brief, dynamic brick blast, using the same techniques as the Wall Pull.  however, the centrepiece is a giant, murderously twirling ball of bricks flying out of the wall.
This effect was achieved through the use of particles and geometry replacement.  The particles use a similar air field to the Wall Pull shot for the initial blast, however the ball itself is held in place using a newton field, moving along a motion path carefully keyed to keep it in shot.
Parented to the newton field are a vortex and an air field to create the swirling motion and turbulence.
Even with those effects occurring on the particles, the ball still had a tendency to clump up and appear static.  I solved this problem by placing a couple of spheres along the motion path to disrupt the particles as they crossed over them.
To create a decent amount of variation, eight different bricks are using in the instancing, with the geometry initially positioned at varying angles in order to counteract any uniformity that may occur in the simulation.
In the end, this took far longer to create than it should have, as the scene became corrupted somewhere along the way, causing me to have to change the path and reattach the cached particle animation every time I opened the file.  This took me a lot of crashes and a couple of hours to figure out.
Using the same fields, and with a few parameter adjustments, fluid effects were used in order to create a dust cloud emerging from the wall behind the ball of bricks


Rendering and Compositing
To avoid having to render out both the static wall and particle bricks whenever I need to adjust the animation, both were rendered out separately.  The particle brick render pass uses the static brick wall with a surface shader applied, and zero matte opacity in order to use it as a mask for where the wall should be.


Once rendered and composited, it became apparent that areas on the bricks were being hidden from both the directional and ambient lights in the scene.  Therefore faces on the bricks became black, which looks incredibly out of place in the scene.  


This was fixed by duplicating the layer in After Effects, applying a luma key to key out anything lighter than the dark parts, than applying a level adjustment to lighten the layer.
This allowed for a quick fix without the need to re-render then entire animation and universally adjust the whole layer.


Additionally, a few bricks that hit the ground were visible behind the ball.  Given that the solve is being used without 100% accuracy, and that the landed where they should be in shadow of the tree, these bricks were very out of place.
Since they were only visible for a few frames, and only took up a small portion of the screen; the quickest way remove them was to hand paint a mask frame by frame.


Here is the current progress with this shot:

No comments:

Post a Comment