generalized minimum-norm perspective shadow maps

15
COMPUTER ANIMATION AND VIRTUAL WORLDS Comp. Anim. Virtual Worlds 2008; 19: 553–567 Published online 20 June 2008 in Wiley InterScience (www.interscience.wiley.com) DOI: 10.1002/cav.228 ........................................................................................... Generalized minimum-norm perspective shadow maps By Fan Zhang * , Hanqiu Sun, Chong Zhao and Lifeng Wang .......................................................................... Shadow mapping has been extensively used for real-time shadow rendering in 3D computer games, though it suffers from the inherent aliasing problems due to its image-based nature. This paper presents an enhanced variant of light space perspective shadow maps to optimize perspective aliasing distribution in possible general cases where the light and view directions are not orthogonal. To be mathematically sound, the generalized representation of perspective aliasing errors has been derived in detail. Our experiments have shown the enhanced shadow quality using our algorithm in dynamic scenes. Copyright © 2008 John Wiley & Sons, Ltd. Received: 19 December 2007; Accepted: 16 April 2008 KEY WORDS: image-based rendering; shadow algorithms; computer games Introduction Shadowing effects are very important for the realism of virtual scenes in 3D computer games, which significantly enhance players’ perception of the surrounding environ- ment with useful depth clues. For game developers, the reality that they are facing is that the commonly used shading models do not directly support the global illu- mination effects like shadows. Shadow mapping 1 is one of the most popular dynamic shadowing techniques. Unlike object-based approaches such as shadow volumes, 2 this image-based approach has no restriction on the type of geometric primitives, and requires only one extra rendering pass per light. Such generality and efficiency make shadow mapping exten- sively adopted in 3D games. There are two rendering passes involved in shadow mapping. In the first pass, the scene is rendered into the shadow map texture from the light’s point of view. In the second pass, the scene is rendered from the eye’s point of view. For each point be- ing rendered, it is transformed into the light’s coordinates again for depth comparison. If the corresponding depth value in shadow map is less than that of the transformed point, this point is shadowed. *Correspondence to: F. Zhang, Department of Computer Science and Engineering, The Chinese University of Hong Kong, Shatin N.T., Hong Kong, China. E-mail: [email protected] The major problem when using shadow mapping is the aliased shadow boundaries mainly caused by insufficient texture resolution. Numerous anti-aliasing approaches have been proposed during the past decade. A main re- search line is termed perspective reparameterizations (PRs) that address the reduction of perspective aliasing errors. 3 We have a note here, to keep consistent with the naming convention in Reference [4], we use the term “perspec- tive reparameterization” instead of “perspective shadow maps” in this paper. The two terms are usually exchange- able in this research line. The basic idea behind typical PRs 3,5,6 is to reparame- terize shadow maps by applying a perspective warping transformation to both the scene and light, as visualized in Figure 1. The motivation is that perspective aliasing errors are independent of local geometry details, and the sampling density at the light in the post-transformed space better accommodates the requirements for the re- construction of shadowed images. All PR techniques mainly exploit two factors: the near-plane distance of the warping frustum and the warping direction. The essen- tial difference among variant PRs is the selection of the first factor, because the near plane distance of the warp- ing frustum determines how strong the warping effect is. For example, the warping strength in light space perspec- tive shadow maps (LiSPSMs) 5 is adjusted to equalize errors at depth boundaries. On the other hand, the selection of the second factor strongly influences the implementation complexity. With an inappropriate warping direction, the frequently changed types of lights after applying the ............................................................................................ Copyright © 2008 John Wiley & Sons, Ltd.

Upload: fan-zhang

Post on 06-Jun-2016

215 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Generalized minimum-norm perspective shadow maps

COMPUTER ANIMATION AND VIRTUAL WORLDSComp. Anim. Virtual Worlds 2008; 19: 553–567Published online 20 June 2008 in Wiley InterScience(www.interscience.wiley.com) DOI: 10.1002/cav.228...........................................................................................Generalized minimum-norm perspectiveshadow maps

By Fan Zhang*, Hanqiu Sun, Chong Zhao and Lifeng Wang..........................................................................

Shadow mapping has been extensively used for real-time shadow rendering in 3D computergames, though it suffers from the inherent aliasing problems due to its image-based nature.This paper presents an enhanced variant of light space perspective shadow maps tooptimize perspective aliasing distribution in possible general cases where the light and viewdirections are not orthogonal. To be mathematically sound, the generalized representationof perspective aliasing errors has been derived in detail. Our experiments have shown theenhanced shadow quality using our algorithm in dynamic scenes. Copyright © 2008 JohnWiley & Sons, Ltd.

Received: 19 December 2007; Accepted: 16 April 2008

KEY WORDS: image-based rendering; shadow algorithms; computer games

Introduction

Shadowing effects are very important for the realism ofvirtual scenes in 3D computer games, which significantlyenhance players’ perception of the surrounding environ-ment with useful depth clues. For game developers, thereality that they are facing is that the commonly usedshading models do not directly support the global illu-mination effects like shadows.

Shadow mapping1 is one of the most popular dynamicshadowing techniques. Unlike object-based approachessuch as shadow volumes,2 this image-based approachhas no restriction on the type of geometric primitives,and requires only one extra rendering pass per light. Suchgenerality and efficiency make shadow mapping exten-sively adopted in 3D games. There are two renderingpasses involved in shadow mapping. In the first pass,the scene is rendered into the shadow map texture fromthe light’s point of view. In the second pass, the scene isrendered from the eye’s point of view. For each point be-ing rendered, it is transformed into the light’s coordinatesagain for depth comparison. If the corresponding depthvalue in shadow map is less than that of the transformedpoint, this point is shadowed.

*Correspondence to: F. Zhang, Department of Computer Scienceand Engineering, The Chinese University of Hong Kong, ShatinN.T., Hong Kong, China.E-mail: [email protected]

