Administrative notes February 15, 2018 Our final exam date is out! - - PowerPoint PPT Presentation

administrative notes february 15 2018
SMART_READER_LITE
LIVE PREVIEW

Administrative notes February 15, 2018 Our final exam date is out! - - PowerPoint PPT Presentation

Administrative notes February 15, 2018 Our final exam date is out! April 17, 2018 @ 3:30PM (Rooms TBD) Reminder: Project proposal due tomorrow! Reminder: In the news call #2 (due Feb 28) Exercises and previous midterm 2s


slide-1
SLIDE 1

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Administrative notes February 15, 2018

  • Our final exam date is out!
  • April 17, 2018 @ 3:30PM (Rooms TBD)
  • Reminder: Project proposal due tomorrow!
  • Reminder: In the news call #2 (due Feb 28)
  • Exercises and previous midterm 2s posted
  • Reading break is next week! We don’t have

lectures, labs, or office hours

  • Image representation lab (if you are not done) is

due at the start of your next lab, not next week

slide-2
SLIDE 2

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Previously…

We talked about bitmap images

slide-3
SLIDE 3

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

4 3 2 1 0 1 2 3 4

We’ll use two axes

  • X axis numbered 0, 1, … from left to right
  • Y axis numbered 0, 1, … from bottom to top

X Y

Previously: Vector Images Example

slide-4
SLIDE 4

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

4 3 2 1 0 1 2 3 4

X Y

first dot x,y second dot third dot fourth dot fifth dot

2,1 , 1,2 , 2,3 , 3,2 , 2,1

Previously: Vector Images Example

slide-5
SLIDE 5

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Vector Image Representation

  • Add width and colour of lines
  • Use curves instead of lines
  • Add shading to objects
  • Specify which objects overlay others

extensions of basic approach

98

slide-6
SLIDE 6

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

first dot x,y,colour, thickness second dot

1 2,1, FF,6 , 1,2,00,2, …

Vector image representation Example

What if we also want to control line colour and thickness (relative to the grid size)?

  • Use hex colour code
  • Introduce a new convention to

measure line thickness (e.g. “pt”)

4 3 2 1 0 1 2 3 4 dimension

  • f the grid

(in cm) colour and thickness

  • f first line
slide-7
SLIDE 7

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

100

Mapping a vector image to a bitmap display Consider a red line on a white background

Changing from a shaped based representation (e.g., vector, 3D model) to a bitmap image is called

  • rasterization. Here’s one approach:

Scale: first, scale the line representation to match the display area size (thickening the line accordingly) Map: imagine laying the screen on top of the line

  • colour each pixel that lies fully on top of the line red
  • colour each pixel that does not lie on the line white
  • colour each pixel that lies partly on the line pink
slide-8
SLIDE 8

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

4 3 2 1 00 1 2 3 4 0 1 2 3 4 4 3 2 1

Mapping a vector image to a bitmap display Consider a red line on a white background

slide-9
SLIDE 9

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Why is a pixelated look avoided with vector representation?

4 3 2 1 00 1 2 3 4 0 1 2 3 4 4 3 2 1

When we repeatedly zoom in, we run the "scale then map" algorithm repeatedly!

slide-10
SLIDE 10

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Image representation formats

Vector graphics:

  • CGM (Computer Graphics Metafile)
  • SVG (Scalable Vector Graphics)
  • AI (Adobe Illustrator Artwork)

Bitmap (raster) graphics:

  • JPEG (Joint Photographic Experts Group; lossy compression)
  • TIFF (Tagged Image File Format; may use lossy or lossless)
  • GIF (Graphics Interchange Format): limited palette, supports

animation

slide-11
SLIDE 11

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Image representation formats

As with .docx and .txt files, image files of different types have distinguishing header information, enabling applications to interpret the representation (or decline to open the file)

slide-12
SLIDE 12

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

What representation is used for PDF documents? Clicker question

  • A. Bitmap images
  • B. Vector images
  • C. It depends
slide-13
SLIDE 13

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

106

What representation is used to photocopy documents? Clicker question

  • A. Bitmap images
  • B. Vector images
  • C. It depends
slide-14
SLIDE 14

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

  • A. Bitmap images
  • B. Vector images
  • C. It depends

What representation is used by 3D printers? Clicker question

slide-15
SLIDE 15

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Animation history

Let’s take a moment to look at what hand drawn animation looks like: https://www.youtube.com/watch?v=nwZEcdBML LU&t=00m37s Pay attention to the snow and the hair and clothes (we’ll be discussing this in groups shortly)

slide-16
SLIDE 16

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Exercise in groups

List some of the characteristics of the snow in this scene. List some characteristics of the hair and clothes For both:

  • What does it look like?
  • Does it behave like real snow/hair/clothes?

How yes, and how no?

slide-17
SLIDE 17

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Snow characteristics

  • Different texture than what you expect from

real snow

  • Too clumpy/too flowy to be real snow
  • The colours were blue/lavender and didn’t

look like real snow

  • Beast made the snowball too easily
slide-18
SLIDE 18

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Hair and clothing characteristics?

  • Clothes were all one solid colour
  • Spot indicating highlight on lips would move

depending on where she’s facing

slide-19
SLIDE 19

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

First Disney computer animation, 1991

Ballroom scene in Beauty and the Beast https://www.youtube.com/watch?v=xDUhINW3SPs&t =01m01s Note that Belle and the Beast are still both hand drawn – it's only the background that is computer animated Before they enter the ballroom is all hand-drawn.

slide-20
SLIDE 20

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Group exercise

