Skip to main content
GameDev.net gamedev.net
🔒 Locked

Baking a Local Thickness Map

Started by Veiled Glitch Feb 6, 2014 at 8:59 AM 3 replies 14.6k views
Original Post
Veiled Glitch
Veiled Glitch

Hi guys wink.png .

As you know translucency is a big topic, and can be really expensive to simulate, therefore we prebake certain things, like a 'Local Thickness Map'. Which basically contains the distance from the current point to the one, well, behind, so the thickness, that can be locally mapped on a mesh, like this one:

112enic.png => 1zw1czq.png

The technique described by the paper by dice (

The offline approach described by the paper reads as following:


To streamline this, we rely on a normal-inverted computation of Ambient Occlusion 
(AO), which can be done offline (using your favorite modeling and rendering software) 
and stored in a texture. Since ambient occlusion determines how much environmental 
light arrives at a surface point, we use this information for the inside of the shape (since 
we flipped the normals), and basically averages all light transport happening inside the 
shape.

Though I'm not fully sure what they exactly mean, are they implying that it's a brute force AO ( raytracing ) with inverted normals?

So my question is really what approaches can I take at baking this map?

You reached the bottom, thanks for your time! smile.png

-MIGI0027

Chris_F
Chris_F

Though I'm not fully sure what they exactly mean, are they implying that it's a brute force AO ( raytracing ) with inverted normals?

You are calculating AO, but from and to the interior surface. The occlusion value is then inverted to get the local thickness value.

Reitano
Reitano

I did some research on this topic recently and apparently the latest version of xnormal has support for baking translucency maps. I haven't tried it yet and I'd be curious to see what results you'll achieve in your implementation.

eppo
eppo

Tried this out in Modo. Simply flip the polygons and bake an AO map.

nLqA16r.png

Tocs1001
Tocs1001

I know this topic is 14 days old but I started working on the subsurface scattering that uses these maps and needed a way to generate them. I found XNormal has a built in option for this type of map. It's called "Translucency" and not "Local Thickness". You won't need to flip your normals and such. It also has a C++ library if you want to integrate baking into some sort of tool you're building, and it's free.

Edit: Didn't read carefully enough XNormal was already suggested.

Edit: Here's the translucency map generated from XNormal used in the shader...

SiSiDHI.png

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.