My friend Paul Debevec gave a TED talk about the Emily Project! Paul is the only person I know who could condense all this information into a 6 minute talk. Brilliant!

More of Paul’s exciting work: http://www.debevec.org/

More about the Emily Project: http://gl.ict.usc.edu/Research/DigitalEmily/

I’m a man of many talents; Costume Design is not one of them. That’s why I hired my talented wife, Gretta, to be the Costume Designer on PRIMITIVE. Her job is to design and create the costumes for the Neanderthal and the 2 Cro Magnon boys.

At first we only knew the time and place: Europe, forty thousand years ago. Unfortunately there is no fashion record going back that far, so any designs we’d come up with would be pure artistic speculation. But we did have a few constraints to get us started:

  • No metal.
  • No woven materials.
  • The Neanderthal and Cro Magnon costumes had to look significantly different. I wanted the Cro Magnon costumes to be more colorful than the Neanderthal’s.

Naturally the first place we looked for inspiration is photographs of tribal people. Gretta found several good images, books, and websites:

African fashion

For the boys, we immediately fell in love with the photographs of Hans Silvester (first and second link). We decided that the boys would be camouflaged with plants, vines, and face paint. In other words, they would wear nothing made from animals.

On the other hand, the Neanderthal’s costume would be made entirely from animal materials. Or as William Lambeth puts it: “From shit he’s killed.” Whenever I think of a Neanderthal, I think of Frank Frazetta’s version–an absolute badass:

frank-frazettas-neanderthal

Gretta drew several iterations of the costume designs. The latest are posted below. (Yes, that is a bear’s head on the Neanderthal’s crotch.)

grizzly man

IMG_3290cc

Her earlier designs are posted below. We had an idea that the Neanderthal would be covered with Maori tattoos. This ideas seems unlikely at this point because the Maori patterns are too sophisticated for 40,000 years ago. However, we haven’t ruled out simpler scarification designs.

Please post your comments!

Originally I planned to have set builders create a realistic “cliff set” for the actors to interact with and then do matte painted set extensions in comp. The cliff set would be arduously sculpted and painted to look like a cliff and would take a significant portion of the budget. However, the following greenscreen test proves that I can get away with using a simple “green set” for the actors to interact with. This green set would be just a plywood set painted green. It would be easier to construct and cost much less.

Here is the final result of the test:

greenscreenTestFinal

Now let’s break it down. Why was I so afraid of having a simple green set in the first place? Take a look at the plate below. The subject is touching the screen. Which means that the subject is casting a shadow on the greenscreen and the greenscreen is bouncing light on the subject! This is basically the absolute worst case scenario for greenscreen work.

greenscreenTestPlate

So the idea here is to extract the subject element and the shadow element and comp them over some background. The first thing I did was pull two keys: one for the lighter portion of the greenscreen and one for the shadow portion.

greenscreenTestLightGreenscreen

greenscreenTestDarkGreenscreen

I color corrected the plate using Lab curves to suppress the green spill on the subject’s forehead and arm. I multiplied the two greenscreen keys together; this gave me an alpha for the subject. Then I premultiplied the color corrected plate by this alpha:

greenscreenTestOlegPremult

Now for the shadow. I multiplied the shadow key over the background at 90%, but it looked really flat and boring. So I decided to use an ambient occlusion pass; this was just a threshold of the darkest areas of the plate. I multiplied the ambient occlusion with the shadow and the shadow immediately came to life.

greenscreenTestAmbientOcclusion

greenscreenTestShadow

Finally, I comped the subject over the shadow. The edges were looking really crunchy so I blurred the edges masked by a contour pass (derived from the subject’s alpha).

greenscreenTestContour

greenscreenTestFinal

While the final result still needs a lot of roto/paint cleanup, I’m happy with the overall look. What do you think?

We held our auditions recently for the roles of the Neanderthal and the two Cro Magnon boys.

We saw about 8 actors for the Neanderthal. Out of those, only 4 were candidates. But in the end, the clear winner was Bill Oberst. He is a tremendous actor with the perfect body and face for this role. We are really lucky to work with him!

We also saw 3 boys. Only 1 was good, so we will have another audition to find more boys soon.

True story: On the day of the auditions we were looping the PRIMITIVE previs on a laptop in the actor’s waiting room. During one of the boys’ auditions, I asked the boy (who was around 10 years old): “Did you see the movie playing outside? Did you like it?” The boy said: “Yeah! It’s so funny! My favorite part is when they hit him with a stick!”

Gretta and I are now officially the proud owners of our very own production company, Primitive Artists! (Like United Artists.) We filed a Fictitious Business Name Statement with the LA County Clerk. Those of you who are fervent readers of The San Gabriel Valley Examiner will surely come across our Notice of Publication. The point of officially registering our business was so we could open a business checking account. This way we can better keep track of PRIMITIVE expenses.

