The idea is simple enough: just create a map for each position at the inside of the mesh with a value that represents how much light would be received at that point from nearby surfaces. Sounds a lot like ambient occlusion so the idea is to use ambient occlusion baking but with the normals inverted. The only snag is that inside a mesh it is extremely unlikely that a ray will ever reach the sky (even impossible if the mesh is watertight), resulting in a black map. However, Blenders AO settings have a distance parameter that can be used to tell the AO baking that any ray that does not hit a surface within this distance is considered sky:
(Note that we do not even have to enable AO for our purpose, i.e. baking, just setting the distance to 0.1 or something will suffice)
Now we can create a map that approximates translucency with the following steps:
- Invert the normals on the mesh (they should all point inward)
- Bake the ambient occlusion to an image texture (documented here)
- Make sure you point the normals to the outside again
- Use the inverted values of the image as a translucency map.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirTpq1N2tTC_aecFtZBoOMBC6GyBPZ6Q8msAWkKxK9fvaj6OC55sCHB4H2-W7kChU5Ln_5LgVrgESukCY7S003FHk4yERXm6K6L6pmAJFx7Li-vnIY23ZEctZ69N8CDlpI0bAPNQ5wfA8/s320/translucent-head.png)
The noodle that uses this map to illustrate their values with an emission shader is shown below
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96n50wwfUpgU517gB0rKhQ76fUJDQIMyi2QhmYM7HC_SFmhUnfMUOPnwsvIOgrQUux8PeC_tGQR2bCEnffpIA4jd1fBC6K6uuwADxnTFJw8IkWX0dHrwT-cYppQYa8LtSulEgpMxJLIw/s320/translucent-head-noodle.png)
Now if this is really useful to for example tweak a subsurface scattering shader is up to you :-) If you create a skin shader with it I am eager to see the results.
No comments:
Post a Comment