Presentation is loading. Please wait.

Presentation is loading. Please wait.

02/23/05© 2005 University of Wisconsin Last Time Radiosity –Progressive Radiosity –Assorted optimizations.

Similar presentations


Presentation on theme: "02/23/05© 2005 University of Wisconsin Last Time Radiosity –Progressive Radiosity –Assorted optimizations."— Presentation transcript:

1 02/23/05© 2005 University of Wisconsin Last Time Radiosity –Progressive Radiosity –Assorted optimizations

2 02/23/05© 2005 University of Wisconsin Today Meshing Volume Scattering Radiometry

3 02/23/05© 2005 University of Wisconsin Return to Assumptions Recall the two fundamental assumptions of the standard radiosity approach: –Constant radiosity over each element –Perfectly diffuse surfaces We wish to more accurately represent the radiosity at every point: –Regardless of the quality of the solution (form factors, subdivision, etc.), if the correct radiosity cannot be represented, it won’t be computed

4 02/23/05© 2005 University of Wisconsin Better Radiosity Representations Two approaches: –Work around the constant radiosity assumption by constructing meshes where elements really should have constant (or bilinear) radiosity –Use more expressive representations for radiosity (work under different assumptions)

5 02/23/05© 2005 University of Wisconsin Meshing Artifacts Where does poor meshing really show? Find the (many) artifacts in the image

6 02/23/05© 2005 University of Wisconsin Typical Meshing Lays down a grid in some orientation –Using underlying surface parameterization May subdivide, but the principle directions remain unchanged Require subdivision down to pixel resolution to remove artifacts

7 02/23/05© 2005 University of Wisconsin Staircase Effect Most evident at shadow boundaries: –Elements are dark if they have more than half shadow, light otherwise Solution: –Subdivide the mesh to sub-pixel resolution (costly) –Blur the boundaries (introduces other problems) –Align element boundaries with the shadow boundaries (discontinuity meshing, later)

8 02/23/05© 2005 University of Wisconsin Staircase Effect

9 02/23/05© 2005 University of Wisconsin Light and Shadow Leaks Occur when the mesh does not respect geometric boundaries –Interior walls meeting the floor The wall appears to float –Shadows leaking out from under objects No reasonable perceptual interpretation – these look worse Solutions: –Ensure that there are element boundaries at geometric intersections (hard to do without user help) –Discontinuity meshing

10 02/23/05© 2005 University of Wisconsin Shadow Leaks

11 02/23/05© 2005 University of Wisconsin Interpolation Artifacts Have to “fill in” radiosity between vertices, or blur element boundaries Interpolation schemes are frequently poorly implemented, particularly those in hardware Solutions: –Meshes that make interpolation easier –More expensive interpolation

12 02/23/05© 2005 University of Wisconsin Poor Interpolation

13 02/23/05© 2005 University of Wisconsin Preprocessing the Mesh Seek to remove inconsistencies before starting the solution Ensure invariants are met: –Objects are solid –Objects don’t intersect This is very hard to do automatically - it should be part of the modeling process But, commercial modelers are generally poor in this regard

14 02/23/05© 2005 University of Wisconsin Fixing Interpolation Pre-process to remove concave polygons –Replace them with triangles - not too hard Enforce subdivision constraints –Neighboring patches cannot differ by more than one subdivision level Post-process the remove T-vertices –Subdivide mismatched neighbors and interpolate new vertices correctly

15 02/23/05© 2005 University of Wisconsin Smoother Interpolants Bi-linear (hardware accelerated) interpolation uses only vertices of given polygon Build higher order interpolants –Must make sure not to use a high-order interpolant across a low order discontinuity Gather to a texture or cloud of points Gather to points on surfaces corresponding to pixels in the image (slow, but good results)

16 02/23/05© 2005 University of Wisconsin Discontinuity Meshing Identify expected discontinuities and mesh around them –Sharp boundaries due to point light sources or object contact –Derivative discontinuities due to area sources and multi-object shadows Related to aspect graphs in computer vision –Places where the set of visible things changes

17 02/23/05© 2005 University of Wisconsin Two Types of Discontinuities Assume polygonal environment Vertex-Edge events –Discontinuities where the plane defined by a vertex and an edge intersects other objects –Vertex on light source, edge on blocker –Discontinuity is 0 th or 1 st order Edge-Edge-Edge –Higher order discontinuities at places where three edges appear to meet at a point –Produce quadric curves as shadow boundaries, which are hard to mesh –2 nd order, generally ignored

18 02/23/05© 2005 University of Wisconsin Meshing With Discontinuities Construct VE planes Intersect them with surfaces Mesh the resulting edges –Constrained triangulation is a difficult problem Mesh must be able to store different radiosity values at one point, because radiosity is different on each side of the edge

19 02/23/05© 2005 University of Wisconsin Using Discontinuity Meshes Very high number of possible discontinuities: O(n 6 ) for n vertices Only find 0 th and 1 st order discontinuities due to bright light sources Try to only find visible discontinuities Research topic?: Integrate into hierarchical scheme –Use discontinuities as splitting planes in hierarchy –Hierarchy would be BSP tree –Not really a big pay-off, research targets have moved on