Someday, the Primitive Artists logo will shine brilliantly on movie screens all across the world!!! Hopefully…

Update to yesterday’s post: Somewhere in all my image processing, the Exif metadata got lost. The Exif data is important to have when doing photogrammetry. Specifically the focal length and field of view must be known for each image.

So to get my Exif data back I used another command line program called exiftool.exe, which also comes with Hugin. I wrote a Python script to grab the Exif data from the original Jpegs and dump it to a text file. The exiftool command was something like:

exiftool -w .txt "path/to/myimage.jpg"

This creates a file called myimage.txt with all the Exif data.

Thing is, I had no idea just how much metadata Exif actually contains! Here’s an example:

ExifTool Version Number         : 7.21
File Name                       : Bracketed 472.jpg
Directory                       : D:/primitivePreproduction/TorreyPines/730PM
File Size                       : 4 MB
File Modification Date/Time     : 2009:09:04 13:05:13
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel)
Make                            : Canon
Camera Model Name               : Canon EOS DIGITAL REBEL XTi
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Modify Date                     : 2009:08:29 04:26:04
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/125
F Number                        : 4.5
Exposure Program                : Shutter speed priority AE
ISO                             : 1600
Exif Version                    : 0221
Date/Time Original              : 2009:08:29 04:26:04
Create Date                     : 2009:08:29 04:26:04
Components Configuration        : YCbCr
Shutter Speed Value             : 1/125
Aperture Value                  : 4.5
Flash                           : Off
Focal Length                    : 18.0 mm
Macro Mode                      : Normal
Self Timer                      : Off
Quality                         : Fine
Canon Flash Mode                : Off
Continuous Drive                : Continuous
Focus Mode                      : AI Focus AF
Record Mode                     : JPEG
Canon Image Size                : Large
Easy Mode                       : Manual
Digital Zoom                    : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : 0
Metering Mode                   : Evaluative
Focus Range                     : Not Known
Canon Exposure Mode             : Shutter speed priority AE
Long Focal                      : 55 mm
Short Focal                     : 18 mm
Focal Units                     : 1
Max Aperture                    : 3.6
Min Aperture                    : 22
Flash Activity                  : 0
Flash Bits                      : (none)
Focus Continuous                : Single
Zoom Source Width               : 0
Zoom Target Width               : 0
Photo Effect                    : Off
Manual Flash Output             : n/a
Color Tone                      : Normal
Focal Type                      : Zoom
Focal Plane X Size              : 23.04 mm
Focal Plane Y Size              : 15.37 mm
Auto ISO                        : 100
Base ISO                        : 1600
Measured EV                     : 2.38
Target Aperture                 : 4.5
Target Exposure Time            : 1/128
Exposure Compensation           : 0
White Balance                   : Custom
Slow Shutter                    : None
Shot Number In Continuous Burst : 0
Optical Zoom Code               : n/a
Flash Guide Number              : 0
Flash Exposure Compensation     : 0
Auto Exposure Bracketing        : On
AEB Bracket Value               : 0
Control Mode                    : Camera Local Control
Focus Distance Upper            : 5.46
Focus Distance Lower            : -0.01
Bulb Duration                   : 0
Camera Type                     : EOS Mid-range
Auto Rotate                     : None
ND Filter                       : Unknown (-1)
Self Timer 2                    : 0.1
Flash Output                    : 0
Canon Image Type                : Canon EOS DIGITAL REBEL XTi
Canon Firmware Version          : Firmware 1.0.5
Owner Name                      : unknown
Camera Body No.                 : 1220726904
Set Button Cross Keys Func      : Set: Picture Style
Long Exposure Noise Reduction   : Off
Flash Sync Speed Av             : Auto
Shutter-AE Lock                 : AF/AE lock
AF Assist Beam                  : Emits
Exposure Level Increments       : 1/3 Stop
Mirror Lockup                   : Disable
E-TTL II                        : Evaluative
Shutter Curtain Sync            : 1st-curtain sync
Magnified View                  : Image playback only
LCD Display At Power On         : Display
Canon Model ID                  : EOS Digital Rebel XTi / 400D / Kiss Digital X
Num AF Points                   : 9
Valid AF Points                 : 9
Canon Image Width               : 3888
Canon Image Height              : 2592
AF Image Width                  : 3504
AF Image Height                 : 2336
AF Area Width                   : 78
AF Area Height                  : 78
AF Area X Positions             : 8 -555 571 -931 8 947 -555 571 8
AF Area Y Positions             : 504 270 270 4 4 4 -262 -262 -496
AF Points In Focus              : 0,1,2,3,4,5,6,7,8
Thumbnail Image Valid Area      : 0 159 7 112
Serial Number Format            : Format 2
Original Decision Data Offset   : 0
File Number                     : 100-5779
Bracket Mode                    : Off
Bracket Value                   : 0
Bracket Shot Number             : 0
Noise Reduction                 : Off
WB Bracket Mode                 : Off
WB Bracket Value AB             : 0
WB Bracket Value GM             : 0
Filter Effect                   : None
Toning Effect                   : None
Lens Type                       : EF-S18-55mm f/3.5-5.6
Internal Serial Number          : H1820180
Dust Removal Data               : (Binary data 1024 bytes, use -b option to extract)
Tone Curve                      : Standard
Sharpness Frequency             : n/a
Sensor Red Level                : 0
Sensor Blue Level               : 0
White Balance Red               : 0
White Balance Blue              : 0
Color Temperature               : 5200
Picture Style                   : Faithful
Digital Gain                    : 0
WB Shift AB                     : 0
WB Shift GM                     : 0
VRD Offset                      : 0
Sensor Width                    : 3948
Sensor Height                   : 2622
Sensor Left Border              : 52
Sensor Top Border               : 23
Sensor Right Border             : 3939
Sensor Bottom Border            : 2614
Black Mask Left Border          : 0
Black Mask Top Border           : 0
Black Mask Right Border         : 0
Black Mask Bottom Border        : 0
WB RGGB Levels As Shot          : 2689 1024 1024 1290
Color Temp As Shot              : 6644
WB RGGB Levels Auto             : 2265 1024 1024 1542
Color Temp Auto                 : 4984
WB RGGB Levels Measured         : 2044 1024 1022 1562
Color Temp Measured             : 4620
WB RGGB Levels Daylight         : 2356 1024 1024 1507
Color Temp Daylight             : 5200
WB RGGB Levels Shade            : 2752 1024 1024 1251
Color Temp Shade                : 7000
WB RGGB Levels Cloudy           : 2564 1024 1024 1367
Color Temp Cloudy               : 6000
WB RGGB Levels Tungsten         : 1649 1072 1072 2482
Color Temp Tungsten             : 3200
WB RGGB Levels Fluorescent      : 2003 1037 1037 2138
Color Temp Fluorescent          : 3769
WB RGGB Levels Kelvin           : 2356 1024 1024 1507
Color Temp Kelvin               : 5200
WB RGGB Levels Flash            : 2608 1024 1024 1337
Color Temp Flash                : 6237
WB RGGB Levels PC1              : 512 1024 1024 512
Color Temp PC1                  : 4438
WB RGGB Levels PC2              : 512 1024 1024 512
Color Temp PC2                  : 4438
WB RGGB Levels PC3              : 512 1024 1024 512
Color Temp PC3                  : 4438
WB RGGB Levels Custom           : 2689 1024 1024 1290
Color Temp Custom               : 6644
User Comment                    :
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 3888
Exif Image Height               : 2592
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Focal Plane X Resolution        : 4433.295325
Focal Plane Y Resolution        : 4453.608247
Focal Plane Resolution Unit     : inches
Custom Rendered                 : Normal
Exposure Mode                   : Auto bracket
Scene Capture Type              : Standard
Compression                     : JPEG (old-style)
Thumbnail Offset                : 6144
Thumbnail Length                : 7373
Image Width                     : 3888
Image Height                    : 2592
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Aperture                        : 4.5
Drive Mode                      : Continuous shooting
Flash                           : Off
Image Size                      : 3888x2592
Lens                            : 18.0 - 55.0 mm
Scale Factor To 35 mm Equivalent: 1.6
Shooting Mode                   : Shutter speed priority AE
Shutter Speed                   : 1/125
Thumbnail Image                 : (Binary data 7373 bytes, use -b option to extract)
WB RGGB Levels                  : 2689 1024 1024 1290
Blue Balance                    : 1.259766
Circle Of Confusion             : 0.019 mm
Field Of View                   : 65.2 deg
Focal Length                    : 18.0 mm (35 mm equivalent: 28.1 mm)
Hyperfocal Distance             : 3.74 m
Lens                            : 18.0 - 55.0 mm (35 mm equivalent: 28.1 - 85.9 mm)
Light Value                     : 7.3
Red Balance                     : 2.625977

