Week 13 - Friday Impostors Image processing Lens flare and bloom - - PowerPoint PPT Presentation

week 13 friday impostors image processing lens flare and
SMART_READER_LITE
LIVE PREVIEW

Week 13 - Friday Impostors Image processing Lens flare and bloom - - PowerPoint PPT Presentation

Week 13 - Friday Impostors Image processing Lens flare and bloom Motion blur Fog Most of the work we've focused on all semester is doing rendering that in some way mirrors the natural world However, a wide area of


slide-1
SLIDE 1

Week 13 - Friday

slide-2
SLIDE 2

 Impostors  Image processing  Lens flare and bloom  Motion blur  Fog

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8

 Most of the work we've focused on

all semester is doing rendering that in some way mirrors the natural world

 However, a wide area of rendering

is non-photorealistic rendering (NPR)

 Goals:

  • Simplified technical drawings
  • Simulating artistic styles
slide-9
SLIDE 9

 The most common form of NPR in

video games is toon shading

  • Also called cel shading

 The goal is to render 3D models as if

they were cartoons

  • Shading is often done with either a single

color or a two tone (color and shading) approach

  • Then a thick black silhouette is added

around edges

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14

 The color is often determined by the dot product n · l (surface

normal dot light vector)

 If negative, the surface should be darkened  Otherwise, it's some flat color  Or a threshold other than 0 can be used  A more complex system uses a one dimensional texture indexed

into with the dot product

Highlight Normal Shadow

slide-15
SLIDE 15

 The more complicated problem is properly

rendering edges with a thick dark line

 A number of different edges are of interest

  • Boundary or border edges are edges where one

polygon is not adjacent to any other

▪ Not found in 3D solid objects

  • A crease, hard, or feature edge is an edge between

two polygons that is sharper than some threshold angle

  • A material edge is an edge between two polygons

with different materials

  • A silhouette edge is when two neighboring polygons

face different directions, relative to the eye

slide-16
SLIDE 16

 Cel shading focuses on rendering silhouette edges  Many of these techniques rely on manipulating back facing

polygons

  • The crossover between front facing and back facing polygons is the

silhouette

  • It's easy to determine which is which

 After some manipulation of the backfaces, they are rendered

in black

slide-17
SLIDE 17

 If the backfaces are rendered in black without any change, they will be hidden  Before rendering, all backfaces can be translated to be closer to the viewer  Translation can be by

  • A fixed amount
  • An amount that takes into account non-linear z-depths
  • An amount based on the angle of the polygon normal

 None of these techniques give uniform thickness lines

slide-18
SLIDE 18

 Another approach is to fatten each backface triangle  The slope of the triangle and the distance from the viewer

determine the expansion of each edge

 It doesn't work well for thin triangles

slide-19
SLIDE 19

 A similar approach is to expand backface vertices along their

normals

  • The expansion amount is proportional to their z-distance

 This technique fails for situations like a cube, in which faces

with very different normals share vertices

slide-20
SLIDE 20

 Rather than using geometry, there is an

image processing approach

 Render all the normal values or depth values

to a buffer and use edge detection algorithms to draw lines where the values change abruptly

  • Using normal values can find crease edges

 This technique works for many cases that

failed before

  • Even GPU generated surfaces are not a problem
slide-21
SLIDE 21

 NPR techniques are very broad  Many approaches try to recreate hand-drawn or hand-painted styles  Silhouette lines can be drawn as paintbrush strokes of varying thickness  Tonal art maps (TAMs) use palettes of hand-drawn textures to do black

and white crosshatch-style shading

slide-22
SLIDE 22

 For CAD programs and other 3D tools, we may want to

highlight certain lines or all polygon edges

 Rendering polygon edges on top of existing polygons can be a

pain

  • Z-buffer algorithms might hide the lines

 In practice, a small bias is usually added to the polygons

slide-23
SLIDE 23

 For drawing simplified models, we may want to include or exclude

the hidden lines

 Wireframe is the easiest, since it is just the lines  Hidden-line uses the z-buffer directly  Obscured-line renders twice, rendering z-fail lines in a lighter color  Haloed lines also use the z-buffer, drawing thick white lines first

and then black lines on top

  • Problems happen when lines get too close
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27

 Review up to Exam 1

slide-28
SLIDE 28

 Finish Assignment 4

  • Due tonight before midnight

 Work on Project 3