3
$\begingroup$

The bent normal is the direction where most ambient light comes from. The median ray that did not intersect the mesh.

It is not the same as object space normals. A bent normal map could be baked in object space or in tangent space.

Bent normal maps are used to for more realistic realtime shading (GI approximation, specular occlusion)

Some links of where I got the info:

So how would I bake a bent normal map using Blender (with Cycles)?

$\endgroup$
1
  • $\begingroup$ Probably the solution is to create an OSL script node. $\endgroup$ Nov 14, 2019 at 16:35

1 Answer 1

4
$\begingroup$

I managed to write an Open Shading Language script that provides an ambient amount output (AO) and a direction vector from which the most ambient light came from. This can be used to create the bent normal map.

To use it, switch render engine to Cycles in CPU mode and enable the Open Shading Language checkbox.

For the object from which you want to bake the Bent Normals add a material if there isn't one yet. In the Material Node Editor add a Script Node and select this script: AmbientOcclusionDirection.osl

Make sure the input Normal node is connected to the Normal from a Geometry input node. And the output NonOccludedDirection node to the Normal node of the shader.

Bent Normals Noodle

Then bake as you would bake a normal normal map :-)

To check if the Distance and Samples settings are reasonable before baking, connect the AmbientAmount to the color and make sure the AO gradient is nice.

$\endgroup$
1
  • $\begingroup$ To quote on; "Then bake as you would bake a normal normal map", There are so many ways to bake a normal map. To start in tangent and in object space. How can I get a normal map out of this in object space? $\endgroup$
    – clankill3r
    Apr 23 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.