That’s a lot of data! Very useful when matching a CGI render with a real photograph.

Last week Gretta and I drove down to Torrey Pines Beach in San Diego. There we took pictures of the beautiful 300 foot sandstone cliff that stretches for miles along the beach.

The purpose of these pictures is to serve as reference for the creation of a 3D environment. The 3D environment will, in turn, become a reference for the physical cliff set that will be built. Ultimately, the physical cliff set will be seamlessly integrated with the 3D environment.

To make the modeling of the 3D environment easier and photorealistic, photogrammetry will be used. That is, landmark points will be manually placed in several images of the cliff taken from different camera positions. Then the positions of the landmark points and the positions of the camera will be automatically solved in 3D. Low resolution geometry will be constructed using the landmark points as guides. Finally, the textures will be projected onto the low resolution geometry directly from the cameras.

Because the same landmark points must be visible in more than one image, I decided to find one picturesque area of the cliff and stick with it throughout the whole shoot. I walked around this one area of the cliff and took handheld pictures of it from different camera positions. I took pictures every half hour starting at 5:30PM and ending after sunset at 7:30PM. I readjusted my white balance and exposure after every half hour shoot.

Because the pictures will ultimately be converted into highres texture maps, it was important to get the highest quality images possible. Therefore, I bracketed all my shots by 1 stop. That is, each picture was 3 pictures: underexposed, properly exposed, and overexposed. At the end of the day I had over 500 pictures of mostly the same thing.

