Friday 16 August 2013

Typewriter finished, and beyond!

The typewriter is finished.  It's not perfect and it needs more work but it is done.  Part of the reason for the gulf of time between my last post and this one was the frantic rush to finish it on time.  Since then the next part of the course, focusing on tracking video (which really needs about fifty updates but which will get one, soon) has been quite intense so I haven't had the energy.

But now, this morning, armed with tea, I will show off the finished product and talk a bit about what went right, and what went wrong.

First things first, the final render:



Though it's stating the obvious in the extreme; the typewriter isn't real, it wasn't in the photograph.  Through a relatively simple process of modelling, matching lighting, texturing and tweaking the render, the end result was achieved.

At the end of the first six weeks there was a presentation of sorts, in which the last six weeks' work of all of the students was gone through in the 'breakout space' on a large screen, for the other students to admire and the main tutors to critique.  This is a slightly odd process but is designed to simulate the rushes/dailies of visual effects production, in which the whole VFX crew and the director etc. will sit down and review the work to date, and the senior folk will critique it.  The critique can be very biting but is aimed at the work, rather than the artist. (That's the theory, anyway...)

The critique I received was definitely positive: great model, great render and lighting, the model sits well in the scene; nice materials.  The textures are the thing which are lacking: it looks to clean, too uniform.  I will be doing more work on it at some point, and that will be to add dirt and staining to the surface, to make it look more real.  In particular the area under the keys is too clean, and has none of the accumulated detritus of age.

It was a good experience to go through and it was great to see the sort of work which we will produce by the end of the next six weeks.

I'm now going to briefly break down the render above into its layers.  The final render is rendered in parts to make the compositing easier and to give more control over the look of the final image: if five minutes before delivery someone decides the typewriter should be blue, it's easier to change if you only have to re-render the beauty layer (or, alternatively, render colour out on a completely separate layer and adjust in post).

The beauty layer.
  We start the render with the 'beauty layer'.  This is the final render of the typewriter, the model is complete, the texturing is complete and the materials are done.  This layer has in it the typewriter alone and - in our case - any shadows it is casting on itself. (This is not always the case.)  I think this layer's pretty cool.

The backplate.
The beauty layer is laid over the backplate which is just the photograph or scene into which you want to place your model.  The lighting of the backplate is matched through means of an image-based lighting (IBL) sphere.  IBL is using an image to cast light into a scene, and is remarkably simple to do on a still image in a controlled environment.


The mirrored sphere above can be used to generate an IBL. This is an easy concept to understand: in the image above, not much can be seen out of the windows.  This isn't ideal for an IBL as you are trying to match the light coming from the windows; there is more out there than a meaningless slightly-blue blur.  So we expose a range of photos exposing all of the dark and light areas correctly.  These are merged together using a marvellous piece of software called HDR Shop.   The final solution is made up of seven or so photos at different exposures to have a wide dynamic range.  This is wrapped around the image (imagine the typewriter was veryvery small and inside the sphere, now imagine the surface of the sphere exactly as it is but pointed inwards).  That allows us to match most of the lighting pretty easily.  Some secondary lights are needed to build up the shadows.  

The alpha channel.
The next layer is just an outline of the typewriter, to make compositing easier.  This is called an alpha channel, so named because the black and white image above is stored in the alpha channel of the image file.  The alpha channel is, put simply, a measurement of how opaque the image is: black is transparent, white is opaque.  The image above, overlaid correctly on top of the beauty layer, would perfectly remove the typewriter from its surroundings.  Ignore the black bit in the middle: it's a mistake :)

The ambient occlusion.
Our old friend the ambient occlusion layer! About which I wrote in a previous update.  This layer helps us bring out the fine, small details.

Next come two shadow layers.  One in which the shadows are only those cast by the IBL solution.  (These shadows simulate the shadows coming from global illumination: light bouncing around the room.)

IBL shadow layer.

And one layer with only those shadows cast by the direct lights.  (These shadows simulate the shadows coming from the sunlight through the window.)

Direct shadow layer.
 These two layers are call the soft and hard shadow layers.  The shadow information is stored within the alpha channel of these images and has been made visible for the sake of this blog: usually this image would be totally black with the alpha channel defining areas that were in shadow or otherwise.

And last, but not least, reflections.

Reflection layer.
This one's quite self-explanatory.  The table on which the typewriter will sit is shiny, a flat surface was placed below the typewriter and made equally shiny so the reflections would match.  Somewhat ironically, the reflections aren't visible in the final image because the typewriter is on top of them.

From there it's a relatively simple process of stacking the layers together to make the final image.  This can be done using Photoshop or a marvellous piece of software I don't understand called Nuke; I'm not going into Nuke at all.

Et voila.  The above process is the basic principle by which all VFX are produced, from films to adverts and TV shows: take a backplate, build a model, match the camera angle and lighting, sit the model in the scene and add materials and textures, render.  The same can be said for moving images.  I mentioned that camera tracking was my next update and in which will explain this process, as best as I can.

No comments:

Post a Comment