computer graphics seminar
play

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


  1. Computer Graphics Seminar MTAT.03.296 Spring 2014 Raimond Tunnel

  2. Conclusion!

  3. Geometry & Algebra ( cos ( 0.6 ) ) cos ( 0.6 ) − sin ( 0.6 ) 0 = ? 0 1 0 sin ( 0.6 ) 0

  4. Geometry & Algebra ( cos ( 0.6 ) ) cos ( 0.6 ) − sin ( 0.6 ) 0 0 1 0 = sin ( 0.6 ) 0 =

  5. Geometry & Trigonometry

  6. Geometry & Trigonometry

  7. Lighting Models ? T ⋅ v ) c ⋅ L Specular ⋅ M Specular ( r ( n ∣ v + r ∣ ) c T ⋅ v + r ? ⋅ L Specular ⋅ M Specular ?

  8. Lighting Models Phong T ⋅ v ) c ⋅ L Specular ⋅ M Specular ( r c ⋅ L Specular ⋅ M Specular ( n T ⋅ h ) Blinn h = v + r ∣ v + r ∣

  9. Lighting Models I = L A ⋅ M A + 1 2 ⋅ ( n c ⋅ L S ⋅ M S ) T ⋅ l ⋅ L D ⋅ M D +( r T ⋅ v ) Phong's model d light c = 0 c = 30 c = 300 Sharp and narrow specular Soft and wide specular No specular, Only diffuse

  10. Physically Based Shading Distribution function Geometry function Fresnel effect f microfacet ( l ,v )= F ( l ,h )⋅ G ( l ,v ,h )⋅ D ( h ) 4 ⋅ ( n ⋅ l )⋅ ( n ⋅ v ) Returns how much light reflects

  11. Physically Based Shading G ( l ,v ,h ,n ) Shadowing Masking ● 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?

  12. Physically Based Shading D ( h ) ● How much microsurface normals point towards the macrosurface normal?

  13. Particle Systems

  14. Particle Systems

  15. Particle Systems ● Particles can have more interesting logic (e.g. the Boids algorithm) ● Many particles may cause performance issues. http://chrisp.gr/projects/boids/ Unreal Engine 4

  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

  17. Procedural Generation Terraria

  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

  19. Procedural Generation Procedure Ruleset Starting axiom F → FG F F G → GF FG Iteration 1 Iteration 1 Iteration 1 FGGF ● Parallel rewriting Iteration 2 system ● Formal grammar FGGFGFFG Iteration 3

  20. Procedural Generation Symbol Interpretation Draw a segment F 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

  21. Procedural Generation S t o c h a s t i c s y s Ruleset t e m 0.5 → F [ ^ F [+ F ][− F ]] F 0.5 → F [ & F [+ F ][− F ]] F Starting axiom F Iterations: 3

  22. 3D Scan Data ● Large amount of points ● Model filled with holes and noise

  23. 3D Scan Data ● Remove outliers ● Surface Reconstruction (e.g. Poisson) ● Reconstruct parts of the surface individually with different parameters

  24. 3D Scan Data ● Lower the vertex count (decimation).

  25. 3D Scan Data ● Export from Geomagic Studio, MeshLab, ... ● Import into Blender

  26. Realtime Realistic Rendering R e f l e c t Depth of Field i o n s s c i s y h P Motion Blur OctaneRender 2.0

  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

  28. Realtime Realistic Rendering ● Voxel Octree Cone Tracing Maybe?? ● Distribute radiance from light sources ● Distribute radiance inside octree ● For a viewed point, cone-trace indirect illumination Images taken from the article...

  29. Non-(photo)realistic Rendering ● Cel-shading / toon shading

  30. Non-(photo)realistic Rendering ● Cel-shading / toon shading ● Quantize the colors, illumination, pixel values ● Black border F float binCount = 6.0; r a g ( m + 4 e n l i t n frag_color.x = floor(frag_color.x * binCount) / binCount; s e h s a o frag_color.y = floor(frag_color.y * binCount) / binCount; d f e c r o frag_color.z = floor(frag_color.z * binCount) / binCount; d e ) gl_FragColor = frag_color;

  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

  32. Non-(photo)realistic Rendering ● Black border Butterworth √ 1 ● Any edge detection algorithm... 10 ) ( 1 + x – Sobel (first order derivative) – Laplacian (second order derivative) Convolution of an image with a kernel ( d x d ) d d ( f ∗ g )[ x , y ]= ∑ ∑ f ( x + i , y + j ) ⋅ g ( x + i , y + j ) i =− d j =− d Laplacian kernels Sobel kernels for x and y 1 1 1 0 1 0 -1 0 1 -1 -2 -1 1 -8 1 1 -4 1 -2 0 2 0 0 0 1 1 1 0 1 0 -1 0 1 1 2 1 Use only one Use both and sum absolute values from results

  33. Non-(photo)realistic Rendering ● Jot, FreeStyle, ...

  34. Computing on the GPU http://www.mathworks.se/company/newsletters/articles/gpu-programming-in-matlab.html

  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, ...]

  36. Computing on the GPU

  37. Other activities ● Martti Savolainen (3D Technologies) ● Fille Mazendacus (Tartu Art School) ● 3D scanning (Institute of Technology)

  38. The End

  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?

Recommend


More recommend