20 02/23/05© 2005 University of Wisconsin Better Radiosity Representations Standard approach: Each point takes on the value of the patch on which it lies: Finite Element Approach: The radiosity at each point is given by a linear combination of basis functions evaluated at that point: –Typically, most basis functions are 0 at most points –Standard formulation is like having one basis function for each patch that is constant on the patch and 0 elsewhere

21 02/23/05© 2005 University of Wisconsin Finite Element Formulation Note the similarity to splines: a set of weights multiply a set of basis functions to give a value Choose a set of basis functions that can capture the desired behavior –Linear, quadratic, … Find the coefficients, B j, that give the best solution –Two common, different definitions of “best”

22 02/23/05© 2005 University of Wisconsin Galerkin Method Find the set of weights that minimize the variation of the found solution from the true solution In other words: Find the closest expressible solution to the true one The standard radiosity equation, with accurate form factors, is a Galerkin method with constant basis functions of finite support (supported by each patch)

23 02/23/05© 2005 University of Wisconsin Point-Collocation Method Find the set of weights that zero the error at a fixed set of points Algorithms that gather to points are Point-Collocation methods –At which points does it zero the error? Not as accurate as the Galerkin method: –Only locally accurate, as opposed to globally optimal

24 02/23/05© 2005 University of Wisconsin Alternate Bases Linear basis functions Wavelets: –Multi-resolution representation –Behaves like hierarchical radiosity, but without redundant information No need for push/pull in hierarchy Recently, working with frequency decompositions of radiosity on surfaces

25 02/23/05© 2005 University of Wisconsin Participating Media (PBR Chapter 12) We assumed a vacuum in the LTE We assumed perfectly clear materials Radiance did not change along lines –We talked about the radiance arriving at one point from some direction as the radiance leaving the visible point in that direction Participating media influence the radiance as it travels through a volume –Fog, smoke, clouds, finely suspended particles, … –Marble, glass, skin, …

26 02/23/05© 2005 University of Wisconsin Basic Setting Radiance is coming in along some line, and we want to know what happens as it moves through the volume –Quantities will all be per unit length along a line –t is distance along the line At a point, three things can happen to change the radiance –Absorption – the medium absorbs some power and converts it to something else (heat, most commonly) –Emission – the medium is emitting its own radiance (glowing gases in a flame, and a cheap way to approximate internal scattering) –Scattering – the medium scatters the radiance in some direction, like at a surface, and some light from other directions gets scattered in

27 02/23/05© 2005 University of Wisconsin Absorption Medium absorbs energy passing through it Looks dark –Absorbs the light coming from behind it, and doesn’t reflect other light –Casts shadows

28 02/23/05© 2005 University of Wisconsin Absorption Math The absorption cross section  a (p,  ) –The probability density that light will is absorbed per unit distance –Spectral quantity –Normally no angular dependence, but there might be –Units are m -1, so value can be >1 To compute radiance at any point along a line through the medium that only absorbs:

29 02/23/05© 2005 University of Wisconsin Emission The medium can emit energy –Flames are the most common example Also a hack to make something look more reflective in approximate solutions Looks bright, for obvious reasons –Could even cause a shadow

30 02/23/05© 2005 University of Wisconsin Emission Math The emitted radiance per unit length L ve (p,  ) –The amount of energy emitted at a point in some direction, per unit length –Spectral quantity –Normally no angular dependence, but there could be To compute radiance at any point along a line through a medium that only emits:

31 02/23/05© 2005 University of Wisconsin Scattering Particles in the media act as little reflectors –They are too small to see, but they influence the light passing through Scattering has two effects –Out-scattering: light along a line is scattered in a different direction –In-scattering: light from some other direction is scattered into the direction of interest Out-scattering decreases radiance, in-scattering increases it

32 02/23/05© 2005 University of Wisconsin Scattering is Visually Important

33 02/23/05© 2005 University of Wisconsin Out-Scattering Math There is an out-scattering co-efficient  s (p,  ) –The probability density that light will is scattered per unit distance –Just like absorption coefficient, but it’s not being converted, it’s being redirected Define attenuation coefficient:  t =  a +  s Define transmittance, T r, between two points:

34 02/23/05© 2005 University of Wisconsin Transmittance Properties Transmittance from a point to itself is 1 Transmittance multiplies along a ray –In a voxel-based volume, we can compute transmittance through each voxel and multiply to get total through volume

35 02/23/05© 2005 University of Wisconsin Optical Thickness Define optical thickness,  : If the medium is homogeneous,  t does not depend on p –Integration is easy and we get Beer’s law

36 02/23/05© 2005 University of Wisconsin Phase Function We need a function that tells us what directions light gets scattered in –The participating media equivalent of the BRDF The phase function, p(  ’), gives the distribution of outgoing directions,  ’, for an incoming direction,  –A probability distribution, so it must be normalized over the hemisphere:

37 02/23/05© 2005 University of Wisconsin Source Term Given the emission radiance and the phase function, we can define a source term, S –The total amount of radiance added per unit length

38 02/23/05© 2005 University of Wisconsin Next Time Participating Media –Common phase functions –Solving volume scattering integrals


Download ppt "02/23/05© 2005 University of Wisconsin Last Time Radiosity –Progressive Radiosity –Assorted optimizations."

Similar presentations


Ads by Google