Computer Graphics Seminar MTAT.03.296 Fall 2014 Raimond Tunnel - - PowerPoint PPT Presentation

computer graphics seminar
SMART_READER_LITE
LIVE PREVIEW

Computer Graphics Seminar MTAT.03.296 Fall 2014 Raimond Tunnel - - PowerPoint PPT Presentation

Computer Graphics Seminar MTAT.03.296 Fall 2014 Raimond Tunnel Conclusion Geometry Points locations in space vertices Vectors directions Where are vectors in this picture? Polygons objects in space S o . . . ?


slide-1
SLIDE 1

Computer Graphics Seminar

MTAT.03.296 Fall 2014

Raimond Tunnel

slide-2
SLIDE 2

Conclusion

slide-3
SLIDE 3

Geometry

  • Points – locations in space – vertices
  • Vectors – directions
  • Polygons – objects in space

Where are vectors in this picture? S

  • .

. . ? : )

slide-4
SLIDE 4

Transformations

  • Matrices represent transformations:
  • Linear
  • Affine
  • Projection

? ? ? ? ?

slide-5
SLIDE 5

Transformations

  • Matrices represent transformations:
  • Linear
  • Affine
  • Projection

Affine transformation Used for perspective projection Linear transformation Translation column Point

slide-6
SLIDE 6

Transformations

  • Matrices represent transformations:
  • Linear
  • Affine
  • Projection

Affine transformation Used for perspective projection Linear transformation Translation column Point ? ? ?

slide-7
SLIDE 7

Transformations

Affine transformation Used for perspective projection Linear transformation Translation column Point

  • Rotation x, y, z by fixed angle
  • Shear x, y, z by fixed angle
  • Scaling

Preserves straight

  • lines. Parallel lines

stay parallel. Shift, move, add to coordinates

slide-8
SLIDE 8

Transformations

(

5 2 5 2 1 1) ⋅( x y z 1) =

  • What does this matrix do?

?

slide-9
SLIDE 9

Transformations

(

5 2 5 2 1 1) ⋅( x y z 1) =( 5⋅x+2⋅ 1 5⋅y+2⋅ 1 1⋅z 1⋅1 ) =( 5x+2 5y+2 z 1 )

  • What does this matrix do?

Scale x and y by 5 times Add 2 to x and y coordinates. z stays the same Point remains a point

slide-10
SLIDE 10

Shading and Lighting

  • Shading models:
  • Per-polygon shading – flat shading
  • Per-vertex shading – Gouraud shading
  • Per-fragment shading – Phong shading

W a i t , i s n ' t G

  • u

r a u d s h a d e d c u b e l i k e t h i s ? ? Which is which?

slide-11
SLIDE 11

Shading and Lighting

By default three.js uses Gouraud shading for Lambertian; Phong shading for Phong.

http://stackoverflow.com/questions/15801971/three-js-what-is-the-exact-difference-between-lambert-and-phong

Lambertian, point light Phong, point light Lambertian, directional light Per-vertex Per-fragment Per-vertex Shading Lighting http://cgdemos.tume-maailm.pri.ee/

slide-12
SLIDE 12

Shading and Lighting

What lighting model is this?

slide-13
SLIDE 13

Shading and Lighting

  • Ambient
  • Lambertian – diffuse
  • Phong – specular
  • Blinn-Phong – specular

W h a t m

  • d

e l s a r e a p p l i e d h e r e ?

slide-14
SLIDE 14

Shading and Lighting

  • What about Blinn-Phong?
  • Which angle would we use there?
slide-15
SLIDE 15

Shading and Lighting

  • Phong vs Blinn-Phong

I=LA⋅M A+n

T⋅l⋅LD⋅M D+(h T⋅n) c⋅LS⋅M S

Intensity Ambient D i f f u s e : L a m b e r t S p e c u l a r : B l i n n

  • P

h

  • n

g

slide-16
SLIDE 16

Shading and Lighting

  • Very important control question!!
  • Which surface is more brighter?

a) b)

slide-17
SLIDE 17

Shading and Lighting

slide-18
SLIDE 18

Lighting and Shading

  • Principles of Lighting and Rendering with John

Carmack at QuakeCon 2013

https://www.youtube.com/watch?v=IyUgHPs86XM

slide-19
SLIDE 19

Shading and Lighting

slide-20
SLIDE 20

Field Trip & 3D Scanning

Pointcloud in MeshLab Constructed model in Blender

slide-21
SLIDE 21

Bump Mapping

  • So what was a bump map?
  • What about a normal map?
slide-22
SLIDE 22

Bump Mapping

  • Bump Map
  • Texture of surface displacements, that won't

actually change the geometry, but allow for a different normal calculation.

  • Normal Map
  • Texture of different normals.

Why do we change the normals and not the actual surface geometry?

slide-23
SLIDE 23

Bump Mapping

https://www.shadertoy.com/view/ldjSDW

slide-24
SLIDE 24

Real-Time Water Surface Rendering

  • Water surface reflects
  • Render another scene to a buffer underneath

the water to determine the reflection

What happens with the fish?

slide-25
SLIDE 25

