Mesh normals in cal files

I just noticed that the perturbed mesh normal is unavailable in the .cal file language. Is that an oversight, or a major difficulty?

When I use the following code, my mesh appears very triangulated, but when I use "void plastic def" it appears smooth.

Mark

···

---------
{
   brighten_normal.cal
   make a surface brighter if the normal faces the viewer
}

br = Rdot*Rdot;

---------
void brightfunc surffunc
2 br brighten_normal.cal
0

surffunc plastic def
0
5 0.14 0.07 0.07 0.0 0.0

def mesh theblob
13 smoothed.msh -t 0 0 -1.75 -rx 180 -rz 45 -rx -35 -rz 30
0

Hi Mark,

Just like a tessellated surface, a mesh in Radiance is represented as the individual polygons and the Nx, Ny, Nz, and Rdot variables correspond to the actual "unperturbed" surface normals. The only time the perturbed values are known is during material evaluation, which is why plastic comes out looking smooth. If you want to play with the perturbed value, you'll have to utilize the NxP, NyP, NzP, and RdotP variables that are available from the brdf primitives.

-Greg

···

From: Mark Stock <[email protected]>
Date: June 16, 2005 6:01:40 AM PDT

I just noticed that the perturbed mesh normal is unavailable in the .cal file language. Is that an oversight, or a major difficulty?

When I use the following code, my mesh appears very triangulated, but when I use "void plastic def" it appears smooth.

Mark

---------
{
  brighten_normal.cal
  make a surface brighter if the normal faces the viewer
}

br = Rdot*Rdot;

---------
void brightfunc surffunc
2 br brighten_normal.cal
0

surffunc plastic def
0
5 0.14 0.07 0.07 0.0 0.0

def mesh theblob
13 smoothed.msh -t 0 0 -1.75 -rx 180 -rz 45 -rx -35 -rz 30
0

But won't solve the problem, though, of defining a surface attribute based on the normal of a smoothed mesh object. It seems that the only way to do this would be to try to encode the normal direction into the texture coordinates. Hmmm.

Mark

···

On Thu, 16 Jun 2005, Greg Ward wrote:

Hi Mark,

Just like a tessellated surface, a mesh in Radiance is represented as the individual polygons and the Nx, Ny, Nz, and Rdot variables correspond to the actual "unperturbed" surface normals. The only time the perturbed values are known is during material evaluation, which is why plastic comes out looking smooth. If you want to play with the perturbed value, you'll have to utilize the NxP, NyP, NzP, and RdotP variables that are available from the brdf primitives.

-Greg

From: Mark Stock <[email protected]>
Date: June 16, 2005 6:01:40 AM PDT

I just noticed that the perturbed mesh normal is unavailable in the .cal file language. Is that an oversight, or a major difficulty?

When I use the following code, my mesh appears very triangulated, but when I use "void plastic def" it appears smooth.

Mark

---------
{
  brighten_normal.cal
  make a surface brighter if the normal faces the viewer
}

br = Rdot*Rdot;

---------
void brightfunc surffunc
2 br brighten_normal.cal
0

surffunc plastic def
0
5 0.14 0.07 0.07 0.0 0.0

def mesh theblob
13 smoothed.msh -t 0 0 -1.75 -rx 180 -rz 45 -rx -35 -rz 30
0

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev