maths at the movies chris budd - amazon s3 creative uses of modern mathematics this talk will show...

57
Maths at the Movies Chris Budd

Upload: nguyendieu

Post on 14-Mar-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Maths at the Movies

Chris Budd

Page 2: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

See maths in the movies in different ways

Sometimes maths in the background

Moriarty

Some movies hate maths

Page 3: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Some feature mathematicians

Page 4: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Some films are about mathematicians

Page 5: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

But without maths we could not make modern movies!

Two hundred and sixty visual effects artists at the Weta Studios worked on the Lord of the Rings trilogy

All of these used maths to do the effects!

Page 6: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

It is in the movies that we see some of the most creative uses of modern mathematics

This talk will show some of the ways that this is made possible

Page 7: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

1. Creating the Image

Is Shrek a real Ogre?

Page 8: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Here is a final image of a made up animal

How do we create and animate this?

Page 9: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Step 1: Make a wire frame with lots of triangles

A 3D scan can produce a model with as many as six million triangles making up the surface.

Page 10: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

The (x,y,z) coordinates of the vertices of the triangles and the way they are connected are stored in the computer

A = (x,y,z)

BC

Page 11: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Fewer triangles make a coarser image, which can be useful for developing the movie

Page 12: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Similar technology is used in the finite element calculations used in industrial design

Page 13: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Step 2: Rendering

Make everything nice and smooth and add skin effects

Uses ideas from computer aided design (CAD)

Page 14: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Fit a smooth surface between the points

Originally done by using non-uniform rational B-splines (NURBS)

Good method but a bit too slow

Page 15: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Now done faster by subdividing each polygonal face into smaller faces that better approximate the smooth surface.

The limit subdivision surface is the surface produced from this process being iteratively applied infinitely many times.

Page 16: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Subdivision invented by

Edwin Catmull, Jim Clark, Tony DeRose and Jos Stam

Geri’s game .. The first film to use subdivision (Pixar)

Page 17: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real
Page 18: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

What .. No hair!!!!

Page 19: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Merida's hair is made of 100,000 individual elements.

Each hair satisfies a partial differential equation (PDE). These equations are solved to recreate the correct physics

Step 3: Add fur, hair, water and physics

Page 20: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

PDEs are also solve to recreate feathers, lava, water, fire and smoke

Page 21: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Similar techniques are used to design aircraft, to forecast the weather and in medical imaging

Recreating Newtonian physics accurately is time-consuming and expensive

Movies take short-cuts to produce Pixarian physics

Page 22: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Step 4: Add Lighting effects

Use vectors to trace millions of rays from an eye to the object

If they reflect to a light source make that part of the object brighter

Page 23: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Time: 3 hours per frame, 24 frames per second in a movie

2 Hour movie needs 518 400 hours to render!

Effective but slow and expensive!

Page 24: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Uses heavy duty multi-processor parallel computers.

Power usage can cause blackouts!

Page 25: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

5. A sense of proportion: effects with real actors

How to make small things look big … ..

And big things look small

How big is this?

Page 26: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Forced Perspective

Angle at the camera is how big things appear

L

Small bridge close to the camera appears to be the same size as a large bridge further away

Page 27: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Trick: To make a large object appear small, move it further away

Gandalf

ActorHobbit

Make to make Hobbit appear smaller

Page 28: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real
Page 29: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Forced perspective produced by using a carefully designed cart

Use of props

Page 30: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Other tricks. Is this a Hobbit or a Wizard?

Page 31: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

6. Animation

The whole point of movies is that the characters MOVE and change

Page 32: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Three types of motion:

Translation

Page 33: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Enlargement (or coming closer)

Page 34: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Rotation

Page 35: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

All done using maths:

Translation: ADDITION

Enlargement: MULTIPLICATION

Rotation: MATRICES,TRIGONOMETRY,COMPLEX NUMBERS, QUATERNIONS

Need to use COORDINATES

Page 36: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Points on the plane are given by two numbers: (x,y)

x = x-coordinate and y = y-coordinate

Page 37: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

HUGE IDEA

By changing the x and y coordinates we can change the pictures

Page 38: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Old coordinates x and y

New coordinates X and Y

(x,y)

(X,Y)

Page 39: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Translation: Add numbers to each coordinate

Add 4 to x

Add 2 to y

X = x + a Y = y + b

Page 40: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Enlargement: Multiply each coordinate by numbers

Multiply

x and y

by 3

X = a x Y = b y

Page 41: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Rotations: Multiply coordinates by numbers and add them up

O

A = (x,y)

A’ = (X,Y)

= Angle of rotation

Page 42: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

This can be expressed as a matrix operation

Page 43: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Brilliant idea also used in the movies:

Turn coordinates into complex numbers

2 + 3 i

-1.5 -2.5 i

Page 44: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Complex numbers

a + b i and c + d i

We can ADD these

( a + b i ) + ( c + d i ) = (a + c) + (b + d) i

We can MULTIPLY these

( a + b i ) * ( c + d i ) = (ac - bd) + (bc + ad) i

Eg . ( 3 + 4 i ) * ( 1 + i ) = - 1 + 7 i

Page 45: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Rotations: Now become complex multiplications

O

A = (x,y)

A’ = (X,Y)

= Angle of rotation

Page 46: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

For motion in three dimensions film makers use three coordinates and more numbers

But the same ideas are used

Have to extend the idea of using complex numbers by using

Quaternions:

q = a + i b + j c + k d

Page 47: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Rules of multiplication

Page 48: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

We can use quaternions to rotate a point A = (x,y,z) about an axis (a,b,c) by an angle

If: is the start point

And: is the rotated point

Set

Then

Page 49: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

To move complicated figures: use lots more points

Page 50: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Yes .. You too could be Gollum. Andy Serkis

7. Capturing the Spirit

Page 51: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Trolls in action

Page 52: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Represent a body by a skeleton of points

Then move the points around using the mathematical formulae given earlier

Page 53: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Add flesh to the points

Page 54: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real
Page 55: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real
Page 56: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real
Page 57: Maths at the Movies Chris Budd - Amazon S3 creative uses of modern mathematics This talk will show some of the ways that this is made possible 1. Creating the Image Is Shrek a real

Interview with Tony DeRose (Pixar)

What advice would you give someone who wanted to use math to make movies?

Learn as much mathematics as you can, particularly applied math. The areas of mathematics we use most heavily today are Euclidean and affine geometry, trigonometry, linear algebra, calculus and numerical analysis. We don’t really know what the mathematical tools of tomorrow might be, so we’re counting on the next generation of employees to tell us.