25
CS361 Week 11 - Monday

CS361

  • Upload
    gibson

  • View
    66

  • Download
    0

Embed Size (px)

DESCRIPTION

Week 11 - Wednesday. CS361. Last time. Radiosity Ray tracing Precomputed lighting Precomputed occlusion. Questions?. Project 3. Student Lecture: Billboarding and Particle Systems. Image Based Effects. Rendering spectrum. - PowerPoint PPT Presentation

Citation preview

Page 1: CS361

CS361Week 11 - Monday

Page 2: CS361

Last time

Radiosity Ray tracing Precomputed lighting Precomputed occlusion

Page 3: CS361

Questions?

Page 4: CS361

Project 3

Page 5: CS361

Student Lecture:Billboarding and Particle Systems

Page 6: CS361

Image Based Effects

Page 7: CS361

Rendering spectrum

We can imagine all the different rendering techniques as sitting on a spectrum reaching from purely appearance based to purely physically based

Sprites

Layers

Billboards

Triangles

Appearance

Based

Lightfields

Physically

Based

Global illuminatio

n

Page 8: CS361

Skyboxes When objects are close to the viewer, small

changes in viewing location can have big effects

When objects are far away, the effect is much smaller

As you know by now, a skybox is a large mesh containing the entire scene

Some (our) skyboxes look crappy because there isn't enough resolution Minimum texture resolution (per cube face) =

tan(fov/2)resolution screen

Page 9: CS361

Lightfields If you are trying to recreate a complex

scene from reality, you can take millions of pictures of it from many possible angles

Then, you can use interpolation and warping techniques to stitch them together Huge data storage requirements Each photograph must be catalogued based on

location and orientation High realism output! Remember the video with the robot and the

omnidirectional camera

Page 10: CS361

Sprites and layers A sprite is an image that

moves around the screen Sprites were the basis of

most old 2D video games (back when those existed, before the advent of Flash)

By putting sprites in layers, it is possible to make a compelling scene

Sequencing sprites can achieve animation

Page 11: CS361

Even old "3D" games used sprites

Page 12: CS361

Billboarding Applying sprites to 3D gives billboarding Billboarding is orienting a textured polygon based on

view direction Billboarding can be effective for objects without solid

surfaces Vegetation Smoke Fire

Each polygon (thought of as a quadrilateral, even if often two triangles in practice) needs a surface normal n and an up vector u

A billboard also has an anchor location as a point of reference

Page 13: CS361

Screen-aligned billboard A screen-aligned

billboard is one that sits on the screen

The u vector comes from the camera

The n vector is the negation of the camera's view vector

SharpDX handles all of this for you in the SpriteBatch class, of course

Page 14: CS361

World-oriented billboard If the object is supposed to exist in the world, it needs to

change as the world changes The world has some implied up vector that can be used to

derive an appropriate up vector (and thereby rotation matrix) for the sprites

For small sprites (such as particles) the billboard's surface normal can be the negation of the view plane normal

Larger sprites should have different normals that point the billboard directly at the viewpoint

Page 15: CS361

Unlimited options Many (sometimes hundreds) of billboards can be put together

to make smoke or fire effects A small set of billboards can be drawn many times with

different scaling and rotation factors and overlapped Issues can happen if these billboards intersect with objects Soft particles is a technique for lowering the opacity of

billboards when they are close to "real" objects

Page 16: CS361

Axial billboards Axial billboards are another common technique In axial billboards, a polygon rotates around some world

space axis and tries to face the viewer as much as is allowed

This technique is useful for trees viewed from a distance Like cross trees, the illusion is ruined if the viewer moves too

high Some implementations may switch between the impostor

billboard and a real model if the viewer gets close enough It works for laser beams too

Page 17: CS361

Particle Systems

Page 18: CS361

Particle systems In a particle system, many small, separate objects are

controlled using some algorithm Applications:

Fire Smoke Explosions Water

Particle systems refer more to the animation than to the rendering

Particles can be points or lines or billboards Modern GPUs can generate and render particles in hardware

Page 19: CS361

SharpDX Particle System

Page 20: CS361

Impostors 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 objectresolution screen

Page 21: CS361

Displacement techniques 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 22: CS361

Duck Video

Page 23: CS361

Upcoming

Page 24: CS361

Next time…

Image processing Tone mapping HDR lighting Lens flare Bloom

Page 25: CS361

Reminders

Keep working on Project 3 Due Thursday before midnight

Keep reading Chapter 10Exam 2 is next Friday in class

Review chapters 5 – 10