24
Baked Ambient Occlusion for Fur Apurva Shah, Sajan Skaria Pixar Animation Studios 1

Apurva Shah - Baking Fur Occlusion

Embed Size (px)

DESCRIPTION

This Siggraph presentation by Pixar's Apurva Shah outlines the method used by them in Ratatouille to efficiently store fur occlusion into point clouds and convert them into 2d maps which can be later used in the fur shader.This document is only for study purpose so please do not make profit off it by selling it anywhere on the internet, etc, etc.

Citation preview

Page 1: Apurva Shah - Baking Fur Occlusion

Baked Ambient Occlusion for Fur

Apurva Shah, Sajan Skaria

Pixar Animation Studios

1

Page 2: Apurva Shah - Baking Fur Occlusion

Introduction

Self-shadowing critical for fur.

Brings out shape of the groom and adds dimension.

Deep shadows typically used for keys and rims.

Not so good for fills and bounces:

For multiple shadowing lights overlap areas tricky.

Expense especially for multiple lights.

2

Page 3: Apurva Shah - Baking Fur Occlusion

Why Ambient Occlusion

Shadow computed from the POV of occluded surface and not dependent on light position.

Short falloff distance captures groom detail like locks and clumps but not tied to particular light direction.

Overlapping shadows not a problem.

3

Page 4: Apurva Shah - Baking Fur Occlusion

Previous Work

Tim Fontenberry and Pat Conran from ILM presented “Its Not Wise to Upset a Wookiee” at Siggraph Sketches 2005.

Used half dome of lights around character and computing deep shadows for each light.

From this an ambient occlusion and preferred direction approximation was created.

4

Page 5: Apurva Shah - Baking Fur Occlusion

Raytraced Occlusion

In our approach we use raytraced occlusion.

Tracing against fur is expensive!

Need a way to bake the result such that it still preserves the fine fur detail.

5

Page 6: Apurva Shah - Baking Fur Occlusion

Basic Approach

Wait for character groom to finish.

Bind a bake shader to the fur that runs raytraced occlusion.

Shader stores the result in one of four point clouds based on parametric “v” of the point being shaded.

Index into point cloud is based on scalp (s,t) of hair.

In essence we capture striated occlusion values at tip, tip to mid, mid to root and root.

6

Page 7: Apurva Shah - Baking Fur Occlusion

Basic Approach

Point clouds converted into images using “ptrender”.

Takes care of filling gaps and blending overlapping samples.

Finally images turned into texture maps.

Baking valid as long as character groom does not change.

7

Page 8: Apurva Shah - Baking Fur Occlusion

Tip Map

8

Page 9: Apurva Shah - Baking Fur Occlusion

Tip to Mid Map

9

Page 10: Apurva Shah - Baking Fur Occlusion

Mid to Root Map

10

Page 11: Apurva Shah - Baking Fur Occlusion

Root Map

11

Page 12: Apurva Shah - Baking Fur Occlusion

Basic Approach

Ambient occlusion calculation during render time only requires two texture lookups based on scalp (s,t) and parametric “v” and a blend.

Practically free!

Per light control to decide wether to use deep shadow, ambient occlusion or a combination.

Ambient occlusion some times combined with soft body only shadow.

12

Page 13: Apurva Shah - Baking Fur Occlusion

Normal Deep Shadows

13

Page 14: Apurva Shah - Baking Fur Occlusion

Without any Shadows

14

Page 15: Apurva Shah - Baking Fur Occlusion

Occlusion - No Shadows

15

Page 16: Apurva Shah - Baking Fur Occlusion

Occlusion - Soft Body Shadows

16

Page 17: Apurva Shah - Baking Fur Occlusion

What About Motion?

Baking was done based on rest pose.

However it worked for an arbitrary pose because the occlusion distance was quite short.

This captured the fur grooming details but not the body pose.

It held up well in motion.

17

Page 18: Apurva Shah - Baking Fur Occlusion

All Lights

18

Page 19: Apurva Shah - Baking Fur Occlusion

Key with Deep Shadow

19

Page 20: Apurva Shah - Baking Fur Occlusion

Fill & Bounce - No Occlusion

20

Page 21: Apurva Shah - Baking Fur Occlusion

Fill & Bounce - Baked Occlusion

21

Page 22: Apurva Shah - Baking Fur Occlusion

All Lights

22

Page 23: Apurva Shah - Baking Fur Occlusion

Conclusion

Baking fur occlusion was the last step in the character build.

Took two to three hours and was often spread out over multiple processors.

Used pretty much through out the film any time you see a rat.

23

Page 24: Apurva Shah - Baking Fur Occlusion

Acknowledgments

Bill Reeves for wiring up the occlusion into the build.

Stefan Gronsky for testing from the lighting end.

24