• 沒有找到結果。

There is a vast body of work on computing illumination and shadows from light sources. Most techniques accelerate the processing of individual lights but scale linearly with the number of

2.3 Rendering 7

lights.

Several techniques have dealt explicitly with the many lights problem. Ward[30] sorts the lights by maximum contribution and then evaluates their visibility in decreasing order until an error bound is met. Paquette et al.[17] present a hierarchical approach, which provide guar-anteed error bounds and good scalability, but cannot handle shadowing which limits the appli-cability. Fernandez et al.[3] accelerate many lights by caching per light visibility and blocker information within the scene, but this leads to excessive memory requirements if the number of lights is very large. Wald et al.[28] can efficiently handle many lights under the assumption that the scene is highly occluded and only a small subset contribute to each image. This subset is determined using a particle tracing preprocess.

Instant radiosity[10] is one of many global illumination algorithms based on stochastic par-ticle tracing from the lights. It approximates the indirect illumination using many virtual point lights. Photon mapping[6] is another popular, particle-based solution for indirect illumination.

It requires hemispherical final gathering for good results, typically with 200 to 5000 rays per gather.

Walter et al.[29] propose a lightcut system. It renders complex illumination by renders complex illumination by converting the problem into many point lights and using a hierarchical clustering of lights. Our approach also gathers light from point samples and uses a hierarchical clustering.

C H A P T E R 3

Algorithm

This chapter describes our algorithm for lighting design using illumination brush. We first give an overview of our approach (Subsection 3.1). Next, we describe the detail of each step of the algorithm, including choose important vertices (Subsection 3.2), estimate initial lighting con-figuration (Subsection 3.3), compute optimal lighting concon-figuration (Subsection 3.4). Finally, we illustrate our rendering system (Subsection 3.5).

3.1 Overview

We describe the inverse lighting problem formally. Inputs to our system consist of a scene S (including material, geometry) and a desired illumination Ψ painted by user. From these inputs, our system estimates a lighting configuration p so that the resulting illumination I(p) = R(p, S) is close to the given desired illumination Ψ, where R is a rendering system returning the illumination of the scene S under the lighting configuration p, including the number of lights, the positions xi and intensities li of each light. Thus, inverse lighting problem attempts to find the optimal lighting configuration p so that

8

3.1 Overview 9

p = arg min D(I(p), Ψ) (3.1)

where D(I(p), Ψ) measures the illumination difference between the resulting illumination I(p) and the desired illumination Ψ.

Figure 3.1 illustrates the workflow of our system, which consists of four components:

Figure 3.1: System overview. Our system consists of four components, choosing important vertices, estimating initial lighting configuration, computing optimal lighting configuration and rendering system. The inputs are the description of a scene S, including geometry and mate-rial, and desired illumination Ψ given by a user. Lighting design system generates an optimal lighting configuration pto approximate the desired illumination.

1. Choose important vertices

If we use information of all vertices to do optimization, it spends too much time and

3.1 Overview 10

disobeys our goal: a interactive system. Therefor, we only choose important vertices from the scene to reduce the computation time in the optimization process.

2. Estimate initial lighting configuration

The desired illumination can be approximated by a linear combination of multiple fixed lights, whose intensities are solved by least-square. The initial guess component estimates light’s distribution using this method and generates initial lighting parameters p0. Usually, a good initial guess leads to a better optimization result.

3. Compute optimal lighting configuration

When initial lighting parameters p0 are given, we can find a optimal lighting configu-ration p through optimization phase. This resulted illumination is close to the desired illumination.

4. Rendering system

Rendering system needs to be invoked many times for computing contribution of each light, a combination of lights, and the resulting illumination.

We describe an overview of our method to solve the inverse lighting problem in the fol-lowing. First, we choose some important vertices from the scene to reduce computation time of optimization. Importance can be estimated from geometry and illumination properties. Ge-ometry property is unchanged since the vertex-by-vertex visibility relationship is fixed. As for illumination property, it is changed everytime a user paints illumination.

We estimate light’s distribution by spreading unity lights coarsely in the scene specified by a user or our system. Because the positions of lights are known, then the intensities of lights can be uniquely determined by solving a linear optimization problem through a least-square solver.

We delete some weak lights which have low contribution to the desired illumination. We then spread new unity lights finely near remaining lights and repeat the same process, least-square solver and deleting weak light. As light’s distribution is a set of groups, we can classify lights to several clusters using the segmentation algorithm.

3.1 Overview 11

We build a light tree by merging lights with similar contribution. We choose a cut in the light tree to determine the number of representative lights and retrieve lighting configuration p from the tree. We adjust lighting parameters using simplex method. Its output is the optimal lighting configuration p

Algorithm 3.1 summarizes our method.

Algorithm 3.1: The algorithm of our system //step 1: Choose important vertices

for each vertex {

compute the importance }

Choose vertices based on the importance for each vertex

//step 2: Estimate initial lighting configuration

Classify lights to each group using segmentation method

//step 3: Compute optimal lighting configuration Build a light tree

Choose a lightcut p=Simplex(p)

相關文件