# Baking a Local Thickness Map

This topic is 1795 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys  .

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:

=>

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!

-MIGI0027

##### Share on other sites

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.

Edited by Chris_F

##### Share on other sites

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.

##### Share on other sites

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

Edited by eppo

##### Share on other sites

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: Here's the translucency map generated from XNormal used in the shader...

Edited by Tocs

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 28
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634111
• Total Posts
3015573
×