The major problem when using shadow mapping is thealiased shadow boundaries mainly caused by insufficienttexture resolution. Numerous anti-aliasing approacheshave been proposed during the past decade. A main re-search line is termed perspective reparameterizations (PRs)that address the reduction of perspective aliasing errors.3

We have a note here, to keep consistent with the namingconvention in Reference [4], we use the term “perspec-tive reparameterization” instead of “perspective shadowmaps” in this paper. The two terms are usually exchange-able in this research line.

The basic idea behind typical PRs3,5,6 is to reparame-terize shadow maps by applying a perspective warpingtransformation to both the scene and light, as visualizedin Figure 1. The motivation is that perspective aliasingerrors are independent of local geometry details, andthe sampling density at the light in the post-transformedspace better accommodates the requirements for the re-construction of shadowed images. All PR techniquesmainly exploit two factors: the near-plane distance of thewarping frustum and the warping direction. The essen-tial difference among variant PRs is the selection of thefirst factor, because the near plane distance of the warp-ing frustum determines how strong the warping effect is.For example, the warping strength in light space perspec-tive shadow maps (LiSPSMs)5 is adjusted to equalize errorsat depth boundaries. On the other hand, the selection ofthe second factor strongly influences the implementationcomplexity. With an inappropriate warping direction, thefrequently changed types of lights after applying the

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd.

Page 2: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

Figure 1. A schematic illustration of perspective reparameterizations, where V and W stand for the eye’s view frustum andwarping frustum, respectively. Both V and the light are transformed into W’s post-perspective space in which the shadow map is

generated.

perspective transform may cause mapping singularities.For example, the warping direction in LiSPSMs is chosento be in parallel with the shadow plane in order to avoidproducing mapping singularities. It greatly simplifies theimplementation and analysis.

There’s a major limitation existed for most of currentlyexisted PRs,3–8 which results from the representation ofaliasing they used. The aliasing errors are previously ap-proximated in a static scenario only, where the light andview directions are orthogonal and termed the ideal case.Because the angle between the light and view directionsisn’t taken into account by this direction-independentapproximation, the resultant warping transformationcannot produce the expected aliasing distribution fora general light-view configuration in dynamic scenes.For example, although the warping strength in LiSPSMsdoes vary as the light is tiled towards the viewer tostimulate the degeneration to standard shadow maps,the aliasing distribution along the view direction is notequalized at the depth boundaries anymore. Likewise,the analysis results of the ideal case5,9 are hard to bedirectly used to quantitatively analyze errors in generalcases. In this paper, the term general case refers to thearbitrary light-view configuration.

Main Contributions

The main contributions of this paper include:

(1) We present a detailed derivation of the generalizedrepresentation of aliasing errors in PR techniques.

Although a similar result has been mentioned byZhang et al.,4 a mathematical derivation is somehowmissed. As a further improvement, the representa-tion in this paper is explicitly parameterized with-out introducing any proxy values. As a special studycase, Figure 4 visualizes how the generalized repre-sentation unifies variant aliasing distributions in theideal case. Notice that, unlike the similar results pre-sented by Michael et al.,5 this figure for the first timeplots how errors are distributed in trapezoidal shadowmaps (TSMs).6 Furthermore, in this paper, we extendthe analysis to both screen dimensions (see Eqs (10)and (24)) for better understanding and quantifyingerrors in general cases.

(2) We propose the generalized minimum-norm perspec-tive reparameterization (GMNPR) to exemplify theapplications of the aliasing representation. This al-gorithm generalizes LiSPSMs in general cases withtwo advantages: (i) GMNPR stabilizes the opti-mal aliasing distribution in possible general cases.Such direction-invariant feature (partially) preservesthe optimized shadow quality for dynamic scenes.(ii) GMNPR inherits the flexibility of LiSPSMs.The warping directions in both methods are thesame. We thus don’t need special treatments suchas the “inverse perspective matrix”7 for the map-ping singularity problem in the post-perspectivespace.

The remainder of the paper is organized as follows:we first review related work and then formulate the

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 554 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 3: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

generalized representation of aliasing errors. Based onthis representation, we derive and analyze our GMNPRin a purely mathematical view. We subsequently presentthe experimental results to show enhanced shadow ren-dering using our algorithm. Finally, we give the conclu-sion and further work.

Previous Work

The literature on real-time shadow rendering is vast andfar beyond the scope of this paper. Here we focus ourreview on most relevant work in solving the aliasingproblem of shadow mapping. The exhausted survey andreview of shadow rendering algorithms refer to Refer-ences [10,11].

PRs refer to the algorithms that reparameterize theshadow map by warping the texel distribution onthe shadow plane with a perspective transformation.The first PR was introduced in the perspective shadowmaps (PSMs),3 in which both the scene and light sourceare transformed to the post-perspective space of the viewfrustum. The shadow map is generated in this space byrendering a view from the transformed light source. Spe-cial treatments are needed when implementing PSMs.7

Although the shadow quality is significantly increasedat the regions near the viewer, the warping strength isusually over-strong such that under-sampling happensfor distant objects. LiSPSMs5 avoid the complicated light-transformation in PSMs by using the warping directionin parallel with the shadow plane. The equalized alias-ing distribution over the depth range produces bettershadow quality at both near and distant regions. TSMs6

are designed to reduce aliasing errors for “important” ob-jects in the view frustum. This algorithm first calculatesa 2D trapezoidal approximation of the view frustum asseen from the light. The warping transformation is thenselected by the “κ-ξ rule”. The focus region in the viewfrustum, the frusta truncated at the distance κ to the nearplane, is mapped to the y = ξ line on the shadow plane. Atypical setting is κ = 50%, ξ = 80%. Chong et al.8 tilt theshadow plane using a generalized projection transforma-tion based on a few user-specified planes. This approachguarantees perfect sampling for the objects lie on theseplanes. However, such oblique shadow plane cannot beglobally optimal for the whole scene.

