UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley...

27
UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia 3D Computer Graphics Sopa and Pipa Dead for now Bills to reduce online Piracy Tension and Issue curve online piracy The wording of the bill curved the letter of the law.. Censorship Google, Wikipedia, redit.. Blacked out the pages for a time in protest

Transcript of UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley...

Page 1: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1)

Garcia

3D Computer Graphics

Sopa and Pipa Dead for nowBills to reduce online PiracyTension and Issue curve online

piracyThe wording of the bill curved the

letter of the law.. CensorshipGoogle, Wikipedia, redit.. Blacked

out the pages for a time in protest

Page 2: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (2)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (2)

Garcia

Sharing of data between private companies, private security companies, and the US government

4/18/2013 passed in the House of Representatives.288-147

Help to prevent from cyber threats… or it’s vague and intrudes on American’s privacy.

Security companies can ask private for your data if the believe you are a threat and share with the federal government

It can happen without you finding out.

Cispa (Cyber Intelligence Sharing and Protection Act )

Page 3: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (3)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (3)

Garcia

What does this mean?

Contents from your email, facebook, browsers internet history, files and images that you have down loaded

Mail, contents in your home.. Crime..

Digital privacy is not the same!

Page 4: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (4)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (4)

Garcia

Control of information is power!Who controls

access to our DATA?

Page 5: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (5)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (5)

Garcia

3D Computer Graphics, 10 Miles UpComputer

Graphics one of the sub-fields of research in Computer Science

2D Graphics often called “graphic design”; very different

“The Last Guardian” by Johnny Yip (POV-Ray)

http://en.wikipedia.org/wiki/3D_computer_graphics

Page 6: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (6)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (6)

Garcia

3D Graphics Used In…

Film, Television, Print

Either pure CG (e.g., Pixar) or CG elements added to film plates

30 hours / frame

Video GamesBoth “in-engine”

graphics + pre-rendered cinematics

30 frames / second

“Avatar” (wikipedia) “Gran Turismo” (us.gran-turismo.com)

Page 7: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (7)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (7)

Garcia

Graphics Cards