When we got home it was time to process all these pictures. The first step of processing was to align all my handheld bracketed triples. I found a command line program called align_image_stack.exe, part of the Hugin panorama stitching package. This program automatically warps the images so that they are perfectly registered. I wrote a Python script to run all 500 images through this alignment step.

The second thing I did was generate tone mapped images from my aligned bracketed triples. That is, each bracketed triple was converted into a single tone mapped image. Tone mapping is the process of squishing down the dynamic range of an High Dynamic Range image so that it can be viewed on a Low Dynamic Range device, such as a computer monitor or photo paper. Typically, to create a tone mapped image, the bracketed pictures would first be converted into an HDR image, and then the HDR image would be tone mapped to a LDR image. I tried this but was not satisfied with the results of the HDR tone mapping. I tried several different algorithms and played with the settings, but the resulting images were just not looking natural to me.

Just when I was about to give up on tone mapping all together, I found another command line program called Enfuse.exe, also part of Hugin. Enfuse generates a tone mapped image directly from the bracketed pictures, bypassing the HDR conversion step. The algorithm is based on a paper called Exposure Fusion. I tried Enfuse on my images and loved the results! I wrote another Python script to run all my aligned bracketed triples through Enfuse. I gained the following benefits from using Enfuse:

  • Grain was significantly reduced. Especially in the images I took during sunset, when I was shooting at 1600 ISO! This is actually not so much a credit to Enfuse, but simply a result of averaging 3 images together.
  • Expanded dynamic range. In my opinion, the Enfuse tone mapping looks more natural than HDR tone mapping.

Had I known about Enfuse in the first place I would have bracketed my shots 2 stops apart instead of 1 stop apart! If you are into photography, I highly suggest you try Enfuse on your own images. If you’re not into command line programs, try the EnfuseGUI.

I now have 165 Enfused images sorted by time of day. Here are some of my favorite shots:

After speaking with several people, I’ve changed my mind about making PRIMITIVE in Standard Def  (720×405). The new output resolution will be HD720 (1280×720). We will shoot at HD1080 (1920×1080), pretending our frame is actually smaller–1280×720. This will give us a lot of room in the margins to reframe shots and add fake camera moves in post. Eventually, all shots will be scaled down or cropped to 1280×720 for VFX work.

Reasons for changing my mind:

  • Youtube can now play videos at HD720.
  • Some film festivals only accept HD work.
  • HD720 blown up to HD1080 looks fine. Already tested this.
  • A year from now Standard Def will be obsolete, if it isn’t already.
  • Tracking is easier with more pixels.
  • Luma/chroma compression ratio is better on HD cameras–better for greenscreen work.
  • Adding fake motion control is easier with lots of margin room. But if we need an even bigger camera move, we can still use the panorama technique I described in my fake motion control post.
  • HD720 is not a killer in terms of rendering or storage. It’s the perfect compromise between HD1080 and SD.
  • Bigger is better!!

resolutions

Me presenting “The Digital Emily Project: Photoreal Facial Modeling and Animation” at Siggraph 2009 with Paul Debevec, Peter Busch, and Jen-Yuan (Matt) Chiang. Around 250 people attended. Special thanks to everyone who made this course possible!

olegAtSiggraph2009

Last week I discovered something trully powerful–the Lab color space. So from now on I will do all my color correction (color grading) in Lab. I’ve made a short tutorial video explaining the basics of Lab.

If you want to take your own images to the next level, I encourage you to try Lab and find out more about this powerful color space! Here are some key points and tips:

  • The main advantage of Lab is that Lightness and color are manipulated independently. This makes color correction intuitive and efficient.
  • Lab was designed to mimic human perception of color, as opposed to RGB which was designed for electronic displays.
  • Lab naturally heightens simultaneous contrast. This is why images color corrected in Lab appear sharper than images corrected in RGB–because the colors themselves have been “sharpened”! (No, this is not the same as increasing saturation in RGB.)
  • Sharpen the Lightness channel only. Blur the a and b channels slightly to smooth out conversion artifacts.
  • Don’t take my word for it. Check out the podcasts and articles on this page.