Adaptive shadow maps (ASMs)12 reduce aliasing bystoring the shadow map as a hierarchical grid. By eval-uating the contribution of each shadow map texel to theoverall image quality, the grid is refined to create higherresolution at regions that contain shadow boundaries.

Artifacts at those critical regions are thus greatly reducedwithout requiring a “flat” shadow map of huge resolu-tion. However, the traversal and refinement operationsrequire many rendering passes and aren’t feasible forreal-time applications. A GPU-accelerated implementa-tion of ASMs was lately presented by Lefohn et al.13 Par-titioning algorithms9,14–16 improve the shadow qualityusing multiple shadow maps, but with requiring multi-ple rendering passes. Like this paper, the paper in Ref-erence [9] also presents an analysis of PRs. However, theanalysis mainly addresses the ideal case.

Hybrid techniques17–21 combine shadow volumes2 andshadow mapping to achieve a better tradeoff between theperformance and shadow quality. Although hybrid tech-niques take the merits of both image-space and object-space methods, they also inherit drawbacks of bothapproaches at the same time.

Shadow Silhouette Maps22 significantly reduce jaggedshadow boundaries by exploiting a representation ofthe scene’s silhouette, but artifacts can be introduced asthe representation stores of only one silhouette point ineach shadow map texel. In compressed shadow maps(CSMs),23 the lit surfaces are represented by endpointsof intermediate line segments to reduce the memory as-sumption. However, the shadow map generation cannotbe accelerated by current graphics hardware because theread-back operations are required.

Percentage closer filtering (PCF)24 extends the con-cept of classical bilinear filtering used in texture sam-pling to help anti-aliasing around shadow boundaries.As a recent improvement of PCF, variance shadow maps(VSMs)25 calculate the variance over any filter region bystoring the mean and mean squared of distribution ofdepths. A better approximation to the true occlusion canbe derived by using this variant. The irregular samplingstrategy can be implemented in software rendering sys-tems to enable aliasing-free shadow maps.26,27 Shadowquality is usually improved by focusing shadow mapon visible objects.28,29 Algorithms30–32 are proposed toaddress the problem of incorrect self-shadowing due todiscrete depth quantization.

Representation of AliasingErrors

The central idea of this paper comes from analyz-ing the aliasing representation, we thus introducethe related theory in this section. We first formulatethe generalized representation of perspective aliasing

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 555 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 4: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

Figure 2. Definition of frequently used notations.

errors in shadow mapping, then show how this rep-resentation quantifies aliasing errors for different repa-rameterizations in a unified way. Definition of fre-quently used notations in our derivation are listed inFigure 2.

General Cases

Figure 3 shows the computational model used in thispaper and LiSPSMs, in which the warping frustum isconstructed in the light space defined by Wimmer et al.5

Without loss of generality, we assume the field-of-viewangles in the x and y directions are the same. For sim-plicity, the computational model assumes that the lightis directional and moves on the yz plane. The t and sdirections of the shadow map are aligned with xl andzl, respectively. The light beams through a texel with thesize ds (in the z direction) fall on a surface with the lengthdz in world space. Here, the local parameterization ofthe shadow map s(z) assumes that the shadow map isaccurately focused on the view frustum and no resolu-tion is wasted on invisible parts of the scene. The size ofview beams dp on the normalized screen projected fromthe surface is dy/z tan φ. α and β denote the angles be-tween the surface normal and vector to the screen andshadow map plane, respectively. By restricting the smallsurface on the z direction, we have dy ≈ dz cos α/ cos β.The aliasing error F for the small surface is thendefined as

F = dp

ds= 1

tan φ

dz

zds

cos α

cos β(1)

The above aliasing representation can be divided intotwo parts: (1) perspective aliasing: dz/zds, and (2) projectionaliasing: cos α/ cos β. Shadow map under-sampling occurswhen perspective aliasing or projection aliasing becomeslarge. Projection aliasing happens for surfaces that arealmost parallel to the light direction. Since projectionaliasing is heavily related to the geometrical details, thelocal increase of sampling densities on such surfaces isrequired to reduce this type of aliasing. Thus, an expen-sive scene analysis at each frame is needed such that thehardware-acceleration is forced. On the other hand, per-spective aliasing comes from the perspective foreshort-ening effect and can be reduced by warping the texelson the shadow plane by using a global transformation.PRs generate shadow maps in the post-perspective spaceof the warping frustum to cancel out the foreshorteningeffect introduced by the view frustum. Since the perspec-tive warping transformation enlarges the objects close tothe viewer and shrinks the distant objects, perspectivealiasing is significantly reduced.

Due to the symmetry, we only need to consider 0 ≤θ ≤ π. Furthermore, since θ can be replaced by π − θ

in our computation when θ > π/2, we suppose 0 ≤ θ ≤π/2 from now on. The shadow map parameterizations = s(z) is induced by applying the perspective warp-ing transformation W. By ignoring the projection alias-ing, the aliasing error F in Eq. (1) is then simplified into(=̇ means ignoring projection aliasing),

F = dp

ds=̇ 1

tan φ

dz

zds= 1

tan φ

1z

1ds(z)/dz

= 1tan φ

1z

1s′(z)

(2)

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 556 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 5: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

Figure 3. Formulation of the generalized representation F(λ, θ, z). Left: φ < θ ≤ π/2. Right: 0 ≤ θ ≤ φ.

In Figure 3, every point (x, y, z) in the view space isfirst transformed to (xl, yl, zl) in the light space, thenprojected to (xt , yt , zt) in W’s post-perspective space andfinally transformed to 2D texture coordinates (t, s) in theshadow map space. In the following derivation, the ycoordinate is ignored because we mainly analyze the tand s coordinates. From the side view and light’s view

in Figure 3, we have

xl = x (3)

