Next we come to the NORMAL_STMT.
Note that light given by diffuse
, highlights, reflection
and refraction
depends on the normal to the surface of the object.
For some objects (like planes) the surface normal is explicitly given, for other
it is obvious (like boxes (except at the edges), spheres, tori, etc. ).
It is not for all objects an easy problem to calculate the surface normal.
For an implicitly given (iso)surface
via a -function ,
the normal to in a point is described by the gradient
Furthermore, natural objects usually don't have mathematically perfect surfaces but irregularities like bumps, cracks or some graininess, and it would be very time-consuming to model them. Cheaper is to modify only the (virtual) normal to the object. This can be done in various ways inside the texture statement by the normal statement:
NORMAL: normal { [NORMAL_IDENTIFIER] [NORMAL_TYPE] [NORMAL_MODIFIER...] } NORMAL_TYPE: PATTERN_TYPE [Amount] | bump_map { BITMAP_TYPE "bitmap.ext" [BUMP_MAP_MODS...]} NORMAL_MODIFIER: PATTERN_MODIFIER | NORMAL_LIST | slope_map { SLOPE_MAP_BODY } | normal_map { NORMAL_MAP_BODY } | bump_size Amount | no_bump_scale Bool | accuracy FloatThere are four basic NORMAL_TYPEs. They are: