Inverse Light Design for High-Occlusion...

9
Inverse Light Design for High-Occlusion Environments Anastasios Gkaravelis 1 , Georgios Papaioannou 1 and Konstantinos Kalampokis 1 1 Department of Informatics, Athens University of Economics and Business, Athens, Greece {agkar, gepap, kkalampokis}@aueb.gr Keywords: Computer graphics, light design, optimization, inverse light positioning problem Abstract: Lighting design is a demanding but very important task in computer cinematography, games and architectural design. Computer-assisted lighting design aims at providing the designers with tools to describe the desired outcome and derive a suitable lighting configuration to match their goal. In this paper, we present an automatic approach to the inverse light source emittance and positioning problem, based on a layered linear / non-linear optimization strategy and the introduction of a special light source indexing according to the compatibility of each individual luminary position with the desired illumination. Our approach is independent of a partic- ular light transport model and can quickly converge to an appropriate and plausible light configuration that approximates the desired illumination and can handle environments with high occlusion. 1 INTRODUCTION Lighting design is a very important task in order to correctly illuminate a scene, emphasizing individual aspects of the scene or establishing a specific mood. It plays an essential role, especially in the entertainment industry, and more specifically in computer cine- matography and games. Also, it is a necessary process in architectural modelling, where energy-efficient and well-balanced illumination from artificial luminaries needs to be carefully devised. Despite its importance, lighting design is also a tedious and - more often than not - a counter-intuitive procedure. To manually il- luminate a scene, the artist has to carefully and iter- atively adjust the lighting parameters in a trial-and- error basis, until the desired effect is achieved. Thus, automatic methods have emerged, which compute the lighting parameters to achieve a user-specified light- ing result, requiring minimal or even no manual inter- vention. Due to the nature of light transport in an arbitrary environment, the generalized inverse lighting prob- lem is a very complex one to solve. Therefore, as mentioned in (Patow and Pueyo, 2003), it is often partitioned into sub-problems, such as the light emit- tance problem (EP) and the light source positioning (LSP) problem. First attempts only solved a simpler, more tightly-constrained problem, such as the indi- rect light adjustment via shadow manipulation (e.g. (Poulin and Fournier, 1992), (Poulin et al., 1997)). As researchers got more comfortable with the inverse lighting problem, unified emittance/positioning solu- tions were sought. Despite the progress in this field, the inverse lighting problem is still challenging and it becomes increasingly more complex due to the de- mand for increased realism by including global illu- mination in the inverse lighting calculations and the ability to handle dynamic environments. In this paper, we present an algorithm that, given a number of lights and the desired illumination, com- putes their position and emittance by using optimiza- tion techniques and heuristics to guide them (see ex- ample in Figure 1). As usual, we describe the de- sired illumination by using an irradiance goal at user- specified sample locations, although any goal can be used, such as a uniform lighting level across random locations distributed within the environment. Our inverse lighting algorithm consists of three major steps. In the first step, we discretize the param- eter space of the possible light source positions into a grid of cells and compute an emittance-independent contribution or coverage of these potential light posi- tions to the sampling points. We build a special index that allows querying light positions based on a spe- cific sampling point coverage pattern. We exploit this index to efficiently find the globally optimal combina- tion of cells (coarse light positions) and emittance that match the lighting goal, using Simulated Annealing with an inner linear optimizer for the emittance. Fi- nally, we deploy a non-linear optimization algorithm to fine-tune the light source positions in order to over- come the discretization simplification.

Transcript of Inverse Light Design for High-Occlusion...

Page 1: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

Inverse Light Design for High-Occlusion Environments

Anastasios Gkaravelis1, Georgios Papaioannou1 and Konstantinos Kalampokis1

1Department of Informatics, Athens University of Economics and Business, Athens, Greece{agkar, gepap, kkalampokis}@aueb.gr

Keywords: Computer graphics, light design, optimization, inverse light positioning problem

Abstract: Lighting design is a demanding but very important task in computer cinematography, games and architecturaldesign. Computer-assisted lighting design aims at providing the designers with tools to describe the desiredoutcome and derive a suitable lighting configuration to match their goal. In this paper, we present an automaticapproach to the inverse light source emittance and positioning problem, based on a layered linear / non-linearoptimization strategy and the introduction of a special light source indexing according to the compatibilityof each individual luminary position with the desired illumination. Our approach is independent of a partic-ular light transport model and can quickly converge to an appropriate and plausible light configuration thatapproximates the desired illumination and can handle environments with high occlusion.

1 INTRODUCTION

Lighting design is a very important task in order tocorrectly illuminate a scene, emphasizing individualaspects of the scene or establishing a specific mood. Itplays an essential role, especially in the entertainmentindustry, and more specifically in computer cine-matography and games. Also, it is a necessary processin architectural modelling, where energy-efficient andwell-balanced illumination from artificial luminariesneeds to be carefully devised. Despite its importance,lighting design is also a tedious and - more often thannot - a counter-intuitive procedure. To manually il-luminate a scene, the artist has to carefully and iter-atively adjust the lighting parameters in a trial-and-error basis, until the desired effect is achieved. Thus,automatic methods have emerged, which compute thelighting parameters to achieve a user-specified light-ing result, requiring minimal or even no manual inter-vention.

Due to the nature of light transport in an arbitraryenvironment, the generalized inverse lighting prob-lem is a very complex one to solve. Therefore, asmentioned in (Patow and Pueyo, 2003), it is oftenpartitioned into sub-problems, such as the light emit-tance problem (EP) and the light source positioning(LSP) problem. First attempts only solved a simpler,more tightly-constrained problem, such as the indi-rect light adjustment via shadow manipulation (e.g.(Poulin and Fournier, 1992), (Poulin et al., 1997)).As researchers got more comfortable with the inverse

lighting problem, unified emittance/positioning solu-tions were sought. Despite the progress in this field,the inverse lighting problem is still challenging andit becomes increasingly more complex due to the de-mand for increased realism by including global illu-mination in the inverse lighting calculations and theability to handle dynamic environments.

In this paper, we present an algorithm that, givena number of lights and the desired illumination, com-putes their position and emittance by using optimiza-tion techniques and heuristics to guide them (see ex-ample in Figure 1). As usual, we describe the de-sired illumination by using an irradiance goal at user-specified sample locations, although any goal can beused, such as a uniform lighting level across randomlocations distributed within the environment.

Our inverse lighting algorithm consists of threemajor steps. In the first step, we discretize the param-eter space of the possible light source positions intoa grid of cells and compute an emittance-independentcontribution or coverage of these potential light posi-tions to the sampling points. We build a special indexthat allows querying light positions based on a spe-cific sampling point coverage pattern. We exploit thisindex to efficiently find the globally optimal combina-tion of cells (coarse light positions) and emittance thatmatch the lighting goal, using Simulated Annealingwith an inner linear optimizer for the emittance. Fi-nally, we deploy a non-linear optimization algorithmto fine-tune the light source positions in order to over-come the discretization simplification.

Page 2: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

Figure 1: Inverse lighting pipeline, using the proposedmethod.

The main contributions of this paper are:

• A novel indexing of light configurations based ontheir contribution to the specified goal (coverage).This index allows fast queries of alternative lightpositions to satisfy a particular goal, correspond-ing to a clustering in coverage space.

• A robust mapping of the EP/LSP problem to theSimulated Annealing optimization method and arespective practical algorithm using the light cov-erage indexing.

The remainder of the paper is organized as fol-lows. Section 2 places our method in the context ofthe related work. Sections 3 and 4 provide a formu-lation for our coverage-space solving strategy and adescription of the process. Section 5 presents com-parative results and discusses the performance of ourmethod. Finally, in Section 6 we present our conclu-sions and future research directions.

2 PREVIOUS WORK

For the inverse lighting problem, several methodshave been proposed. Similar to (Patow and Pueyo,2003), here we partition the inverse lighting probleminto sub-problems and briefly present some represen-

tative techniques and applications from each category.For a more comprehensive, recent survey of the field,please refer to (Schmidt et al., 2014). Furthermore, atthe end of this section we provide more details on arecent method that we compare our work with.

Light Source Emittance Problem. (Schoenemanet al., 1993) proposed a method, in which the userpaints the desired illumination on a scene and the in-tensity of a set of lights with known positions is de-termined by a constrained least squares solver. Themethod relied on the observation that the resultinglighting on any surface location is a linear combina-tion of the emittance levels of light sources, providedthe latter remain fixed in space. A similar approachwas implemented by (Anrys et al., 2004) in order tocompute the intensity of a set of light sources by us-ing and optimizing the luminance of real luminaries,which were previously set up and their illuminationon a physical object captured in a set of photographs.

(Kawai et al., 1993) performed an optimizationover the intensities and directions of a set of lights aswell as the reflectivity of surfaces in order to best con-vey the subjective impression of certain scene quali-ties as expressed by the user and minimize the globalenergy of the scene.

(Okabe et al., 2007) presented an algorithm tomanipulate and alter environment maps by directlypainting the outgoing radiance on the target model.They used a constrained linear least square solver,which minimizes the weighted squared difference ofthe computed and desired illumination. It could han-dle diffuse and specular reflections and relied onthe SRBF-based Precomputed Radiance Transfer ap-proach to perform the computations interactively.

Light Source Positioning. (Poulin and Fournier,1992) proposed a way to define light positions ina scene by manipulating their shadows or resultinghighlights on both diffuse and specular surfaces. Byselecting a pair of points in a scene, they define theillumination constraints, which are subsequently usedto position the light source accordingly. Later, (Poulinet al., 1997) presented a system that controls the posi-tion of a number of light sources by sketching strokeswhere the shadow of selected objects should fall ina scene. The proposed solution could also providefeedback regarding the plausibility of a newly placedstroke. To avoid solving the problem analytically, anon-linear constraint optimization algorithm was uti-lized. (Pellacini et al., 2002) developed a user in-terface system that facilitated the design of shadows.The shadows in the scene could be selected, trans-formed or new ”fake” shadows could be introduced.

Page 3: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

Inverse Lighting addresses both the emittance andpositioning of light sources in a unified manner andseveral architectures and systems have been proposed.(Costa et al., 1999) introduced an IL system where acustom scripting language was used to define the illu-mination constraints. The system utilized the Adap-tive Simulated Annealing algorithm to optimize thelight sources. (Pellacini et al., 2007) proposed a work-flow, where artists could directly paint the desiredlighting effects onto the geometry. With the use ofan importance map, obtained from the painted targetimage, the system applies the non-linear simplex al-gorithm (Nelder and Mead, 1965) to adjust the var-ious parameters of the light sources by minimizingthe goal function, which is a weighted average of thedifference between the desired and computed illumi-nation.

(Castro et al., 2009) solve the problem of lightpositioning and emittance, while keeping the totalemission power at a minimum. They computed thecontribution of a user-defined number of lights usingthe radiosity algorithm and experimented with localsearch algorithms, such as Hill Climbing and BeamSearch. As a goal, they tried to minimize total emis-sion power. Later, (Castro et al., 2012) improved thealgorithm and used global approaches to solve theproblem in order to avoid getting stuck in a local op-timum. They offered an implementation and experi-mented with Genetic algorithms, Particle Swarm op-timization and a hybrid combination of a global andlocal search algorithm.

An interesting formulation of the ”opening” prob-lem was suggested by (Fernandez and Besuievsky,2012), where skylights were treated as area lightsources and a unified skylight/luminaries optimiza-tion was sought. They used the VNS metaheuristicalgorithm to solve the inverse lighting problem, whilekeeping the energy consumption of the artificial lightsources to a minimum and/or maximize the contribu-tion of the skylights.

Finally, (Lin et al., 2013) proposed a coarse-to-fine strategy to solve the inverse lighting problem,given a set of user-painted lighting samples on sur-faces. They spread unit-intensity lights in a volumegrid and configure their intensities using a constrainedlinear least square solver. Dim lights are pruned andthe process is repeated with the remaining cells, aftersubdividing them. Then, a light hierarchy is built andtraversed to obtain a good configuration, which is sub-sequently optimized using a non-linear least squaresmethod. Since this is the most recent method, closelyrelated to ours, in the remainder of the paper, we oftenprovide direct comparisons with it.

3 PROBLEM FORMULATION

Let Igoal be an illumination goal over a scene andP be a light configuration consisting of k lights thatilluminates a scene producing an illumination resultIres(P). Igoal , Ires can be radiance, radiosity or irradi-ance, depending on the measurement demands of theunderlying application (e.g. dependence on viewingdirection, material etc.). For a discrete set of surfacesamples in the scene si, Ires(P,si) and Igoal(si) are theresulting illumination from the lighting configurationP and the desired illumination at si, respectively.

Using the above notations, an inverse lightingproblem can be defined as the search for the optimallighting configuration P∗, which minimizes some dis-tance function D between the resulting and the desiredillumination at the sampling locations si:

P∗ = argminP

D(Ires(P,si), Igoal(si)) (1)

Typically, D is expressed as the L2 norm of themeasurement differences at all Ns sampling points si.

For real luminaries, although the dependence ofthe emittance Le on direction or power consumptioncannot be considered linear, its dependence on a nom-inal unit output power distribution can: Le(l j,ω) =c(l j)Le(l j,ω). In other words, the measured contribu-tion of a light source l j to the illumination of a givenpoint is linearly dependent on its emittance scalingc(l j). Therefore, the illumination from a set of n lightsources to a sampling point si is the superposition ofall luminary contributions.

If we consider a general light transport operator(path integral) LT (l j → si) to describe the total con-tribution of each light source l j to a sampling point si,for n unit light sources, the lighting result on si is thelinear combination of these contributions with coeffi-cients c(l j).

Assuming now fixed positions for n light sourcescovering a discretization of the 3D environment, the(discrete) LSP and EP problems can be solved simul-taneously, by optimizing the emittance scaling factorsc(l j) of all n potential candidate lights so that the re-sulting light configuration P∗ satisfies Equation 1. Azero c(l j) implies the absence of a light source at l j.

4 METHOD OVERVIEW

(Lin et al., 2013) solve a simplified version of theabove problem by regarding all potential light sourcespositioned on a discretized grid covering the entirescene and solving a linear system of Ns equations andNc unknowns, Ns being the number of light (goal)

Page 4: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

sample points and Nc the number of grid cells, i.e. po-tential light positions. They evaluate the light contri-bution using rasterization and solve the linear systemwith a least squares method.

In order to make the light optimization problemmanageable, they use a hierarchical (coarse to fine)solving strategy, starting from a very rough initial dis-cretization of the scene volume. The calculated emit-tance scaling factors are clamped and the cells of non-zero light intensity are further subdivided. The result-ing lights are clustered in a light tree, whose graphcut that satisfies an error margin, is refined using anon-linear optimization method to provide the finallighting configuration. However, this strategy leadsto solutions that are unsuitable for environments withdense geometry or heavy occlusion (e.g. typical ar-chitectural spaces) since the sparsity of the initial po-tential light locations results in single cells frequentlycontaining occluders, thus clustering potential lightsnear walls, after the cell subdivision, or worse, plac-ing lights only in one side of the barrier.

Since we needed to overcome this problem, westrived for a solution that allows a finer initial sub-division of the space into cells. Solving the inverselight problem using a linear system, would require aset of Ns equations with 3×Nc unknowns c j (RGBcoefficients), Nc being the number of cells (potentiallights) and Ns being the number of sampling points,where the desired illumination is given. 3×Nc canreach several hundreds of thousands in some expan-sive scenes and the problem can become practicallyintractable. Additionally, to find a stable and usablesolution would require defining a large number ofsampling points, proportional to Nc, which is imprac-tical for all purposes. We exploit a discretized ini-tial light placement, too, but propose a non-linear ap-proach to light positioning with an inner linear solverfor the emittance adjustment (Figure 2), as follows.

4.1 Light Coverage Computation

We first initialize a set of potential light source posi-tions on a fine grid (e.g. in the order of 643 cells ormore), the center of each cell l j representing a po-tential light source. For each light and each sam-pling point, we compute the light transport functionLT (l j → si), normalize it over all Ns sampling pointsand store the values as an (3×Ns)-dimensional at-tribute vector f j (LT is a three-channel quantity).Normalizing the attribute vector f j transforms theEP/LSP to a sample coverage problem, because we donot include the magnitude of the light’s contributionto the sampling points but rather their ”reachability”by a given source.

Scene GoalIllumination

Light Coverage Computation

UserInput

Coarse-level Optimization Loop

CandidateSelection

OptimizeEmittance

Compute Error

FinalConfiguration

Light Coverage Index

RefinementStep

Figure 2: Our algorithm consists of an initialization step,the main optimization strategy and a final refinement step.Given as input the goal illumination, our algorithm finds alighting configuration that satisfies the goal illumination.

In our current system, to estimate the path integralLT (l j→ si) for all light-sampling point paths, we usebidirectional path tracing (BPT). This way, we avoidrasterization problems, such as artifacts introduced byshadow maps, and we can inherently include complexglobal light transport phenomena. However, any pathintegral estimator can be utilized instead. For this pa-per, we use an NVIDIA Optix-based BPT implemen-tation to compute all light position - sampling pointpath integrals in parallel, with a Monte Carlo solverand 20-100 samples per (l j,si) pair.

An important novel step of our approach is thatthe light attribute vectors are all together stored in ak-d tree indexed by attribute vector dimension, i.e.the structure is a (3×Ns)-d tree. The normalized at-tribute vector f j allows for a fast search of light posi-tions with similar sample point coverage. We use theNanoflann k-d data structure implementation that al-lows very fast queries using the Approximate NearestNeighbors algorithm. We show next how we exploitthis property to perform meaningful mutations of lightconfigurations P.

4.2 Coarse-level Optimization

To find a light configuration P of k sources that mini-mizes the distance function D(Ires(P,si), Igoal(si)), weuse a non-linear optimization algorithm and in par-ticular, Simulated Annealing, with random mutations

Page 5: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

Figure 3: Method comparison - Studio scene. Left: resultsfrom the method by (Lin et al., 2013). Right: our methodoptimizes goal point coverage (global path throughput) andresults in more acceptable solutions with better light cover-age. The preview on the top row shows the direct paths tothe sample (goal) points. The bottom row shows the path-traced results of the two light configurations.

over a k-dimensional state vector equal to the cur-rent choice of light positions. The reason for uti-lizing a non-linear solver is that although the com-bined EP/LSP is linear with respect to light contri-butions, we want to rapidly investigate solutions insample coverage space, a non-linear domain and ex-ploit the fact that light sources in completely differentlocations may indeed provide similar coverage to thesampling points, thus explore seemingly disjoint, al-beit increasingly favourable solutions.

Separating the coverage problem from the lightsource emittance has the additional benefit of produc-ing more usable solutions, regardless of the explicitgoals provided by the user. For example, in Figure 3both our method and the method by (Lin et al., 2013),produce visually similar irradiance near the goal po-sitions. However, due to better coverage, our methodreduces shadowing, as it better handles occlusion.

Mutation Strategy. For a given light configuration,we select and remove one light source at random. Theremaining k−1 lights, constitute an incomplete lightconfiguration P(k−1) for which we compute the con-tribution Ires(P(k−1),si) to the Ns sampling points (seeEmittance Estimation below).

Next, the residual Igoal(si) − Ires(P(k−1),si)) iscomputed and the resulting normalized attribute vec-tor fdi f f is used to locate a number of light sourceswith similar attributes in the k-d tree. Simply put,we use the normalized lighting residual from remov-ing a light source to locate other source positionsthat would better complement the remaining lights inachieving the goal.

Given the resulting set of nearest lights (in terms

Figure 4: The mutation strategy. After the removal of onelight source (middle), we compute the optimal emittance ofthe remaining light sources and estimate the residual illu-mination that is required to match the goal illumination atall points. Finally, we locate a light that better matches thisresidual (right).

of coverage complementarity, i.e. attribute vectorfdi f f ), we pick one candidate location at random andreplace the missing light source, in order to gener-ate a new improved light configuration P. The opti-mal emittance for this new configuration is estimatedand the resulting evaluation of D(Ires(P,si), Igoal(si))is the outcome of the cost function. The entire muta-tion procedure is illustrated in Figure 4.

When the SA algorithm accepts mutations with apotentially higher cost, a random mutation of the stateP occurs and the above mutation strategy is omitted.

Emittance Estimation. According to the precedingdiscussion, we have decoupled the light position se-lection strategy from the emittance problem, by esti-mating the intensities L(l j) of a configuration P (i.e.a set of k fixed light sources) within each position op-timization step. This is a linear system (Schoenemanet al., 1993) with only a few unknowns (3×k), whichcan be rapidly solved, especially since all F(si, l j)path integrals have been estimated.

For our implementation we chose a non-negativelinear least square solver (Lawson and Hanson, 1987)since the intensity of a light source could not have anegative value.

The use of this hybrid non-linear / linear strategyhas a significant impact on convergence, especiallywhen coupled with our light coverage prioritizationstrategy (see evaluation in Section 5).

4.3 Solution Refinement

Similar to (Lin et al., 2013), to find the final, non-discretized positions of the light sources and their re-spective emittance, we refine further the light config-uration solution of the coarse-level optimization. Thisis achieved by again running a hybrid non-linear / lin-ear optimizer, only this time, the light - sample pathintegrals need to be evaluated in each optimization it-eration, although for only k light sources. Based onour experiments and the suggestion in (Pellacini et al.,

Page 6: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

0 50 100 150 200 250

35%37%

33%31%29%27%25%

Erro

r

Iterations

Re�nement Stage Convergence

Hybrid

Non-linear

Figure 5: Convergence rate of the refinement stage using aposition/emittance non-linear optimization versus a hybridlinear (emittance) / non-linear (position) strategy.

2007) and (Lin et al., 2013), as a non-linear optimizerwe use the nonlinear simplex algorithm (Nelder andMead, 1965), which performs very well given that it isinitialized with an already near-optimal solution. Theparameter space of the non-linear optimizer (i.e. thelight positions) is very narrow, since the light posi-tions only need to be jittered by at most the size ofone cell.

Again, after estimating the path integrals in eachiteration, we employ the non-negative linear leastsquare solver to adjust the emittance of the given lightconfiguration.

Figure 5 demonstrates the faster convergence ofthe hybrid algorithm when compared to a unified non-linear optimization algorithm (non-linear simplex inthis case) to simultaneously optimize position as wellas source emittance.

5 EVALUATION AND RESULTS

We tested our method on scenes of varying geomet-ric complexity. We mainly focused on environmentsthat have a high degree of shape and structure com-plexity such as scenes consisting of separate regionswith high occlusion, since such complex scenes arecommonly found on cinematic imagery, games or ar-chitectural designs. The tests were performed on anIntel i7-4930 CPU and a Nvidia Geforce GTX 780and we report times in seconds. The CPU side ofthe algorithm was ran in a single thread without tak-ing advantage of multi-core CPUs, although it can bevery easily parallelized to take advantage of multi-threading systems by running concurrent instances ofthe SA method or splitting the search space. In ourtests, we used 1000 iterations for the Simulated An-nealing process, which were sufficient since by us-ing our mutation strategy and the fast clustered searchmechanism (via the coverage index), we were able toobtain a good solution in only a few iterations.

Correctness. First, we evaluated the accuracy of ourmethod: We illuminated a scene with a known light-

Figure 6: Correctness experiment. Left: the user definedlight sources, whose irradiance to sampling points is mea-sured and used as a goal. Right: the computed light config-uration produced by our algorithm (4.3% error).

ing configuration and tried to re-establish the samelighting configuration by using our algorithm. Thescene we used was the Apartment environment of Fig-ure 6 that has 8 rooms and a hallway connecting them.We manually placed 10 light sources at typical loca-tions inside the scene and computed their contribu-tion at random sampling positions si (Figure 6 (left)).Then, we ran our method using the computed con-tribution as the goal illumination Igoal(si). The com-puted luminaries (Figure 6 (right)) were very close tothe manual configuration. It took our algorithm 40seconds to compute the result and the normalized il-lumination difference between the goal and resultingillumination was 4.3%.

Mutation Strategy. We tested the convergence rateof our light configuration mutation strategy againstthe random selection approach. We confirmed that re-placing one of the k light sources with one that com-plements the missing contribution to the samplingpoints ensures a significantly faster convergence to abetter solution than in the case of randomly select-ing a new light source (Figure 7). Even if we choosemore iterations for the random selection method, itis evident that the complementary coverage approachalways results in a better solution, due to its prioriti-zation of regions that are inadequately illuminated.

Performance. In Figure 8 we measure and presentthe performance of the stages of our algorithm. Weselected various scenes with different structural com-plexity (high or low occlusion) and polygon count.We measured the initialization step, where we com-pute the coverage of the light sources, the index con-struction, the Coarse-Level optimization and the finalsolution refinement step.

Page 7: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

0 700 1400 2100 2800

60%

50%

40%

30%

20%

10%

Err

or

Iterations

Our mutation strategy

Random state selection

SA Convergence

Figure 7: Convergence rate of the coarse-level optimizationstage (simulated annealing) using standard state transitionsand our mutation strategy.

Figure 8 confirms that the initialization time de-pends on the polygon count of the scene, since weneed to compute the coverage of every light source,which involves tracing paths within a larger environ-ment. In every scene we compute the global illumina-tion of the light sources, except from the Sewers scenewhere we only used direct illumination. It is obviousthat by only using direct illumination, the computa-tion of the illumination is greatly reduced.

On the other hand, the Coarse-Level optimizationstep does not depend on the polygon count of thescene, since the light coverage of every light sourceis already computed, but on the structural complexityof the scene and the feasibility of the desired illumi-nation. One example is the Studio scene where, givena configuration of two lights, there are many possiblelight configurations that satisfy our goal, thus the op-timizer takes more time to converge to a global opti-mum. Another example is the Sewers scene, which isa scene with high occlusion. However, the algorithmcan easily mark regions that need to be covered andplace light sources in positions that minimize the costfunction, locating a good configuration very quickly.