Real-Time Water Surface Rendering

  • What if the surface is wavy?

a) b)

slide-26
SLIDE 26

Real-Time Water Surface Rendering

  • Sample the reflection from the buffer based on

the changed direction.

https://www.shadertoy.com/view/ld2SRy

slide-27
SLIDE 27

3D Wayfinder

  • Estonian business that supplies interactive

wayfinders all over the world.

http://3dwayfinder.com/

slide-28
SLIDE 28

3D Wayfinder

Consensus on the coordinate axes directions is important!

slide-29
SLIDE 29

3D Wayfinder

Not only graphical bugs, what about finding a shortest path in an environment?

slide-30
SLIDE 30

Artist's View

  • Programmers think that artists are lazy
  • Artists think that programmers will steal their

work

slide-31
SLIDE 31

Artist's View

  • Art asset pipeline:
  • Start with high-poly model
  • Sculpt it (change shape with a brush, affecting

many vertices at a time)

  • ?
  • Convert to low-poly (retopo – remake topology)
  • Use in a game?

O p t i

  • n

a l l y s t a r t w i t h l

  • w
  • p
  • l

y a n d m a k e i t h i g h

  • p
  • l

y Just use the low-poly model in game as is? What is missing here? Enhanced Dark Engine, 1999 Did not support our mysterious thing. http://www.ttlg.com/forums/showthread.php?t=138460

slide-32
SLIDE 32

Artist's View

  • How can artists and programmers get along?
  • Mixed meetings with artists and programmers
  • Communication
  • Established pipeline
  • Avoid high-poly models in product
slide-33
SLIDE 33

Procedural Generation

  • Lot can be procedurally generated
  • Single objects

– Weapons – Trees

  • Life forms
  • Animations

Borderlands 2 Show this if there is time Starbound Overgrowth

https://www.youtube.com/watch?v=SAtwQa8t_3g

slide-34
SLIDE 34

Procedural Generation

  • Textures

From the wave sampling demo...

https://www.shadertoy.com/view/ld2SRy

Different texture based on height Texture itself generated by combination of functions Perlin noise – combination (sum)

  • f interpolations of

differently sampled random signals

slide-35
SLIDE 35

Procedural Generation

  • World

– Grid – Voxel – Tile

http://tume-maailm.pri.ee/ylikool/ScientificComputing/Project/

My water surface demo Minecraft Terraria

slide-36
SLIDE 36

Procedural Generation

  • World

Binding of Isaac: Rebirth http://bytten-studio.com/devlog/2014/09/08/overworld-overview-part-1/ Lenna's Inception. Large procedurally generated world. Perlin noise for heightmap + template rooms for buildings. http://lennasinception.com/about/

slide-37
SLIDE 37

Procedural Generation

slide-38
SLIDE 38

Texture Mapping

  • Andres, you haven't sent me your slides!
  • Texture Re-Mapping
  • Andres has a photo of a red shirt
  • He wants to generate photos of blue and green

shirts.

slide-39
SLIDE 39

Texture Mapping

  • Use an image to define the color of your object
  • Image will be mapped to your 3D object

http://gabe687.deviantart.com/art/Baked-texture-map-50600743

slide-40
SLIDE 40

Texture Mapping

  • Different lower-resolution images of the original

texture map called mipmaps. Sample from smaller resolution image if object is far away.

  • Different schemes to sample from a texture

(filter):

  • Nearest neighbour (interpolation / mipmap)
  • Bilinear
  • Trilinear
  • Anistropic

http://en.wikipedia.org/wiki/Texture_filtering

slide-41
SLIDE 41

Raphael.js

  • JavaScript library for SVG (scalable vector

graphics)

  • SVG – standard format for defining vector

graphics

Remember the tiger? http://raphaeljs.com/tiger.html

slide-42
SLIDE 42

Three.js

  • JavaScript library for WebGL and 3D graphics
  • Has the things we have learned here:
  • MeshLambertMaterial
  • DirectionalLight
  • OrthographicCamera
  • Matrix4
  • TorusGeometry
  • ...

CGLearn and CGDemos are both done with three.js https://cglearn.codelight.eu http://cgdemos.tume-maailm.pri.ee/

slide-43
SLIDE 43

Virtual Reality

slide-44
SLIDE 44

Virtual Reality

  • Virtual Reality vs Augmented Reality?
  • A lot of demanding requirements:
  • Rotational accuracy < ¼ degrees
  • Translational accuracy < 1 mm
  • At least 90 FPS
  • Less than 20 ms latency
  • More than 1k resolution per eye
  • ...

Otherwise:

slide-45
SLIDE 45

Virtual Reality

  • We tried out a couple of demos on the Oculus

Rift DK2:

  • Sightline
  • Windlands
  • Ats's Demo Game
slide-46
SLIDE 46

Virtual Reality

  • John Carmack is back!
  • Oculus Connect Keynote: John Carmack

https://www.youtube.com/watch?v=gn8m5d74fk8

slide-47
SLIDE 47

Feedback

  • How did you like the seminar organization?
  • Did you found our activities interesting / useful?

Which ones especially?

  • What would you change?
slide-48
SLIDE 48

Thanks for listening!