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

computer graphics seminar
SMART_READER_LITE
LIVE PREVIEW

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

Computer Graphics Seminar MTAT.03.296 Spring 2014 Raimond Tunnel Conclusion! Geometry & Algebra ( cos ( 0.6 ) ) cos ( 0.6 ) sin ( 0.6 ) 0 = ? 0 1 0 sin ( 0.6 ) 0 Geometry & Algebra ( cos ( 0.6 ) ) cos ( 0.6 ) sin ( 0.6


slide-1
SLIDE 1

Computer Graphics Seminar

MTAT.03.296 Spring 2014

Raimond Tunnel

slide-2
SLIDE 2

Conclusion!

slide-3
SLIDE 3

Geometry & Algebra

(

cos(0.6) −sin(0.6) 1 sin(0.6) cos(0.6))

= ?

slide-4
SLIDE 4

Geometry & Algebra

(

cos(0.6) −sin(0.6) 1 sin(0.6) cos(0.6))

= =

slide-5
SLIDE 5

Geometry & Trigonometry

slide-6
SLIDE 6

Geometry & Trigonometry

slide-7
SLIDE 7

Lighting Models

(r

T⋅v) c⋅LSpecular⋅M Specular

(n

T⋅ v+r

∣v+r∣)

c

⋅LSpecular⋅M Specular

? ? ?

slide-8
SLIDE 8

Lighting Models

(r

T⋅v) c⋅LSpecular⋅M Specular

(n

T⋅h) c⋅LSpecular⋅M Specular

Phong Blinn

h= v+r ∣v+r∣

slide-9
SLIDE 9

Lighting Models

c=0 c=30 c=300

No specular, Only diffuse Soft and wide specular Sharp and narrow specular

Phong's model I=L A⋅M A+ 1 d light

2 ⋅(n T⋅l⋅L D⋅M D+(r T⋅v) c⋅LS⋅M S)

slide-10
SLIDE 10

Physically Based Shading

f microfacet(l ,v)= F (l ,h)⋅ G(l ,v ,h)⋅D(h) 4⋅ (n⋅l)⋅ (n⋅v)

Returns how much light reflects Geometry function Distribution function Fresnel effect

slide-11
SLIDE 11

Physically Based Shading

G(l ,v ,h ,n)

  • How much light is

not blocked?

  • How much surface

is not blocked from a viewer?

  • How much points

are visible from both a viewer and a light source?

Shadowing Masking

slide-12
SLIDE 12

Physically Based Shading

  • How much microsurface normals point

towards the macrosurface normal?

D(h)

slide-13
SLIDE 13

Particle Systems

slide-14
SLIDE 14

Particle Systems

slide-15
SLIDE 15

Particle Systems

http://chrisp.gr/projects/boids/

  • Particles can have more

interesting logic (e.g. the Boids algorithm)

  • Many particles may

cause performance issues.

Unreal Engine 4

slide-16
SLIDE 16

Procedural Generation

  • Let the computer generate our content via procedures

(methods, functions, rulesets etc).

  • Particles are also procedurally generated.
  • Other things can be generated, like worlds, houses,

weapons, NPCs, trees.

Procedurally generated Terraria map

slide-17
SLIDE 17

Procedural Generation

Terraria

slide-18
SLIDE 18

Procedural Generation

  • Lindenmayer systems (1968).
  • The Algorithmic Beauty of Plants (1990)

http://algorithmicbotany.org/papers/abop/abop.pdf

  • Aristid Lindenmayer (1925 – 1989)
  • L-system – Parallel rewriting system, formal grammar
  • Deterministic 0-context L-systems
  • Stochastic L-systems
  • Context sensitive L-systems
slide-19
SLIDE 19

Procedural Generation

F → FG G →GF F F FG FGGF FGGFGFFG

Iteration 1 Iteration 1 Iteration 1 Iteration 2 Iteration 3 Ruleset Starting axiom Procedure

  • Parallel rewriting

system

  • Formal grammar
slide-20
SLIDE 20

Procedural Generation

Symbol Interpretation F Draw a segment [ Push current state into stack ] Pop state from stack + Turn 30 degrees left around z-axis

  • Turn 30 degrees right

around z-axis

Turtle graphics http://en.wikipedia.org/wiki/Turtle_graphics

slide-21
SLIDE 21

Procedural Generation

F

0.5

→ F [^ F [+F ][−F ]] F

0.5

→ F [& F [+F ][−F ]]

Ruleset

F

Starting axiom Iterations: 3 S t

  • c

h a s t i c s y s t e m

slide-22
SLIDE 22

3D Scan Data

  • Large amount of points
  • Model filled with holes and noise
slide-23
SLIDE 23

3D Scan Data

  • Remove outliers
  • Surface

Reconstruction (e.g. Poisson)

  • Reconstruct parts
  • f the surface

individually with different parameters

slide-24
SLIDE 24

3D Scan Data

  • Lower the vertex count (decimation).
slide-25
SLIDE 25

3D Scan Data

  • Export from Geomagic Studio, MeshLab, ...
  • Import into Blender
slide-26
SLIDE 26

Realtime Realistic Rendering

Motion Blur Depth of Field R e f l e c t i

  • n

s P h y s i c s OctaneRender 2.0

slide-27
SLIDE 27

Realtime Realistic Rendering

  • Voxel Octree Cone Tracing
  • NVIDIA, 2011

https://research.nvidia.com/sites/default/files/publications/GIVoxels-pg2011-authors.pdf

  • Algorithm for indirect illumination

Glossy reflections, color bleeding Indirect diffuse lighting

slide-28
SLIDE 28

Realtime Realistic Rendering

  • Voxel Octree Cone Tracing
  • Distribute radiance from light sources
  • Distribute radiance inside octree
  • For a viewed point, cone-trace indirect illumination

Images taken from the article... Maybe??

slide-29
SLIDE 29

Non-(photo)realistic Rendering

  • Cel-shading / toon shading
slide-30
SLIDE 30

Non-(photo)realistic Rendering

  • Cel-shading / toon shading
  • Quantize the colors, illumination, pixel values
  • Black border

float binCount = 6.0; frag_color.x = floor(frag_color.x * binCount) / binCount; frag_color.y = floor(frag_color.y * binCount) / binCount; frag_color.z = floor(frag_color.z * binCount) / binCount; gl_FragColor = frag_color;

F r a g m e n t s h a d e r ( + 4 l i n e s

  • f

c

  • d

e )

slide-31
SLIDE 31

Non-(photo)realistic Rendering

  • Black border
  • Any edge detection algorithm on the depth texture

and on the normal texture

Quantized render Depth texture (z-buffer) Normal vector texture Detected edges Result with black border

slide-32
SLIDE 32

Non-(photo)realistic Rendering

  • Black border
  • Any edge detection algorithm...

– Sobel (first order derivative) – Laplacian (second order derivative)

1 (1+x

10)

Butterworth

( f ∗g)[ x , y]=∑

i=−d d

j=−d d

f (x+i , y+ j) ⋅g (x+i , y+ j)

Convolution of an image with a kernel (d x d) 1 1 1 1

  • 8

1 1 1 1 1 1

  • 4

1 1

  • 1

1

  • 2

2

  • 1

1

  • 1
  • 2
  • 1

1 2 1 Laplacian kernels Use only one Sobel kernels for x and y Use both and sum absolute values from results

slide-33
SLIDE 33

Non-(photo)realistic Rendering

  • Jot, FreeStyle, ...
slide-34
SLIDE 34

Computing on the GPU

http://www.mathworks.se/company/newsletters/articles/gpu-programming-in-matlab.html

slide-35
SLIDE 35

Computing on the GPU

  • Use frame-buffer object (FBO) and do dummy rendering
  • OpenCL
  • CUDA (for NVIDIA cards)

Platform Device 1 Device 2 CPU GPU Data: [0.0, 1.0, 2.0, 3.0, ...] Data: [0.0, 1.0, 4.0, 9.0, ...]

slide-36
SLIDE 36

Computing on the GPU

slide-37
SLIDE 37

Other activities

  • Martti Savolainen

(3D Technologies)

  • Fille Mazendacus

(Tartu Art School)

  • 3D scanning

(Institute of Technology)

slide-38
SLIDE 38

The End

slide-39
SLIDE 39

The End

  • How was the seminar?
  • Did it correspond to your expectations?
  • What should we do differently?
  • Was there anything you would have like to have done

that we didn't have time for?

  • Are you joining us again next semester?