when shaders & texturescollide kevin bjorke nvidia corporation

62
When When Shaders Shaders & & Textures Textures Collide Collide Kevin Bjorke Kevin Bjorke NVIDIA Corporation NVIDIA Corporation

Upload: melvin-walker

Post on 29-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

WhenWhenShaders Shaders &&TexturesTexturesCollideCollideKevin BjorkeKevin BjorkeNVIDIA CorporationNVIDIA Corporation

Page 2: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Everybody Wants More

Page 3: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Everybody Wants More

…and Moore’s Law can’t keep up

Page 4: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Next Gen, New Challenges

“If you think you are good enough you have just started your decline.”

Simply layering-on more lights or per-pixel lighting doesn’t automatically enhance game play

What is “Next-Gen Done Right”?

http://developer.nvidia.com

Page 5: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Painters & Hackers

“Art does not reproduce the visible;

it makes thingsvisible” – Paul Klee

New Harmony, 1936

Page 6: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Painters & Hackers

“Art does not reproduce the visible;

it makes thingsvisible” – Paul Klee

New Harmony, 1936

“A videogame is not Art” – Hideo Kojima

Page 7: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Anything Can Be Painted

Painting is direct Painting can influence programs,

but in hidden ways that may be difficult to visualize

Downside: Scales Poorly

Page 8: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Anything Can Be Programmed Programming is indirect Imagery is often the result of

abstract ideas, with little direct control

Downside: programmer art

Page 9: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Great Technical Artists

Page 10: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Shaping the Subjective Experience Every pixel has

the potential and the obligation to be a deliberate choice.

© Epic Games

Page 11: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Why We MIP

Page 12: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Why We MIP

Page 13: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Stage Makeup = LOD

Makeup example courtesy

Tara Maginnis,

http://www.costumes.org

Page 14: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Stage Makeup = LOD

Makeup example courtesy

Tara Maginnis,

http://www.costumes.org

Page 15: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Sharpening on MIP levels

Page 16: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Which Size is the Right Size? UVDetective.fx

DEMODEMO

Page 17: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

The Evils Charts Can Do

Texture Atlases and charts let us remap any 3D shape to a group of 2D shapes

Page 18: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

The Evils Charts Can Do

Texture Atlases and charts let us remap any 3D shape to a group of 2D shapes

Page 19: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Making Do with Charts

The evil you see versus the evil you don’t see

Page 20: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 21: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Normals from Bumps

Page 22: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Normals from Bumps

Page 23: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

MIPs and Normal Maps

Page 24: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

MIPs and Normal Maps

Page 25: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 26: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 27: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 28: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 29: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 30: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 31: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 32: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Best Practices: Normal Maps Common, Complex, & Wrong:

Page 33: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Best Practices: Normal Maps Common, Complex, & Wrong:

Page 34: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Best Practices: Normal Maps Common, Complex, & Wrong:

Easier, Better:

Page 35: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Color & Depth

Page 36: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Color & Depth

“Facing Ratio”:(N·V)

C = lerp(mossColor, texColor,pow(dot(N,V)),expon))

Page 37: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Color & Depth

“Facing Ratio”:(N·V)

C = lerp(mossColor, texColor,pow(dot(N,V)),expon))

Page 38: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 39: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Texture Scripts in Photoshop™ “Mipster”

DEMODEMO

Page 40: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Text Mips

Page 41: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Gratuitous Equation Alert!

)()( xfxf

Page 42: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Gratuitous Equation Alert!

)()( xfxf

Filtering/AA

Lighting

Page 43: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

The Toksvig Factor

No sparklies at the edges!

Need to choose a fixed phong exponent

http://developer.nvidia.com/object/mipmapping_normal_maps.html

DEMODEMO

Page 44: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Nightfall – color control

Page 45: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation
Page 46: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Painting a Shader

1D & 2D functions

Page 47: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Painting a Shader

1D & 2D functions

Page 48: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Two Pictures = One BRDF

+ =

Page 49: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

DEMODEMO

Page 50: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Providing Sensible Controls The most harmonious

circumstance comes when these worlds intermesh

Everything really great that any of us have done has been the result of teamwork

Texture and Shading are both about color control

J. Itten, Die Begegnung, 1916

Page 51: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Brdf_paint

Let artists paint the BRDF directly…

DEMODEMO

Page 52: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Hair Functions

Use Kajiya-kay.fxh, or… roll your own!

Grayscale Color

DEMODEMO

Hair direction is… a normal map!

Page 53: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Directional Painting

Page 54: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Directional Painting

Page 55: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Even More Abstract Textures Textures as animation channels Textures to guide particle

animation/ image flow Etc….

SLIDE IN PROGRESS

Page 56: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Shading to Look Like Painting Anime Shadow

Technique

Reice with Rounded “Hand-Drawn” Shadow Shading

“Reice” courtesy Han dae Hoon, Graphic Factory, Korea

Page 57: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Render Color and Normals

RGB Raw Surface Normals

Page 58: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Blur the Normals

Blur Pass 1: Horizontal Blur Pass 2: Vertical (and optional clip to show form)

Page 59: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Composite

Hard cutoff on blurred normals = “round shadow”

Reice with Final rounded shadow outline

DEMODEMO

Page 60: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Pushing Forward

You progress not through what has been done, but reaching towards what has yet to be done

– Kahlil Ghibran

Page 61: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Pushing Forward

You progress not through what has been done, but reaching towards what has yet to be done

– Kahlil Ghibran

The market only rewards innovation– Gopal Solanki

Page 62: When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation

Resources

http://developer.nvidia.com

GPU Gems series [email protected]