zl ={(

z − n + n tan φ

tan θ

)sin θ + Wn θ ∈ [φ, π

2 ]

(f tan φ − (f − z) tan θ) cos θ + Wn θ ∈ [0, φ](4)

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 557 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 6: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

Wf − Wn ={(

n tan φ

tan θ+ f − n + f tan φ

tan θ

)sin θ θ ∈ [φ, π

2 ]

2f tan φ cos θ θ ∈ [0, φ](5)

Most of previous work only addresses the ideal casewhere zl = z. On the contrary, with the simplificationsused in our computational model, we derived an analysisof the aliasing distribution in general cases where zl �= z.From the projection matrix in Direct3D and texture ma-trix in shadow mapping, the calculation for subsequentlytransformed coordinates are directly given below:

(xt zt 1) = (xl zl 1)

2Wn

n tan φ′ 0 0

0 Wf

Wf −Wn1

0 − Wf Tn

Wf −Wn0

(6)

(t s) = (xt zt 1)

12 0 0

0 1 012 0 1

(7)

The light’s view in Figure 3 gives

tan φ′ ={

f tan φ

Wfθ ∈ [φ, π

2 ]f tan φ

Wnθ ∈ [0, φ]

(8)

To facilitate the comparison of the aliasing distributionin different scene configurations, we consider the aliasingproblem in the normalized view frustum by introducingthe following parameterization:

λ = Wn

Wf − Wn

(9)

Note the standard shadow mapping approach can betreated as a PR by using a special transform in whichλ = ∞ (no perspective warping).

Plugging s(z) derived from Eqs (3–9) into Eq. (2), F canbe represented as the following factorization:

F(λ, θ, z) =̇ 1tan φ

1z

1s′(z)

= ψ1(λ, θ)(z + ψ2(λ, θ))2

z(10)

where,

ψ1(λ, θ) ={ 1

tan φ1(

f−n+(f+n) tan φ

tanθ

)λ(λ+1)

θ ∈ [φ, π2 ]

1tan φ

12fλ(λ+1)

tanθtan φ

θ ∈ [0, φ]

ψ2(λ, θ) ={(

f − n + (f + n) tan φ

tan θ

)λ + n

tan φ

tan θ− n θ ∈ [φ, π

2 ]

f (2λ + 1) tan φ

tan θ− f θ ∈ [0, φ]

With the assumptions used in our computationalmodel, F(λ, θ, z) gives us a general representation ofthe aliasing distribution in the view direction in differ-ent reparameterizations. In comparison with other sim-plified representations5,9 which only handle the idealcase, our direction-dependent representation enables usto quantify the aliasing errors at arbitrary θ values. Notethat though this representation was first introduced byZhang et al.,4 they did not provide derivation details.More importantly, this paper extends the above deriva-tion to the x direction as well, which enables us to takeinto account errors in both z and x directions instanta-neously.

Next we illustrate how F(λ, θ, z) unifies aliasing rep-resentations in different PR techniques including stan-dard shadow maps (SSMs), PSMs, LiSPSMs, and TSMs.To compare with the result presented by Wimmer et al.,5

the situation in the ideal case (θ = π/2) is considered.Without surprising, the two results should be the samebecause the analysis in Reference [5] is simply a specialcase of our representation. Furthermore, as an interest-ing supplement, we first plot the aliasing distribution inTSM which is not included in Reference [5].

Ideal Case

In PR techniques, the only free parameter λ in Eq. (10)is selected according to specific constraints, in order toproduce the expected warping effects. For examples, the“linear” constraint in PSM results in a linear aliasing dis-tribution over the depth range. The constraint in LiSPSMmakes the maximum errors “minimal with respect to theL∞ norm”. The focus-driven constraint in TSM requiresthe user-specified region to occupy the majority of theshadow map resolution. An important note here is thatwe won’t claim which one of them is the best in thispaper because each of them cannot be suitable for all ap-plications. In practice, the λ parameter usually has to betweaked for satisfactory rendering results.

SSM can be regarded as a special PR by using a warpingfrustum with λ = ∞.

FSSM = F(∞, π/2, z) = 1tan φ

(f − n)z

(11)

It means that the perspective errors of SSM increase hy-perbolically as the object moves closer to the view plane.

Because W = V in PSM, λPSM = n

f−n. Hence,

FPSM = F

(n

f − n, π/2, z

)= 1

tan φ

f − n

fnz (12)

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 558 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 7: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

which means the aliasing distribution in PSM is a linearfunction with respect to z.

LiSPSM is designed to minimize the maximum errorin terms of the L∞ norm. Since F achieves maximal atboundaries of the depth range, λLiSPSM should satisfy

F(λLiSPSM, π/2, n) = F(λLiSPSM, π/2, f )

which gives

λLiSPSM = n + √fn

f − n

The maximum of L∞(F), denoted as L∞max(F), is then

L∞max(F) = F(λLiSPSM, π/2, n) =

√n

f(f − n).

The aliasing distribution in LiSPSM is

FLiSPSM = F(λLiSPSM, π/2, z)

= 1tan φ

√f − √

n√fn(

√f + √

n)(z + √

fn)2

z(13)

TSM maps the focus point pκ with the depth value zκ =n + (f − n)κ to a point on the s = ξ line on the shadowplane. Solving s(zκ) = ξ by using Eqs (3–9), we have

λTSM = (1 − ξ)κξ − κ

and

FTSM = F( (1 − ξ)κ

ξ − κ, π/2, z

)

= (ξ − κ)2

tan φ(f − n)(1 − ξ)(1 − κ)ξκ

(z + (f − n) (1−ξ)κ

ξ−κ− n

)2

z

(14)

In particular, for the typical settings κ = 0.5 and ξ = 0.8in TSM,

λTSM = 13

FTSM = 1tan φ

9n

4(f − n)

(z + f−4n

3

)2

z(15)

Figure 4 plots the aliasing distributions in differentreparameterizations.

Figure 4. The aliasing distributions in different reparameteri-zations in the ideal case. n = 1, f = 100, and φ = π/6. A scale

1/√

3 is used.

Algorithm

As the light direction goes to parallel with the view direc-tion, the available depth range affected by the warpingfrustum decreases accordingly. In other words, the warp-ing strength decreases as θ goes small. This requires λ

to be direction-adaptive to satisfy the application-specificconstraint. With the representation in Eq. (10), users arecapable of designing the direction-adaptive λ(θ) to pro-duce the expected warping strength in the general case.Although λLiSPSM also takes into account θ, as we ex-plain later, it actually equalizes the aliasing distributiononly in the ideal case. Based on the observations above,we propose the GMNPR to satisfy the following two re-quirements:

� Stabilize the optimal aliasing distribution in possiblegeneral cases.

� Converge to standard shadow maps as the light direc-tion goes to parallel with the view direction.

There’s nearly no difference for implementing and ap-plying GMNPR in comparison with LiSPSMs, except forthe λ selection in the warping frustum which controlsthe warping strength. In the following, we thus focus onderiving appropriate λ values to produce the equalizedaliasing distribution for dynamic scenes.

In mathematical sense, we can define variant norms.Like LiSPSMs, GMNPR is designed to minimize the L∞-norm of errors. Once given λ and θ, Eq. (10) shows thatF(z) has a single positive local extremum (a minimum)

at the location z = n(

1 − tan φ

tan θ

)(f − n + (f + n) tan φ

tan θ

)−1.

Therefore, the maximum L∞(F) is achieved at the

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 559 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 8: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

boundaries of the depth range. Let L∞max(F) be the maxi-

mum L∞(F) within [n, f ]. Minimizing L∞max(F) requires

that the errors at near and far planes are equal, or

F(λ, θ, n) = F(λ, θ, f ) (16)

The above maxima can be directly calculated fromEq. (10) as follows:

� Case 1: If φ ≤ θ ≤ π/2,

F(λ, θ, n) =(f − n + (f + n) tanφ

tanθ

)n tan φ

(λ + µ)2

λ(λ + 1)

F(λ, θ, f ) =(f − n + (f + n) tanφ

tanθ

)f tan φ

(λ + ν)2

λ(λ + 1)

µ = n

(f − n) tanθ

tanφ+ f + n

ν = 1 − f

(f − n) tanθ

tanφ+ f + n

� Case 2: If 0 ≤ θ ≤ φ,

F(λ, θ, n) = 2f

ntanθ

(λ + µ)2

λ(λ + 1)F(λ, θ, f ) = 2

tanθ

(λ + ν)2

λ(λ + 1)

µ = 12

− f − n

2f

tanθ

tanφν = 1

2

Leading the above results to Eq. (16) gives the optimal λ

selection,

λ= ν − µ√f/n − 1

− µ=

λ1(θ) = (n+√

fn)−ntanφtanθ

f−n+(f+n) tanφtanθ

θ ∈ [φ, π

2 ]

λ2(θ) = f+√

fn

2f

tanθ

tanφ− 1

2 θ ∈ [0, φ]

(17)

Now let’s consider the critical angle θ = φ. Figure 5plots λ against θ. We can see that λ decreases slowly asθ goes from π/2 to φ, thus the perspective warping ef-fect becomes stronger. At the singularity θ = φ, λ takes anose-dive and rapidly plunges towards 0, which reacheswell for λ > 0. But λ = 0 is obviously disastrous, as itpractically concentrates the whole shadow map into onetexel. Due to the fact that the perspective projection isa hyperbolic mapping, the depth region [λ ≤ z ≤ 2λ] oc-cupies about half of the depth range [0 ≤ s ≤ 0.5] in thepost-perspective space. In practice, it’s never a good ideato let λ be too small in any PR, as this introduces strongwarping such that the shadow-map texels are usually bi-ased to few pixels in the near plane. Hence, the rapiddecrease to zero for λ makes Eq. (17) hard to be used inpractice when θ < φ. To avoid this problem, we have to

Figure 5. Adjustment of the λGMNPR selection in practice.

replace λ2 by a positive function λ∗2 which should satisfy

the following two criteria:

� Smooth transition of shadow qualities at θ = φ.Note the singularity at θ = φ may result in the discon-tinuous transition of shadow qualities in practice. Toavoid this problem, the continuousλ transition at θ = φ

should be satisfied.

λ∗2(φ) = λ1(φ) (18)

� Convergence to SSM as θ goes to 0.When θ < φ, from Figure 3, the warping frustumbounds two lines on the far plane of the view frustum.The available depth range distorted by the warpingfrustum is significantly narrowed. In such cases, PRsshould weaken the warping strength in order to avoidthe unbalanced distribution of shadow details on thescreen. In particular, when θ = 0, all perspective repa-rameterizations converge to standard shadow maps.

limθ→0

λ∗2(θ) = ∞ (19)

Many candidates can fulfill Eqs (18) and (19). In ourexperiments, λ∗

2 is chosen to be

λ∗2(θ) = λ1(φ)/tan

4φπ

)=

√fn

2f

1

tan(

θ

4φπ) (20)

Substituting Eq. (20) into Eq. (17) gives our finalλGMNPR selection as follows:

λGMNPR

=

λ(1)GMNPR(θ) = λ1(θ) = n+

√fn−n

tanφtanθ

f−n+(f+n) tanφtanθ

θ ∈ [φ, π

2 ]

λ(2)GMNPR(θ) = λ∗

2(θ) =√

fn

2f

1tan( θ

4φπ)

θ ∈ [0, φ]

(21)

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 560 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 9: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

Eq. (21) gives us a direction-adaptive λ selection forminimum-norm aliasing distribution, which essentiallyextends LiSPSMs to general cases. Note that all λ val-ues discussed in this paper are for the warping frustumW with a normalized depth range, namely Wf − Wn = 1,where Wf and Wn represent W’s near-plane and far-planevalues, respectively. In LiSPSMs, the near-plane distanceof the warping frustum Wn in general cases is approxi-mated as:

Wn = n + √fn

sin θ

By normalizing the depth range of the warping frustum,we have

λLiSPSM(θ) = Wn

Wf − Wn

=

n+√

fn

sin θ

1(n tanφ

tanθ+f−n+f

tanφtanθ

)sinθθ ∈ [φ, π

2 ]

n+√

fn

sin θ

12f tanφ cos θ

θ ∈ [0, φ]

(22)

Eq. (17) tells us that the above approximation is notoptimal in non-ideal cases (at least for θ > φ). The λ se-lection in LiSPSM makes F optimal only in the ideal casewhere θ = π/2.

Note that other possible generalized PRs can alsobe derived from Eq. (10), such as the generalized lin-ear perspective reparamterization (GLPR)4 which requiresF(z) ∼ z for given λ and θ values, where ∼ stands for thelinear dependency. This reparameterization essentiallyextends PSMs to non-ideal cases. The main problem ofGLPR is that the warping strength might be over-strongin some cases. Our experimental results show the com-parison of our GMNPR and GLPR.

Analysis

Figure 6 plots the aliasing distributions in LiSPSM (toprow) and GMNPR (bottom row) for the configuration n =1, f = 100, and φ = π/6. Due to the critical angle θ = φ inEq. (10), we compare them in the following two aspects:

Figure 6. Aliasing distributions.

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 561 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 10: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

Figure 7. Maximum error in F (left), maximum error in G (middle), and storage factor S∗ (right). A scale log2 is used.

� Non-degenerate cases θ > φ. The aliasing distributionin GMNPR, FGMNPR, is direction-invariant (in termsof minimum-norm) as the θ value changes. The aliasingerrors at boundaries of the depth range remain equalfor all possible θ values, whileFLiSPSM fluctuates withthe varying of θ. As θ decreases, the aliasing errorsat near regions in LiSPSM increase, but the shape ofFGMNPR keeps unchanged for varying θ values. Suchdirection-invariant feature is very useful for shadowrendering in dynamic scenes because the consistenttransition of shadow quality should be preserved aspossible during the user’s navigation/interaction.

� Degenerate cases θ ≤ φ. The values of both FLiSPSMand FGMNPR become extremely large for small θ

values. For better illustration, a log10 scale is used inFigure 6 now. As θ goes from φ to 0, all PRs cannot makeF optimal and converge to SSMs. The effectiveness ofthe perspective warping dramatically decreases suchthat no PR has any special advantage over others. Thisproblem is well known as the dueling frusta case inwhich the anti-aliasing (using single shadow map withgiven resolution) still remains unsolved in computergraphics.

Aliasing Distribution in the xDirection

So far, we have only discussed the aliasing distribution inthe z direction. The situation is slightly different in the xdirection. The width of light beams dt in the shadow mapcorresponds to a step dz/dt in world space for the x di-rection. Like our derivation of F, the perspective aliasingin the x direction, denoted G, can be written as:

G(λ, θ, z) = 1tan φ

1z

dx

dt= 1

tan φ

1z

1dt/dx

= 1tan φ

1z

1t′(x)

(23)

Computing the explicit representation t(x) fromEqs. (3–9) and plugging it into Eq. (23), we get the fol-lowing factorized form:

G(λ, θ, z) = ϕ1(λ, θ)z + ϕ2(λ, θ)

z(24)

where

ϕ1(λ, θ) =

2f(f−n+(f+n) tan φ

tanθ

)λ+(f−n)(1− tan φ

tanθ) sin θ

θ ∈ [φ, π2 ]

tan θλ tan φ

θ ∈ [0, φ]

ϕ2(λ, θ) ={(

f − n + (f + n) tan φtanθ

)λ + n

tan φtanθ

− n θ ∈ [φ, π2 ]

2fλtan φtan θ

+ f(

tan φtan θ

− 1)

θ ∈ [0, φ]

Instead of discussing G independently like whatwe have done on F, we effectively evaluate differ-ent reparameterizations by taking into account alias-ing errors in both z and x directions simultaneously.To be independent of shadow map and image res-olutions, we adopt the following “storage factor”proposed by Lloyd et al.9 as the metric of aliasingerrors:

S∗(λ, θ) = maxn≤z≤f

F × maxn≤z≤f

G, given λ and θ

Figure 7 plots the maximum errors in z, x directions,and the storage factor, respectively. Likewise, GMNPRproduces lower errors than in both directions whenθ > φ. This feature is very important because it balancesthe improvement of shadow quality in both directions,otherwise shadow details might be worse in one direc-tion. In degenerate cases θ < φ, though errors in LiSPSMare lower than that in GMNPR, it doesn’t make muchsense because all reparameterizations will not work welldue to the dueling frusta problem.

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 562 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 11: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

Figure 8. Testing scenes: Robots (11K), Dragon (51K), and Ceiling (23K).

Before we leave this section, we have an importantnote on the conclusion “PSMs, LiSPSMs, and some TSMsare equivalent in terms of the storage factor” (i.e., S∗ keepsconstant for different PRs) claimed by Lloyd et al.9 How-ever, it’s easy to prove that such invariance of S∗(λ, θ)doesn’t hold in the general case θ �= π/2 by using ourglobal representations of F and G, which means furtherresearch on PRs still remains challenging and valuable.In Figure 7, we can see that S∗ doesn’t keep constant ingeneral cases.

Results

We have developed our GMNPR using Microsoft Di-rectX SDK 9.0. We run the shadow rendering tests us-ing 800 × 600 image resolution, and the performance ismeasured by an Intel Pentium 4 2.8 GHz CPU with 1GRAM, a NVidia GeForce 6800Ultra GPU with 256M videomemory. In addition, we have compared our algorithmwith SSM, LiSPSM, and GLPR.4 Two virtual scenesare composed and tested in our experiments as shownin Figure 8. In our tests, a dynamic directional light-ing source and field of view 60◦ are set up. n = 1 m,f = 800 m, φ = π/6 are configured for all of tests. Allalgorithms achieve real-time performance in our exper-iments. We have a note here, there’s nearly no differ-ence between the implementations (also performance)of LiSPSMs and GMNNPR , except for the λ selection asshown in Eqs (21) and (22).

Robots

To verify the theoretical results shown in Figures 6 and 7,we compare different algorithms using this simple scenewhich consists of 49 uniformly placed objects. Figure 9shows two views at θ = 55◦ and 35◦. As we can see, SSMproduces the worst shadow quality for near objects. Since

GMNPR preserves the optimal aliasing distribution inmost general cases, the shadow quality in GMNPR isbetter than that in LiSPSM. The associated shadow mapsare listed as well. As we can see, the shadow maps inGMNPR preserves that near regions consume the ma-jority of shadow map resolution as the viewer or lightmoves.

Dragon

To further prove above results in practice, we com-pare the shadow quality for different view/light con-figurations using this complicated scene which containsmany randomly placed high-polygon objects. Figure 10shows the enhanced shadow rendering in both scenar-ios. More importantly, due to the direction-adaptive λ,a stable transition of shadow quality is achieved in ouralgorithm.

Ceiling

We use this scene to compare GMNPR with GLPRwhich is also a direction-adaptive PR technique. Figure11 shows two views and corresponding light’s views,where the blue frame represents the view frustum. InView-1, both GLPR and GMNPR produce satisfactoryshadow quality at near regions. From the associatedlight’s views, we can see the warping strength in GLPRis stronger than that in GMNPR. However, the over-strong warping strength in GLPR sometimes may causethe extremely unbalanced distribution of shadow details.When the viewer moves closer to the object, λGLPR be-comes too small such that the warped object only oc-cupies a very small portion of shadow map in practice.The shadow quality thus sharply decreases as shownin View-2. This problem is hard to be solved evenby using some optimization techniques like “unit cubeclipping”.7

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 563 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 12: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

Figure 9. Comparison of the shadow quality and associated shadow maps. The red rectangles zoom in the local shadow details.

Figure 10. Comparison of the shadow quality for different view/light configurations.

ConclusionIn this paper, we have proposed the GMNPR to enhancethe shadow rendering in 3D computer games. Ouralgorithm preserves the optimal aliasing distribution in

possible general cases. Such direction-invariant featureis very important for the consistent transition of shadowquality during user’s interaction with dynamic scenes.By using the generalized representation of aliasingerrors, our analysis explains different algorithms in a

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 564 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 13: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

Figure 11. Comparison of the shadow quality and corresponding light’s views. Note that the extremely stretched shadow detailsin GLPR due to the over-strong warping effect. The optimization technique “unit cube clipping”7 is used for both algorithms.

purely mathematical view. Our experimental resultshave shown the improved shadow quality by using ouralgorithm.

The first aspect in our future work is to approximatethe errors from an analytic way rather than a geometricintuition in Eq. (1). An important limitation in Eq. (1) isthat the approximation of errors holds valid only for thepoints along the z axis. Notice that such local restrictionis adopted in all current PR techniques. Therefore, theresultant optimal aliasing distribution (w.r.t minimum-norm) in both GMNPR and LiSPSMs can only beachieved in such local area. However, due to the “priorunknown” complexity of geometries in the space (e.g.,the objects lie on a non-z ray originated from the eye), thepractical visual quality might be extremely unbalancedin different scenes or unstable in different view/lightconfigurations. Therefore, it might be possible to breaksuch local restriction by approximating errors from ananalytic view. Second, since the computational modelused in this paper (Figure 3) assumes that the warpingdirection is parallel to the shadow plane, we would liketo further our work to derive other direction-adaptivereparameterizations by using arbitrary warping direc-tion. Finally, it would be also interesting to extend ouranalysis to other types of lights.

ACKNOWLEDGEMENTS

The work was supported by RGC research grant (grantno. 416007). Part of 3D models used in our experiments isdownloaded from http://www.planetquake.com and http://www.3dcafe.com

References

1. Lance W. Casting curved shadows on curved surfaces. InProceedings of SIGGRAPH’78, ACM Press, New York, NY,USA, 1978; 270–274.

2. Franklin CC. Shadow algorithms for computer graphics. InProceedings of SIGGRAPH’77, ACM Press, New York, NY,USA, 1977; 242–248.

3. Marc S, George D. Perspective shadow maps. In Proceedingsof SIGGRAPH’02, ACM Press, New York, NY, USA, 2002;557–562.

4. Zhang F, Xu L, Tao C, Sun H. Generalized linear perspectiveshadow map reparameterization. In VRCIA’06: Proceedingsof the 2006 ACM international conference on Virtual reality con-tinuum and its applications, ACM Press, New York, NY, USA,2006; 339–342.

5. Wimmer M, Scherzer D, Werner P. Light space per-spective shadow maps. In the Eurographics Symposium onRendering 2004. Eurographics, Eurographics Association,2004.

6. Tobias M, and Tan T-S. Anti-aliasing and continuity withtrapezoidal shadow maps. In the Eurographics Symposiumon Rendering 2004. Eurographics, Eurographics Association,2004.

7. Simon K. Perspective shadow maps: care and feeding. GPUGems. Addison-Wesley, 2004; 217–244.

8. Chong HY, Gortler SJ. A lixel for every pixel. In the Euro-graphics Symposium on Rendering 2004. Eurographics, Euro-graphics Association, 2004.

9. Brandon L, Tuft D, Yoon SE, Manocha D. Warping and par-titioning for low error shadow maps. In Proceedings of theEurographics Symposium on Rendering 2006, Eurographics As-sociation, 2006; 215–226.

10. Woo A, Poulin P, Fournier A. A survey of shadow algo-rithms. IEEE Computer Graphics and Application 1990; 10(6):13–32.

11. Tomas A-M, Chan E, Heidrich W, Kautz J, Kilgard M, Stam-minger M. Real-time shadowing techniques. In Proceedings

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 565 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 14: Generalized minimum-norm perspective shadow maps

F. ZHANG ET AL............................................................................................

of SIGGRAPH’04 Course Notes, ACM Press, New York, NY,USA, 2004.

12. Fernando R, Fernandez S, Bala K, Greenberg DP. Adaptiveshadow maps. In Proceedings of SIGGRAPH’01, ACM Press,New York, NY, USA, 2001; 387–390.

13. Lefohn AE, Sengupta S, Kniss J, Strzodka R, Owens JD. Glift:Generic, efficient, random-access gpu data structures. ACMTransactions on Graphics 2006; 25(1): 60–99.

14. Tadamura K, Qin X, Jiao G, Nakamae E. Rendering optimalsolar shadows with plural sunlight depth buffers. The VisualComputer 2001; 17(2): 76–90.

15. Zhang F, Sun H, Xu L, Lun LK. Parallel-split shadow mapsfor large-scale virtual environments. In VRCIA’06: Proceed-ings of the 2006 ACM International Conference on Virtual RealityContinuum and Its Applications, ACM Press, New York, NY,USA, 2006; 311–318.

16. Arvo J. Tiled shadow maps. In Proceedings of ComputerGraphics International 2004, IEEE Computer Society, 2004;240–247.

17. Govindaraju NK, Lloyd B, Yoon S-E, Sud A, Manocha D.Interactive shadow generation in complex environments.ACM Transactions on Graphics 2003; 22(3): 501–510.

18. Chan E, Durand F. An efficient hybrid shadow renderingalgorithm. In Proceedings of the Eurographics Symposium onRendering, Eurographics Association, 2004; 185–195.

19. Aila T, Tomas A-M. A hierarchical shadow volume algo-rithm. In Proceedings of Graphics Hardware 2004, Eurograph-ics Association, 2004; 15–23.

20. McCool MD. Shadow volume reconstruction from depthmaps. ACM Transactions on Graphics 2000; 19(1): 1–26.

21. Arvo J, Aila T. Optimized shadow mapping using the stencilbuffer. Journal of Graphics Tools 2004; 8(3): 23–32.

22. Sen P, Cammarano M, Hanrahan P. Shadow silhouette maps.ACM Transactions on Graphics 2003; 22(3): 521–526.

23. Arvo J, Hirvikorpi M. Compressed shadow maps. The VisualComputer 2005; 21(3): 125–138.

24. Reeves WT, Salesin DH, Cook RL. Rendering antialiasedshadows with depth maps. In Proceedings of SIGGRAPH’87,ACM Press, New York, NY, USA, 1987; 283–291.

25. Donnelly W, Lauritzen A. Variance shadow maps. InProceedings of the 2006 Symposium on Interactive 3D Graphics,SI3D 2006, Redwood City, ACM Press, California, USA,2006; 161–165.

26. Aila T, Laine S. Alias-free shadow maps. In the EurographicsSymposium on Rendering 2004, Eurographics, EurographicsAssociation, 2004; 161–166.

27. Johnson GS, Lee J, Burns CA, Mark WR. The irregularz-buffer: hardware acceleration for irregular data structures.ACM Transactions on Graphics 2005; 24(4): 1462–1482.

28. Brabec S, Annen T, Seidel H-P. Practical shadow mapping.Journal of Graphics Tools 2002; 7(4): 9–18.

29. Low K-L, Ilie A. Computing a view frustum to maximizean object’s image area. Journal of Graphics Tools 2003; 8(1):3–15.

30. Wang Y, Molnar S. Second-depth shadow mapping. Tech-nical report, University of North Carolina at Chapel Hill,Chapel Hill, NC, USA, 1994.

31. Weiskopf D, Ertl T. Shadow mapping based on dual depthlayers. In Proceedings of the Eurographics Symposium on Ren-dering 2003, Eurographics, Eurographics Association, 2003;53–60.

32. Hourcade JC, Nicolas A. Algorithms for antialiased castshadows. Computers and Graphics 1985; 9(3): 259–265.

Authors’ biographies:

Dr Fan Zhang received his Ph.D. from the Departmentof Computer Science and Engineering, The Chinese Uni-versity of Hong Kong, in 2007. His main research inter-ests include image-based rendering especially real-timeshadow rendering and novel rendering techniques forreal-time global illumination.

Dr Hanqiu Sun received her M.S. in electrical en-gineering from University of British, Columbia andPh.D. in computer science from University of Alberta,Canada. Dr Sun has published more than 100 refereedtechnical papers in VR/CG prestigious journals, bookchapters, and international conferences. She has servedas guest editors of MIT PRESENCE and Journal ofCAVW, program co-chair of ACM VRST 2002, orga-nization co-chair of Pacific Graphics 2005 and CGI2006, conference general chair of ACM VRCIA 2006,and numerous international program committees. Hercurrent research interests include virtual and augmentedreality, interactive graphics/animation, hypermedia,computer-assisted surgery, internet-based navigation,tele-medicine, realistic haptics simulation.

Chong Zhao received his B.S. degree in Computer Sci-ence from Jilin University, China and M.S. degree fromthe Math Institute, Chinese Academy of Science. He is

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 566 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav

Page 15: Generalized minimum-norm perspective shadow maps

MINIMUM-NORM PERSPECTIVE SHADOW MAPS...........................................................................................

currently a Ph.D. student in the Department of ComputerScience and Engineering, The Chinese University ofHong Kong. His main research interests include waveletsin graphics, geometry modeling in multi-resolution.

Lifeng Wang received the Ph.D. in computer graphicsfrom CAD&CG Lab of Zhejiang University, Hangzhou,China, in July 1999. After that he joined Microsoft Re-search Asia as a researcher from 1999 to 2006 in the In-ternet Graphics Group. He is now a research and devel-opment manager of the Media and Entertainment Divi-sion of Autodesk Inc., Shanghai. His research interestsfocus on interactive 3D graphics, realistic modeling andrendering algorithms, image-based rendering, and com-puter vision. He is a member of the IEEE.

............................................................................................Copyright © 2008 John Wiley & Sons, Ltd. 567 Comp. Anim. Virtual Worlds 2008; 19: 553–567

DOI: 10.1002/cav