From my understanding, the closest concept Radiance has to a normal map is texdata. The general approach is described in this archived post. I have followed the approach as follows:
I have a normal.cal
defined:
{
normal.cal - A normal texture mapping file
A1 = intensity
}
pass_dx(dx,dy,dz)=dx*A1;
pass_dy(dx,dy,dz)=dy*A1;
pass_dz(dx,dy,dz)=dz*A1;
nopert(dx,dy,dz)=0;
And I am assigning a texture like so:
void texdata normal_map
9 pass_dx pass_dy pass_dz normal_x.dat normal_y.dat normal_z.dat normal.cal frac(Lu) frac(Lv)
0
1 1
normal_map plastic some_material
0
0
5 .5 .5 .5 0 0
To generate the data files, I am using pvalue -o texture_normal.pic > texture_normal.dat
, then splitting up the columns into separate data files using a Python script. Here is an example of an outcome with this technique, with all 3 X, Y and Z perturbed.
The normal map applied to the wall looks like this:
However, I am noticing that the perturbation only really impacts X, and Y, not Z. True enough, if I change the material definition to 9 nopert nopert pass_dz norm ... etc
then the effect entirely disappears. In addition, as the effect is only done on X and Y, changing A1
has a limited effect. A value of “0” compared to “1” for A1
has a noticeable change, as 0 is no effect. However, changing A1
from 10
to 100000
has no visible change.
To better illustrate my point, here is the same render but this time with no normal map applied at all. This is the base case: a smooth wall with no fancy tricks.
And now here is the render again, but with nopert nopert pass_dz
, so that only Z perturbation is applied. As you can see, it has an effect on the light (the glow on the upper portion of the wall disappears), but absolutely no effect on shadowing, creating a smooth and unnatural effect.
In contrast (no pun intended) in other rendering packages, the Z value affects shadow calculation. So here is the same normal map applied and rendered in Blender’s Cycles engine - the left half has an intensity of 1, and the right has an intensity of 5. The impact is very strong and visible.
Is this a limitation of Radiance, and it cannot use normal maps like other software? Is there any alternative?