Finally, the refinement step does not only dependon the polygon count of the scene, since we needto compute the illumination of the evaluated con-figuration at every step, but it is also affected byhow close the current solution is to the optimal one.Even though the Studio scene has the highest poly-gon count, the solution refinement step found a solu-tion very quickly, because the configuration from theCoarse-Level Optimization step was very close to theoptimal solution. On the other hand, the refinementstep took more time on the Apartment scene, sincethere were more light sources to optimize, coupledwith the fact that small state changes of the light posi-tions can significantly alter the resulting illuminationdue to high occlusion.

Apartment Studio Cornell Sewers 0

5

10

15

20

25

30

35

40

Solution Refinement

Initialization Index ConstructionCoarse-Level Optimization

Tim

e (

Se

co

nd

s)

Scenes

Apartment

Studio

Cornell

Sewers

Figure 8: Perfomance measurements of the various stagesof the algorithm with simple and complex scenes.

Comparative Evaluation. Below we compare ouralgorithm with the recently published lighting opti-mization method of (Lin et al., 2013). We comparetheir performance using complex environments withhigh occlusion. First, we test both methods with theApartment scene, which has separate regions withhigh occlusion. As a goal, in both experiments weused the illumination produced by a known initiallight configuration (see Correctness paragraph).

As we previously mentioned, our method per-forms quite well for a configuration of 10 lights, withthe normalized illumination difference to the desiredillumination being at 4.3%. In order to check the ro-bustness of our algorithm, we tried to satisfy the illu-mination goal by using fewer light sources. We chose8 light sources since the scene has 8 separate rooms(connected via a doorway to others). Figure 9 showsa comparison of the two methods. On the right, weshow the results from our implementation with a nor-malized illumination difference of 12%. In the leftinset, we present the lighting configuration that the al-gorithm by (Lin et al., 2013) found for an 8-light con-figuration, producing a normalized illumination dif-ference of 36.7% in 35 seconds. The method by (Linet al., 2013) failed to compute the correct light con-

Page 8: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

Figure 9: Lighting configuration comparison - Apartmentscene. Left: the compared method. Right: our method.The line segments represent the path throughput of domi-nant path integrals (green: high, blue: low).

figuration, resulting in luminaries with high error andfailure to include lights in certain spaces, because ofits hierarchical light placement strategy. A hierarchi-cal (coarse-to-fine) scheme fails, if the coarse can-didate solutions cannot successfully represent theirneighborhood. In this case, large cells intersect theboundaries of separate spaces and result in biasedplacement of luminaries. In some scenes, a finer gridcan be used, but this does not alleviate the problem,unless the boundaries of the cells roughly coincidewith the occluding structures. Also, another problemof using a finer grid is that the linear least squaressolver tries to optimize lights that are near the sam-pling points in order to minimize the error, which doesnot work well with the clustering method (light tree),despite our effort to optimize the parameters and gridsize to give the best results.

Next, we run experiments with the Studio sceneshown in Figure 3, which is a single space featuringa large occluder and a lot of complex geometry. Inthe Studio scene, we defined the goal illumination atthe bedroom and the living room by manually paint-ing the desired irradiance directly on the geometry(Figure 3, top row) and then compute the emittanceand position of 2 light sources to satisfy this goal.Even though, this scene is suitable to be solved with acoarse-to-fine method, the compared method achievesa score of 44.5% normalized illumination differencein 30 seconds, while our method achieves a score of24.8%.

6 CONCLUSION

We have presented a method to solve the inverse lightpositioning / emittance problem, which efficientlycomputes the configuration of a given number of lightsources, in order to satisfy the design goals. We pro-posed a scheme for the efficient representation of can-didate light configurations to directly search and clus-ter the light position space according to the light’scontribution to the desired illumination. This, alongwith a hybrid linear / non-linear optimizer that disas-sociates the emittance and light positioning, lead to afast convergence to usable solutions for environmentswith high occlusion.

Currently, our system handles only point lightsources, but with no restriction on the materials ofsurfaces, while it also provides a user interface forpainting the desired irradiance on any surface. In thefuture, we would like to address the problem of deter-mining the number of lights to be used, by carefullycovering the geometry to be illuminated with the leastamount of light sources that will minimize the error ina meaningful manner. Furthermore, we would like toalso support area luminaries and include sky lightingin the calculations, so we can take into considerationthe contribution of natural light, which is very impor-tant in architectural design.

