HAL Id: inria-00084106
https://hal.inria.fr/inria-00084106
Submitted on 5 Jul 2006
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub-
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non,
Guillaume François, Sumanta Pattanaik, Kadi Bouatouch, Gaspard Breton
To cite this version:
Guillaume François, Sumanta Pattanaik, Kadi Bouatouch, Gaspard Breton. Subsurface Texture Map- ping. [Research Report] 2006. �inria-00084106�
a p p o r t
d e r e c h e r c h e
9-6399ISRNINRIA/RR--????--FR+ENG
Thème COG
Subsurface Texture Mapping
Guillaume Francois & Sumanta Pattanaik & Kadi Bouatouch & Gaspard Breton
N° ????
juillet 2006
GuillaumeFranois
∗
&SumantaPattanaik
†
& Kadi Bouatouh
‡
&
GaspardBreton
§
ThèmeCOGSystèmesognitifs
ProjetSiames
Rapportdereherhe n° ???? juillet200628pages
Abstrat: Subsurfae sattering within transluent objets is a omplex phenomenon.
Designingandrenderingthiskindofmaterialrequiresafaithfuldesriptionoftheiraspets
as well as a realisti simulation of their interation with light. This paper presents an
eientrenderingtehniqueofmultilayeredtransluentobjets. Wepresentanewmethod
for modeling and renderingsuh omplexorgani materialsmade up of multiple layersof
variable thikness. Based on the relief texturemapping algorithm, our method alulates
the single sattering ontribution for this kind of material in real-time using ommodity
graphishardware. Ourapproahneedsthealulationofdistanestraversedbyalightray
throughatransluentobjet. This alulationisrequiredforevaluatingtheattenuationof
light within the material. We use a surfae approximation algorithm to quikly evaluate
thesedistanes. Ourwholealgorithmisimplementedusingpixelshaders.
Key-words: Realtimegraphis,GPU, Subsurfaesattering
EnollaborationaveFraneTéléomR&DRennesetavel'UniversitédeFlorideCentrale(UCF)
∗
gfranoiirisa.fr
†
sumants.uf.edu
‡
kadiirisa.fr
§
gaspard.bretonfraneteleom.om
omplexe. Pourmodéliseretrendredetelsmatériaux,ilestnéessaired'avoirunedesription
adaptée de eux-i ainsi qu'une simulation réaliste de leurs interations ave la lumière.
Ce papier présente une tehnique de rendu adaptée aux matériaux multiouhes. Cette
nouvelle méthode permet de modéliser des matériaux organiques omplexes omposés de
ouhes multiples à épaisseur variable. Basée sur l'algorithme du relief mapping , notre
méthode permet le alul temps réel de la diusion simple pour e type de matériau, et
een exploitantlesperformanesdesartesgraphiques. Notreméthode néessitelealul
desdistanesparouruesparlalumièreàl'intérieurdesdiérentesouhesdumatériau. Ce
alulestnéessairepourl'évaluationdel'atténuationdelalumièreàl'intérieurdumatériau.
Nousproposonsd'utiliserunalgorithmed'approximationdesurfaepourréalisere alul
rapidement. Notrealgorithmeestimplementéàl'aidedepixel shader.
Mots-lés : Rendutempsreel,GPU,Diusionsous-surfaique
newpage
Contents
1 Introdution 4
1.1 RelatedWorkandMotivations . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 OurMethod 8
2.1 SubsurfaeTextureMapping . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 ReduedIntensityEstimation . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 Results 19
4 Conlusion and FutureWork 23
1 Introdution
Rendering realistimaterials is essential for reatingonvining images. The interations
betweenlightand materialsareoften modeled by aBRDF(BidiretionalReetane Dis-
tributionFuntion)whihassumesthatlightentersandexitsthesurfaeatthesamepoint.
This assumption does nothold for many materials suh as marble, wax, milk, leavesand
humanskin. Forthese transluentmaterials,lightdoesnotonlyreetothesurfae,but
sattersinsidethemediumbeforeleavingthesurfae. Thisphenomenonisalledsubsurfae
sattering. Sine suh materialsareoftenseenin ourday-to-daylife,itisessentialtooer
solutionsto therenderingoftransluentmaterials. Theeets ofsubsurfaesatteringare
multiple: theobjetsappearsmoothand softsinelight isdiused beneath their surfae.
For some omplex materials, this phenomenon an also exhibit their inner omposition.
Veinsarevisibleunderhumanskin,forinstane.
Figure1: Subsurfae texturemapping.
This paper presents a rendering tehnique for materials made up of multiple layers, the
thikness of whih is not neessarily onsidered as onstant unlike existing methods. In
suh a ase, the inner omposition of the material an be pereived as shown in Figure
1, exhibiting blurry details inside the transluent objet where the sattering parameters
vary. Weused theoneptofrelieftexturemapping[1℄tomodeltheinteriorofamaterial.
However, insteadof representing the surfaedetails, we use this method to representthe
innerstrutureoftheobjet. Therefore,thelayersofthematerialaredesribedbyasimple
2D texture, where eah hannel enodes a thikness. Sine our method is not limited to
loally at surfaes, auseful surfae approximationis used to quikly estimate thesingle
satteringterm.
Weproposeasimplebutrealistimethodthatoersareal-timeestimationofthesinglesat-
teringtermforsuhomplexmaterials. Ourmethodouldbeonsideredbetweensubsurfae
renderingmethods based on surfaes and 3D texture-basedalgorithms. Furthermore,our
solutionalsoprovidesaompatwaytodesigntransluentobjetsusingasmallamountof
data,whereas3Dtexturing requiresalargeamountofmemorystorage.
Thispaperisstrutured asfollows. Setion 1.1summarizestherelatedworksandpresents
ourmotivationswhileSetion1.2outlinesourmethod thatisdesribedindetailin Setion
2. Setion3showssomeresultsandSetion4onludes thispaper.
1.1 Related Work and Motivations
Theradiativetransport Equation[2℄, desribingthe subsurfaesattering phenomenon, is
tooomplexto befully omputedatinterativeframerates. Furthermore,theparameters
ofthisequationsuhasthesatteringoeientorthephasefuntion,anvaryinthease
ofnonuniformmediaortransluentobjet. Therefore,formaterialssuhasmarble,smoke,
orlayeredmaterialssuh asskinorplantleaves,weannotusetheapproximationsusually
proposedforsimplifying theequations.
Lightsattering within partiipatingmedia or transluent objets an beomputed using
multiplemethodssuhaspathtraing[3℄,volumetriphotonmapping[4℄anddiusionap-
proximation[5℄. Mostofthesemethodsoeranaurateestimationofsubsurfaesattering
foroinerenderingbutdoesnotallowafastrenderingoftransluentmaterials. However,
in most ases, the omputational ost of those methods prevents their use for real-time
renderingoftransluentobjets.
ThedipolebasedmethodduetoJensenetal[6℄andproposedinreal-timeby[7,8℄,dealswith
uniform materials, usinga BSSRDF model (bidiretional subsurfaesattering reetane
distribution funtion). Donner et al. [9℄ reently proposed amultipole based method to
estimatesubsurfaesatteringwithinlayeredmaterials. Thisnewmethod, extensionofthe
previousdipole approximation,providesrealistiresultslose to Monte Carloestimations.
Nevertheless,ifthealgorithmproposesrealistiandlosetophysiallyorretresults,itdoes
notoerinterativeframeratesusefulinmanyappliations. Anotherreal-timemethod[10℄
addresses sattering for general partiipating media but does not deal with multilayered
materials.
3Dtextures[11℄istheommonlyusedmethodtodesribeomplexandtransluentobjets.
Theyallowto desribetheinner omposition of anobjet,suh as theorgansof ahuman
body andthereby, as wellas therenderingof theinteriorofthe objets. Pathtraingan
be used for a orret estimation of subsurfae sattering. Implementation relying on 3D
texturesandusingtheGPUhavebeenproposedin[12℄. However,3Dtexturesrequirelarge
amounts ofdata whih an be amajor onstraintfor real-timerendering. Note that some
objets do notrequire aomplex desriptiondeep beneath thesurfae. For example, the
humanskinpresentspartiularities,suhasveins,withinasmalldepthbeneaththesurfae.
In this ase, 3D textures appear unneessary and limiting. For that partiular ase, we
needbothasurfaedesriptionandavolumedesription,givingfurtherdetailslosetothe
objet'ssurfaeonly.
In this paper, we propose a novel desription of omplex materials. Rather than using
the well-known 3D textures, we propose the use of simple 2D textures well handled by
graphishardware. Ourmethodanbeonsideredas analternativemethodforomputing
singlesatteringwithin multilayeredmaterialsinreal-time. Ourapproahallowsarealisti
desriptionofthelayersofvariablethiknessusingsubsurfaetexturemapping. Ourmethod
followsasimilaroneptthanrelieftexturemappingintroduedbyPoliarpoetal. [1℄and
reentlyproposedtodesribenon-height-eldsurfaedetailswithmultiplelayers[13℄. Relief
texturemappingoershighlyrealistiappearanetosynthetiobjetswhileusingasimple
geometry: ne details upon the surfae are represented with a 2D texture. However, in
our ase, the details are not above but beneath the surfae, whih reates, for instane,
partiularveinseet.
1.2 Overview
(a) (b)
Figure2: Figure2(a)presentsasimplelayeredmaterialandgure2(b)amaterialomposed
oflayerswithvariablethikness.
Inthispaperweproposeanewapproahtomodelingandreal-timerenderingoftransluent
organimaterials. Thematerialsonsideredinouraseareomposedofmultiplelayers,eah
one having partiular properties. In ontrast to methods using planarlayers,our method
omputes single sattering into layers of variable thikness (f. Figure 2). With these
material properties one an rendernew eets notvisible for layersof onstant thikness.
Inorder to provide areal-time but realisti rendering,welimitour omputation tosingle
sattering. Ourmethod,implementedongraphishardware,usesaraymarhingalgorithm
illustratedin Figure3.
Modeling of layered material requires information about the thikness of the layerssine
this thikness varies beneath the surfae. We propose in Subsetion 2.1 the use of a 2D
texturetostorethethiknessofeahlayer. Weusethistexturetodeterminethesattering
parameters. Theomputationofsubsurfaesatteringwithinthiskindofnonhomogeneous
material requires aknowledge of thelayers' parameters. To this end, wepropose apoint
andpathloalizationmethod.
Asshown inFigure 3,thereetedluminane at pointP isdueto singlesatteringevents
ourringalongtheviewingrayunderneaththeobjet'ssurfae. Weomputetheontribu-
tionsofaertainnumberofsamplepointsM ontheviewingrayuntilaertainpointMmax
afterwhihsatteringisonsideredasnegligible.
Figure3: Raymarhingalgorithmin amultilayeredmaterial.
The singlesattering ontribution, LM(P, ωout), at a visible point P and due to an inner
samplepointM ontheviewing ray,isexpressedas:
LM(P, ωout) = Q(M, ωout)e RP
M−σt(s)ds
(1)
Q(M, ωout) = σs(M)p(M, ωout, ωin)Lri(M, ωin), (2)
whereLri(M, ωin)isthereduedintensity atpoint M omingfromdiretion ωin andrep-
resentsthe amount ofinidentlightarriving at the inner pointM after attenuation. The terme
RP
M−σt(s)ds
representstheattenuationofthesatteredradianeduetoabsorptionand
satteringalongthepathfromM toP. p(M, ωout, ωin)isthephasefuntionanddesribes
howthelightomingfrom theinidentdiretionωinis satteredin theoutgoingdiretion
ωout at pointM.
Thetotalsattered radianedue tosingle satteringarriving atthe pointP is thesumof
theontributionsofallpointsMontheviewing ray:
L(P, ωout) =
Z Mmax
P
LM(P, ωout)dM (3)
Weevaluatethislastequationusingaraymarhingalgorithm,whihdisretizestheequation
as:
L(P, ωout) =
Mmax
X
P
LM(P, ωout)δM (4)
=
Mmax
X
P
Q(M, ωout)e RP
M−σt(s)ds
δM (5)
whereδM isthesamplingstepalongP Mmax.
Theterme RP
M−σt(s)ds
isestimatedbyaraymarhingalgorithm. Thislatterperformsdepth
omparisons to determine the extintion oeient σt for eah layer. The estimation of
the term Q(M, ωout) of Equation 1 requires the alulationof the redued intensity. We
showinSubsetion2.2thattheestimationofthereduedintensityneedsanestimateofthe
distane kKMk traversed by the light in thematerial. Weproposeamethod to ompute
anapproximate valueof thisdistane. Thisis one oftheontributionsofthis paper. The
singlesattering resultQ(M, ωout)at an inner point M alsodepends onthe properties of
thematerial. Thereby, weneedto determinethelayerin whihis loatedthepointM, to
knowforinstane theorrespondingsatteringoeientσs(M). Tothis end,wepropose
asimplematerial desriptionthat allowsfastpointloalization guided by textures. With
theseontributions,detailedinthenextsetion,real-timerenderingofsubsurfaesattering
in suh materialsan be ahieved using graphishardware. InSubsetion 2.3 we propose
implementationsolutionsforgraphishardware.
2 Our Method
We propose a simple but realisti solution to the rendering of multilayered materials. In
ourase,wedonotassumethelayerswithaonstantthikness. Welimitouromputation
ofsubsurfaesatteringtosinglesatteringtomeetthereal-timeonstraint. Thenexttwo
subsetions presentthe subsurfae texture mapping idea and a novel method to estimate
the redued intensity on arbitrary, non planar, polygonal surfae desribed by a mesh.
Thesolutions provided bythese two subsetions areombinedin our renderingalgorithm
presentedinSubsetion2.3.
2.1 Subsurfae Texture Mapping
In this setion, we present the notion of subsurfae texture used to desribe the internal
struture of a transluent objet. Our method, built on the same idea as relief texture
mappingproposed by [1℄, usesatextureas adepthmap whih allowstodesribeomplex
objets when mappedonto aat polygon as shown in Figure 4. We propose to use a2D
(a) (b) ()
Figure4: Subsurfae Mapping: TheFigure 4(a)presentsthesubsurfaetexture. Thered
hannel enodesalayerwith aonstantthikness,thegreen andblue ones desribelayers
omposed of veins with dierentwidth. The alphalayer,not visiblehere, enodes alayer
with a uniform thikness. Figure 4(b) shows the representation (ross-setion) of suh a
material. Figure4()showstheresultingimageobtainedwhenapplyingsuhamaterialon
anarbitrarysurfae.
texture to desribeour multilayeredmaterial. Indeed, thedepth ofeah non planarlayer
an beenoded usinga reliefmap. Thepresene ofthe four RGBαhannels of atexture
allowstodenethethiknessoffourlayers. Theredhannelisrelatedtotherstlayerand
theotherhannelstothefollowinglayers.
Asshownin Figure5,thedepthstoredineahhannelrepresentsthedistaneofthelayers
tothesurfaeinthediretionofthenormal. Thethiknessofalayeranbeobtainedusing
thedepthinformationstoredinto twoonseutivehannels. N texturesandesribeupto 4N layers,whihallowsaomplexdenitionofamultilayeredmaterial. Analgorithmusing raytrainganbeusedtoomputethesubsurfaetexturewheneah layerisdesribedby
amesh.
Estimatingthesinglesattering atapoint M beneaththe surfaerequires informationon thelayerin whihis loated M. Byomparingthe depth ofthe pointM and therelated
depthofeahlayersstoredinto thetexture,weandeterminethelayerofinterestanduse
itsspei parameters.
Theproessofmappingourtextureoflayerthiknessontoapolygonalsurfaeispresented
inFigure6andexplainedasfollows:
determineP M,withthepointM insidethemediumandlyingontheviewingray.
ProjetthevetorP M inthetangentspae(denedbythetangentT,normalN and
bi-normalB vetors).
(ds, dt) = (P M·T, P M·B)
Figure5: Denitionofthesubsurfaemap
usetheprojetedP M,(ds, dt), andthetextureoordinatesofthepointP,(uP, vP),
toomputethetextureoordinatesofM′: (uM′, vM′) = (uP, vP) + (ds, dt)
determine the layer of the point M by omparing its depth with the depths of the
layersstoredin thesubsurfaetextureat(uM′, vM′).
(a)Proleofthematerial (b)Projetedvetorintothetexture
Figure6: Projetionin thetangentspae.
ThisproessisillustratedinFigure6. PointPhasadepthequaltozero. 6(b) presentsthe
projetionof thevetorP M into thetexture spae. Note that thetangentand bi-normal
arerelatedto thetextureoordinates. Thetangentgivesthediretionofvariationoftheu
textureoordinateand thebi-normalgivesthediretion of thevariationofthe oordinate
v. Formoredetailssee[14℄and[1℄.
Thismappingallowsaomplexdesriptionoflayeredmaterialswith simpleloalizationof
points within it using a singletexture lookup. Wean desribe upto 4N layersusing N
RGBαtextures. This isoneof ourontributions. Wewill seein theSubsetion2.3 howto omputethesinglesatteringusingsuh amaterialdesription.
2.2 Redued Intensity Estimation
Thissetiongivesdetails onthealulationofthereduedintensityLri(M, ωin)(seeEqua-
tion 2) whih aounts for the attenuation of light within a multilayered material before
beingsattered. RefertoFigure7(a)fortheexplanationsgivenhereafter.
Forthesakeoflarity,werstonsidertheaseofasinglelayermaterialhavingaonstant
extintion oeientσt. The alulationof the reduedintensity depends onthe amount
oflightLi(K, ωin)impingingonto thesurfaeofthemediumatapointKand dependson
thedistane||KM||traversedbythelightraywithinthemedium. Thereduedintensityis
givenby:
Lri(M, ωin) =Li(K, ωin)e−σt||KM|| (6)
TheproblemanbereduedtotheomputationofthedistanekKMk,thetermLi(K, ωin)
is given by thelight soureintensity. This distane an be aurately obtainedusing ray
traing. Nevertheless,using thegraphis hardware,weannot omputeeasily theinterse-
tionbetweenthelightraySMandthesurfae. Forafastestimationofthedistane||KM||,
withoutthe need of detailed information about thesurfae, we propose to use planarap-
proximationsofthesurfaewhih,whenintersetedbythelightraySM,givesareasonable
estimateofthepositionofthepointK (seeFigure7).
Note that in [15℄ the authors present a method addressing a similar problem and imple-
mentedontheGPU.Theyuseaplanarapproximationmethodtoomputethepointhitby
areeted or a refratedray. Their method providesmore aurateresults and performs
planar approximations at runtime based on the model's geometry and rays (reeted or
refrated). Our method is faster sine all the planar approximations are performed in a
simplepreproessingstep,onlybasedonthemodel'sgeometryandthematerialproperties
(extintionoeient).
First,letusonsiderthepointsM ontheraypathlosetopointP. Inthisase,weobserve
thatreplaingthesurfaebyitstangentplaneatP oersareliableestimateofthedistane.
This isdue to theproximityof theintersetion betweenthe realsurfaeand thelightray
andtheintersetion ofthelightraywiththetangentplane. Mostof thelightsattered at
pointslosetoP strikesthesurfaeatpointsalsolosetothepointP. Figure7(b)presents
thesurfaeapproximation(inred)thatanbeusedforthesepointsM. NoteinFigure7(b)
thatthisapproahisnotreliablewhenthelightentersatpointsfarfromPsinethetangent
planegivesaninorretestimateofthelightentrypoint. Nevertheless,intheselatterases,
theattenuationoflightissigniantomparedtotheattenuationoflightimpingingontoa
loseneighborhood of P. This isdue to thedistane of lighttraversal. Weonsider then
that the tangent plane oersa reliableapproahof the surfaeto estimatethe sattering