Friday, December 14, 2007

Albino Frogs & Occlusion Shadows

Here’s a study from life of a giant albino bullfrog from an aquarium. The creature was the size of a plucked chicken, and about the same color. He held still for twenty minutes while I did this study.

I drew him in pencil on gray mat board, and then laid a milky wash of opaque watercolor over his whole body, saving the brightest whites for the accents and highlights. When the overall light wash was dry, I added the dark accents in pencil. These include the pupil of the eye and the places where forms push together in the folds and wrinkles.

Lighting specialists in the 3-D CG animation field call these dark places “occlusion shadows.”

Wherever two forms touch each other, or a form touches a floor, a dark line or accent results. You can see the effect by pressing your fingers together and looking at the little dark line where they touch. Not much light makes it to that point of contact. You’ll also notice it gets darker in the inside corner of a room where the walls meet.

Computer lighting programs don’t create this dark accent automatically. Until recently it had to be added by hand. But software pioneers have recently made lighting tools that can anticipate when the light will be occluded and such an accent will appear.

As a traditional oil painter, I'm fascinated by such new terminology and visual analysis developed my brother artists in the CG arena. I wonder if one of you who is familiar with 3-D CG lighting might be willing to comment on the challenges presented by occlusion shadows.

13 comments:

Anonymous said...

It must take a lot of practice to gain so much control of a brush. I find that I am usually only able to achieve so much detail with charcoal pencils.

Anonymous said...

I do a bit of work with 3d programs, and the fundamental thing one has to learn is that light doesn't bounce, nor is it stopped particularly evenly. Since ambient lighting in the real world is mostly caused by light bouncing from surfaces, or refracting through matter, rather than directly from a light source, this means that to create the effect of one light source in reality, you must use many, many lights in a 3d program (not sure about the super high end gear that film studios use though). Occluding light is very hard to do, as most of the algorithms that calculate exactly how to place light within a scene cannot manage that degree of accuracy without you fiddling with it for hours and spending hours more rendering.

However, I'm very much an amateur, not a professional in the field, and I'm sure the masters of the art have quite a few ways of accurately getting proper occlusion. It's not impossible, but very difficult.

Anonymous said...

hey james,

if the tour is over does it mean that your blog is over too?

and if so will you be blogging any more in the future? or even just off and on?

the insight into your work is awsome, and it seems you have become quite a blog addict, haha, good! more details and insight for us!

thanks!

Anonymous said...

Yes, I plan to keep blogging daily, even though this part of the journey is over.

Anonymous said...

Hey James,

I failed to mention the other night that my brother works full-time as a professional artist in the 3-D CG field. I'll see if I can get him to make a comment on that.

joshsukov.com said...

Hi James, I'm Ezra's brother and would be happy to talk occlusion!

I think maybe the biggest challenge for CG artists has just been waiting for the computer to calculate it. But that's getting so much better now. Modern software makes such shadowing so easy it can feel like cheating. For artists it can almost be as easy as clicking a button to enable such shadowing.

In traditional CG a single light simulating the sun would not "bounce" off the CG ground and reflect soft shadowed light up under the eaves of a CG house. Nor would the blue CG sky cast any soft shadowed blue light into shaded areas.

You could fake the effect with multiple lights (as someone commented above), but with modern rendering technology you can skip that and actually render without a single traditional CG light at all. The below image was rendered with all illumination coming from a single High Dynamic Range Image photograph which captures a wide contrast range of light from a real world location. http://www.joshsukov.com/HDRI_lighting.jpg

HDRI photos can cast light into your rendering from 360 degrees in every direction including different colors that were captured such as blue sky or green grass. One downside to it is that artist control is somewhat limited by the captured imagery that is generating light. However, there are other lighting approaches with more control which still utilize occlusion shadowing.

Anyway, suppose I've rambled enough.

P.S. James, our family loves your books!

Stephen James. said...

The frogs from The Artist guide to sketching. The animal chapter right?

Anonymous said...

I'm also a 3D artist who uses both occlusion shadows and HDRI lighting on a daily basis, and I thought I'd provide a quick sample as well.

I'm making a series of commericals featuring talking snails, and when the animation is finished, the final result is output into many different image layers which are then combined to create the final image. Occlusion shadows is only one of these layers.

Here's an image of the snail sitting in the garden. This is the most basic layer, called the 'beauty pass'. The snail is lit using HDRI lighting as Joshua explained for the bounce and reflected light, and is supplemented by traditional 3D lights as thereisnosaurus explained. Then the snail is placed over a photographed background. This is before any other layers are applied:

http://www.whiteiron.tv/bin/abilawchuk\Snails_BEAUTY.jpg

This is what the Occlusion pass looks like on its own, demonstrating the effect that James described:

http://www.whiteiron.tv/bin/abilawchuk\Snails_OCCONLY.jpg

Here are both layers combined together, but it's still not done:

http://www.whiteiron.tv/bin/abilawchuk\Snails_AMBOCC.jpg

Here's both layers with an additional layer of shadows cast from my supplimental 3D lights:

http://www.whiteiron.tv/bin/abilawchuk\Snails_SHADOW.jpg

That's near to completion, but there are many other layers that would go into the final as well. Specular highlight and reflection layers, for example.

Whew! Hope that helps illustrate and tie together what James, thereisnosaurus, and Joshua said! Hopefully someone will read this, too!

Anonymous said...

Great explanation, Thereisnosaurus, Joshua, and AaronZoom. I'm sure other painters like me appreciate the time all of you put into telling--and showing--how you do it in 3-D digital. It's fascinating to click back and forth on the snail images and see how the image goes together.

Anonymous said...

This is one of the first posts that I have read on your blog and it's great! I'm definitely putting your link in my "daily" list. :)

As for the subject, I'm an 3D artist that works in the video game industry as a lighter and pretty much what has been said above is spot on.

The only thing I can add is that now real-time lighting for games is adding a new twist to how to create ambient occlusion shadows.

Instead of rendering and compositing a frame for final output like in film, the programmers in the game industry are starting to develop methods to create ambient occlusion in real-time in game worlds.

What happens is that any polygon that meets another polygon (or gets in close proximity to it) they both receive a slight darker shadow in a post process (after everything is rendered in the scene). Examples would be a character stands near a wall it or a basket of fruit falls the ground.

You can tweak the effect so that you can have darker or larger gradients creeping up on the objects. Pretty fun to see in real-time in a game. :)

Anonymous said...

The giant albino frogs can not be compared with other species of frogs. Definitely are my favorite. I've heard they possess a similar effect such as the Viagra Online, they secrete a kind of liquid that makes men improve their sexual desire.

James Gurney said...

Peter, I have to leave your spammish comment up just because it is so audaciously creative.

Kryzon said...

The theory behind this phenomenon is that when a ray of light goes into a crease, such as your pressed fingers, it bounces around a lot and in each bounce it loses energy, since part of the energy of the ray is absorbed by the surfaces upon contact.
This causes creases and corners etc. to be dark.

But the logic is perhaps the same as any other lighting scenario: if light doesn't reach a place, tha place is dark.

What's employed in CG is an approximation of this behaviour, deliberately darkening tight corners, creases and areas of close contact. It uses a not so realistic algorithm to represent a realistic behaviour of light.
https://www.blender.org/manual/render/blender_render/lighting/ambient_occlusion.html