ACKNOWLEDGEMENTS

This research has been co-financed by the EuropeanUnion (European Social Fund - ESF) and Greek na-tional funds through the Operational Program ”Edu-cation and Lifelong Learning” of the National Strate-gic Reference Framework (NSRF) - Research Fund-ing Program: ARISTEIA II-GLIDE (grant no.3712).

REFERENCES

Anrys, F., Dutre, P., and Willems, Y. (2004). Image basedlighting design. In the 4th IASTED International Con-ference on Visualization, Imaging, and Image Pro-cessing, page 15.

Castro, F., Acebo, E., and Sbert, M. (2009). Heuristic-search-based light positioning according to irradianceintervals. In Proceedings of the 10th InternationalSymposium on Smart Graphics, SG ’09, pages 128–139, Berlin, Heidelberg. Springer-Verlag.

Castro, F., del Acebo, E., and Sbert, M. (2012). Energy-saving light positioning using heuristic search. Eng.Appl. Artif. Intell., 25(3):566–582.

Costa, A. C., Sousa, A. A., and Ferreira, F. N. (1999). Light-ing design: A goal based approach using optimisation.

Page 9: Inverse Light Design for High-Occlusion Environmentsgraphics.cs.aueb.gr/graphics/docs/papers/LightDesign.pdf · 2014-12-12 · Inverse Light Design for High-Occlusion Environments

In Proceedings of the 10th Eurographics Conferenceon Rendering, EGWR’99, pages 317–328, Aire-la-Ville, Switzerland, Switzerland. Eurographics Asso-ciation.

Fernandez, E. and Besuievsky, G. (2012). Technical sec-tion: Inverse lighting design for interior buildingsintegrating natural and artificial sources. Comput.Graph., 36(8):1096–1108.

Kawai, J. K., Painter, J. S., and Cohen, M. F. (1993). Ra-dioptimization: Goal based rendering. In Proceedingsof the 20th Annual Conference on Computer Graphicsand Interactive Techniques, SIGGRAPH ’93, pages147–154, New York, NY, USA. ACM.

Lawson, C. and Hanson, R. (1987). Solving Least SquaresProblems. PrenticeHall.

Lin, W.-C., Huang, T.-S., Ho, T.-C., Chen, Y.-T., andChuang, J.-H. (2013). Interactive lighting design withhierarchical light representation. Comput. Graph. Fo-rum, 32(4):133–142.

Nelder, J. A. and Mead, R. (1965). A simplex methodfor function minimization. The computer journal,7(4):308–313.

Okabe, M., Matsushita, Y., Shen, L., and Igarashi, T.(2007). Illumination brush: Interactive design of all-frequency lighting. In Proceedings of the 15th PacificConference on Computer Graphics and Applications,PG ’07, pages 171–180, Washington, DC, USA. IEEEComputer Society.

Patow, G. and Pueyo, X. (2003). A survey of inverse render-ing problems. Computer Graphics Forum, 22(4):663–687.

Pellacini, F., Battaglia, F., Morley, R. K., and Finkelstein,A. (2007). Lighting with paint. ACM Trans. Graph.,26(2).

Pellacini, F., Tole, P., and Greenberg, D. P. (2002). Auser interface for interactive cinematic shadow design.ACM Trans. Graph., 21(3):563–566.

Poulin, P. and Fournier, A. (1992). Lights from highlightsand shadows. In Proceedings of the 1992 Symposiumon Interactive 3D Graphics, I3D ’92, pages 31–38,New York, NY, USA. ACM.

Poulin, P., Ratib, K., and Jacques, M. (1997). Sketchingshadows and highlights to position lights. In Proceed-ings of the 1997 Conference on Computer GraphicsInternational, CGI ’97, pages 56–, Washington, DC,USA. IEEE Computer Society.

Schmidt, T.-W., Pellacini, F., Nowrouzezahrai, D., Jarosz,W., and Dachsbacher, C. (2014). State of the art inartistic editing of appearance, lighting, and material.In Eurographics 2014 - State of the Art Reports, Stras-bourg, France. Eurographics Association.

Schoeneman, C., Dorsey, J., Smits, B., Arvo, J., and Green-berg, D. (1993). Painting with light. In Proceedingsof the 20th Annual Conference on Computer Graphicsand Interactive Techniques, SIGGRAPH ’93, pages

143–146, New York, NY, USA. ACM.