week 13 -wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - week 1… · an...

23
Week 13 - Wednesday

Upload: others

Post on 18-Jan-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Week 13 - Wednesday

Page 2: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Image based effects Skyboxes Lightfields Sprites

Billboards Particle systems

Page 3: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 4: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 5: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 6: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

An impostor is a billboard created on the fly by rendering a complex object to a texture

Then, the impostor can be rendered more cheaply

This technique should be used to speed up the rendering of far away objects

The resolution of the texture should be at least:

tan(fov/2) distance2size object

resolution screen⋅⋅

Page 7: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

An impostor that also has a depth map is called a depth sprite This depth information can be used to make a billboard that

intersects with real world objects realistically The depth in the image can be compared against the z-buffer

Another technique is to use the depth information to procedurally deform the billboard

Page 8: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 9: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Impostors have to be recomputed for different viewing angles Certain kinds of models (trees are a great example) can be

approximated by a cloud of billboards Finding a visually realistic set of cutouts is one part of the problem The rendering overhead of overdrawing is another Billboards may need to be sorted if transparency effects are important

Page 10: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Image processing takes an input image and manipulates it Blurring Edge detection Any number of amazing filters

Much of this can be done on the GPU And needs to be (blurring shadows) Photoshop and other programs are GPU accelerated these days

Page 11: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

From Project 1, you guys know all about convolution filtering kernels

I just wanted to point out that some kernels are separable Rows and columns can be done

separately A separable m x m kernel can be run

in 2mn2 time instead of m2n2 time

Page 12: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Color correction takes an existing image and converts each of its colors to some other color Important in photo and movie

processing Special effects Time of day effects

Page 13: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Tone mapping takes a wide range of luminances and maps them to the limited range of the computer's screen

To properly simulate the relative luminances Some bright areas are made extremely

bright Some dark areas are made extremely

dark We can look for the brightest pixel

and scale on that basis

Page 14: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Lens flare is an effect caused by bright light hitting the crystalline structure of a camera lens Actually happens less and less now that camera technology has improved They can be rendered with textures

The bloom effect is where bright areas spill over into other areas To render, take bright objects, blur them, then layer over the original

scene

Page 15: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

In photography, some things are in focus and some things (either too near or too far) are blurry

When desired, this effect can be achieved by rendering the image in a range of blurred states and then interpolating between them based on z-value

Page 16: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Fast moving objects exhibit motion blur in films It doesn't often happen in real life We have come to expect it, nevertheless

The effect can be reproduced by keeping a buffer of previously rendered frames, adding the latest frame and subtracting the first frame

Other techniques can be used to do various kinds of selective, directional blurring

Page 17: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Fog effects can be used to give atmosphere or cue depth Fog is usually based on distance (z-buffer or true distance) from

the viewer Different equations determine the effect (linear or exponential) of

the fog

Page 18: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

BasicEffect makes fog easy with the following members FogEnabled Whether fog is on or off FogColor Color of the fog FogStart Distance (in world space) where fog

starts to appear FogEnd Distance (in world space) where fog

covers everything It's also not hard to write shader code that interpolates

between fog color and regular color based on distance

Page 19: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 20: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 21: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Non-photorealistic rendering

Page 22: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,
Page 23: Week 13 -Wednesdayfaculty.otterbein.edu/wittman1/comp4290/slides/comp4290 - Week 1… · An impostor is a billboard created on the fly by rendering a complex object to a texture Then,

Read Chapter 11 Finish Assignment 4 Due Friday before midnight

Work on Project 3