List at least one difference between the hallway (hand drawn animation) and the ballroom (computer animation) that may be related to the change in technologies used and guess as to why Do you think that computer animation adds artistic value here?

slide-21
SLIDE 21

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Differences between hallway and ballroom scenes

  • Ballroom was really shiny
  • Pillars look more 3D as compared to dancing

people

  • Looks like you have a drone in there

swooping around

  • Frame rate difference — choppy
slide-22
SLIDE 22

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Artistic value of computer animation? Your thoughts

  • Difference in fluidity of dancing; accentuates

the difference between Belle/Beast and the background ( + )

slide-23
SLIDE 23

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

How did they do it? Computer graphics in Beauty and the Beast

  • 3D computer model of the ballroom (using software

from a Canadian company, called Alias, which later became Maya).

  • The camera movement sequence and timing is

determined (by the artists) via the computer model

  • This sequence is used to automatically "render" the

background of each frame (using Renderman software from Pixar)

  • Rendering: converting a 3D model to a 2D bitmap

image, addressing, e.g. which objects are visible in the scene?

slide-24
SLIDE 24

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Let’s take another look at snow

Monster’s Inc. (2001): https://www.youtube.com/watch?v=fqwXB-SbY2o&t=4m05s Computer generated snow, but they did not focus on snow

slide-25
SLIDE 25

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Group exercise

Compare the snow and hair (no clothes!) here with the snow in Beauty and the Beast.

  • List some technical similarities (note: “it is

white” is not the level we’re looking for) and differences

  • List ways that it is still unrealistic
slide-26
SLIDE 26

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Compare snow in Beauty and the Beast vs. Monsters, Inc.

  • Looks better but not super realistic (very blue

when he goes off the ledge)

  • Looks overall more realistic
  • More movement (flurries moving around)
slide-27
SLIDE 27

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

How did they do it? Computer graphics in Monsters Inc.

  • Physics-based modeling: simulation of physical systems to

model fluid or deformable matter, such as hair, clothing, smoke, fire. (Each strand of hair is individually modeled!)

  • New "rasterization" techniques for rendering (converting a 3D

model to a 2D bitmap image), that can account for how textures and different types of light sources affect colour and light intensity at each pixel

  • Much more computing power needed using specialized

graphics processing units

  • https://www.youtube.com/watch?v=xmyZWCbKtss
slide-28
SLIDE 28

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Perspective on computer animation vs story in Monsters Inc.

The biggest challenge throughout the production was the story [...] I think that will always be the case. At Pixar we place a great deal of emphasis on story and the characters. You can have some really stunning imagery and technical innovation, but after about 5 minutes the audience is bored and they want something more interesting – story. You're asking people to commit an hour and a half of their life and it better be something worthwhile.”

  • Pete Doctor, Director
slide-29
SLIDE 29

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Our final discussion of snow brings us, of course, to Frozen

slide-30
SLIDE 30

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Group exercise

Compare and contrast the snow you saw in Frozen with the snow in Monsters, Inc. https://youtu.be/QYFfgARlsls?t=55 (play to 1:27)

  • You can see individual snow particles
  • Snow looked a lot more real (some looked

like soft powder, some looked like ice)

slide-31
SLIDE 31

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

How did they do it? Computer graphics in Frozen

"Snow dynamics are amazingly beautiful yet

  • varied. Whether it is powder snow fluttering in a skier’s

wake, foot steps shattering an icy snow crust or even packing snow rolled into balls to make a snowman, it is snow’s rich repertoire that makes it simultaneously compelling for storytelling and infuriatingly difficult to model on a computer.”

  • -- Alexey Stomakhin et al.,

"A material point method for snow simulation” (published in SIGGRAPH, a major graphics conference)

https://www.math.ucla.edu/~jteran/papers/SSCTS13.pdf

slide-32
SLIDE 32

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

How did they do it? Computer graphics in Frozen

  • Sophisticated physics based modeling of snow’s

solid and fluid properties relies on:

  • Modeling many very small particles of snow, controlling

the properties of the particles such as strength, viscosity (gooeyness – clumping again!) or hardness

  • velocity and direction of particles depend on properties as

well as collisions with other particles or objects

https://www.youtube.com/watch?v=O0kyDKu8K-k

  • Use of "renderfarms" – 30,000 specialized graphics

processors working in parallel to render frames

slide-33
SLIDE 33

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Computer graphics research at UBC

Robert Bridson (now at Autodesk): physics based simulations of fluids, smoke, cloth.

Movie credits for The Hobbit: An Unexpected Journey, The Adventures of Tintin, The Rise of the Planet of the Apes, and Inkheart; his liquid effects software has been used in many many other films https://www.youtube.c

  • m/watch?v=Mo-

U5iOinM8&t=01m07s

slide-34
SLIDE 34

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Computer graphics research at UBC

Alla Sheffer: 3D modeling, physics-based cloth simulation

slide-35
SLIDE 35

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Computer graphics research at UBC

Michiel van de Panne: vector-based 3D animation; human and animal motion https://www.youtube.com/watch?v=pgaEE27nsQw

slide-36
SLIDE 36

Computational Thinking www.ugrad.cs.ubc.ca/~cs100

Learning Goals Revisited

  • CT Building Block: Define the RGB colour specification,

explain its basis

  • CT Building Block: Define “bitmap image” and “pixel” and

explain how to construct a bitmap image representation

  • CT Building Block: Define “vector image” and explain how

to construct a vector image representation

  • CT Building Block: Compare and contrast the suitability of

bitmap and vector representations for different uses of images

  • CT Impact: Students will be able to describe what

differences are made possible by using hand drawn vs. computer animation

129