Render capability to take millions of polygons (triangles per second.

Yielding realistic – grand turismio

30 Frames in one second

Page 8: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (8)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (8)

Garcia

Poll

Swiper (from Dora) steals all of the computers in the world and replaces them with the computers from 30 years ago (Processers were orders of magnitude slower). Which of the following could we still create?

Page 9: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (9)

Garcia

…although that line is often blurred

events.game-artist.net/scene_from_a_movie/

Page 10: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (10)

Garcia

Aside: Scenes from a Movie winner

“Blade Runner” by The Replicants

events.game-artist.net/scene_from_a_movie/winners.php

Page 11: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (11)

Garcia

Poll Answer

The Avatar Movie Since Avatar was done as “batch process (calculation not

done in real time) we could still produce it, but it would take a lot longer to render. We would never be able to get close to the amazingly fast graphic cards for rendering, disk speed and capacity to store and retrieve the assets, and powerful CPU to calculate the correct physics, motion, etc. It is not even close, that’s why video games back in the 80’s look like they did.

Avatar like photo realistic files weren’t made because the algorithms to make things look photo real weren’t invented yet! Our understanding of how natural elements (hair, cloth, clouds, leaves, etc) look and move has really advanced since then.

Page 12: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (12)

Garcia

3D Graphics : How it’s done (simplified)

Modeling

Animation

Lighting &

Shading

Rendering

web.engr.oregonstate.edu/~mjb/intro2009/

“Shutterbug Rendering

Progression” by Pixar

“Shutterbug Rendering Progression” by Pixar

“Squash & Stretch” by idleworm.com

“Procedural Wood”by Pixar

Video Graphics pipeline

Page 13: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (13)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (13)

Garcia

Modeling

Could come from◦ 3D Scanners◦ Interactive modeling◦ Model libraries◦ Procedural techniques

This also involvesRigging

◦ Attaching animation variables to model, allowing animator to control a very complex model w/a few controls

◦ Representation: Lots of options, math

“Menger Cube” by UCB Alum David Wallace (now at

LucasFilm)

www.youtube.com/watch?v=FOOynE1F4P4www.cyberware.com

Page 14: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (14)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (14)

Garcia

Video modelingUsing tools the people use in the modeling

process

Page 15: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (15)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (15)

Garcia

Animation

Could come from◦ Interactive keyframing◦ Procedural motion

Flat plane move like an ocean

◦ Motion capture This has put some

animators out of a job Used in Avatar, LotR, … VIDEO HERE

◦ Physics◦ Evolution, Rule

systemsEmotions conveyed!

◦ Humans are very good at reading bad motion

web.engr.oregonstate.edu/~mjb/intro2009/en.wikipedia.org/wiki/Motion_capturewww.youtube.com/watch?v=1wK1Ixr-UmM

Image by Hipocrite (wikipedia)

Artist find a home ( right brained peeps

Page 16: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (16)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (16)

Garcia

Animation Films

Avatarr

Page 17: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (17)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (17)

Garcia

Creature War … Animation automatic!Brian Mirtich, 1996

UCB Ph.D.◦ Thesis: “Impulse -

based Dynamic Simulation of Rigid Body Systems”

◦ Very cool work!“Creature War”

demo◦ His purpose: show

off his simulator◦ Great example of

rule-drive motion!

www.kuffner.org/james/software/dynamics/mirtich/

Creature“rules”

Page 18: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (18)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (18)

Garcia

Cart and Weebles

Cart find weeble and pushes it down

All automatic based on the five nodes

1996 Procedural or

rule driven motion

Page 19: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (19)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (19)

Garcia

Genetic AlgorithmsKarl Sims blew

away his colleagues with his 1994 seminal work on evolved creatures

web.genarts.com/karl/

evolved virtual creatures

Photo by Hank Morgan

Page 20: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (20)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (20)

Garcia

Evolved Virtual Creatures

20 years old is this work

Adaptation

Page 21: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (21)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (21)

Garcia

Lighting and Shading (and Camera…)Just like in a movie…

◦ Artist sets up lights in the shot for mood

◦ Teams of artists apply hand-drawn and procedural textures, called “shaders” Not pictures but programs There are layers of them

◦ The virtual 3D camera (and its movement) set

But “render!” instead of “action!”…

hof.povray.org/2b.html

“Harvest Time” by Gilles Tran (POV-RAY)

Page 22: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (22)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (22)

Garcia

3D Projection Basics (in Rendering)

For each frame…◦ Take 3D geometry

(and lights and surface shaders) and figure out what color each 2D pixel should be

The math is simply similar triangles

There are lots of algorithms to do this◦ “Expensive” = slower,

but quality usually higher

http://en.wikipedia.org/wiki/3D_projection

Bx/Bz = Ax/Az

Bx = Bz * Ax/Az

Page 23: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (23)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (23)

Garcia

Rendering : Global Illumination

What’s our goal?◦ Find rendering algorithms

that simulate what real light does in real world

◦ “Photo-realism”Limitations

◦ There are way too many photons to simulate all of them at once!

◦ Every technique is a different way to simulate the real world

◦ Each has costs & benefitsDirect vs. Global

Illumination“The Lovers” by Gilles Tran. (POV-Ray)

en.wikipedia.org/wiki/Global_illumination

Page 24: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (24)

Garcia

Cornell Box

RenderingPhotograph

“The Cornell Box experiments have come to symbolize our approach to physically based rendering. The Cornell box is a

simple physical environment for which we have measured the lighting, geometry, and material reflectance properties. Synthetic images of this environment are then created, and compared to images captured with a calibrated CCD camera. In this way, we

can confirm the accuracy of our simulations.”

www.graphics.cornell.edu/online/box/compare.html

Page 25: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (25)

Garcia

Direct Illumination ImageImage courtesy Henrik Jensen @ UCSD

Page 26: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (26)

Garcia

Global Illumination ImageImage courtesy Henrik Jensen @ UCSD

Page 27: UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (1) Garcia UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics.

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (27)

Garcia

UC Berkeley “The Beauty and Joy of Computing” : HowItWorks : 3D Graphics (27)

Garcia

SummaryBeauty and Joy of

Computing? You bet!The field of 3D Graphics

has transformed film, television & video games

How does it work?◦ Modeling◦ Animation◦ Lighting & Shading &

Camera◦ Rendering (film,games

different) It allows people to

exercise right and left sides of brain◦ Opportunities !!!

kevinbeason.com/smallpt/

Image by Kevin Beason