This gives a ramp wave pattern that looks like small linear ramps that climb from the points at x=0 to x=1 and then abruptly drops to 0 again to repeat the ramp from x=1 to x=2. A slope map turns this simple linear ramp into almost any wave shape you want. The syntax is as follows...
Note that the [] brackets are part of the actual statement. They are not notational symbols denoting optional parts. The brackets surround each entry in the slope map. There may be from 2 to 256 entries in the map.
The NUM_1, NUM_2, ... are float values between 0.0 and 1.0 inclusive. POINT_SLOPE_1, POINT_SLOPE_2, ... are 2 component vectors such as <0,1> where the first value represents the apparent height of the wave and the second value represents the slope of the wave at that point. The height should range between 0.0 and 1.0 but any value could be used.
The slope value is the change in height per unit of distance. For example a slope of zero means flat, a slope of 1.0 means slope upwards at a 45 degree angle and a slope of -1 means slope down at 45 degrees. Theoretically a slope straight up would have infinite slope. In practice, slope values should be kept in the range -3.0 to +3.0. Keep in mind that this is only the visually apparent slope. A normal does not actually change the surface.
For example here is how to make the ramp slope up for the first half and back down on the second half creating a triangle wave with a sharp peak in the center.
The pattern function is evaluated and the result is a value from 0.0 to 1.0. The first entry says that at x=0 the apparent height is 0 and the slope is 1. At x=0.5 we are at height 1 and slope is still up at 1. The third entry also specifies that at x=0.5 (actually at some tiny fraction above 0.5) we have height 1 but slope -1 which is downwards. Finally at x=1 we are at height 0 again and still sloping down with slope -1.
Although this example connects the points using straight lines the shape is actually a cubic spline. This example creates a smooth sine wave.
This example starts at height 0.5 sloping up at slope 1. At a fourth of the way through we are at the top of the curve at height 1 with slope 0 which is flat. The space between these two is a gentle curve because the start and end slopes are different. At half way we are at half height sloping down to bottom out at 3/4ths. By the end we are climbing at slope 1 again to complete the cycle. There are more examples in slopemap.pov in the sample scenes.
A slope_map may be used with any pattern except brick, checker, hexagon, bumps, dents, ripples, waves, wrinkles and bump_map.
You may declare and use slope map identifiers. For example:
A normal map is specified by...
Where NUM_1, NUM_2, ... are float values between 0.0 and 1.0 inclusive. A NORMAL_BODY is anything that would normally appear inside a normal statement but the normal keyword and {} braces are not needed. Note that the [] brackets are part of the actual statement. They are not notational symbols denoting optional parts. The brackets surround each entry in the map. There may be from 2 to 256 entries in the map.
For example
When the gradient x function returns values from 0.0 to 0.3 then the scaled bumps normal is used. From 0.3 to 0.6 dents are From 0.6 up to 0.9 a blend of dents and a turbulent marble is used. From 0.9 on up only the turbulent marble is used.
Normal maps may be nested to any level of complexity you desire. The normals in a map may have slope maps or normal maps or any type of normal you want.
A normal map is also used with the average normal type. See "Average" for details.
Entire normals may also be used with the block patterns such as checker, hexagon and brick. For example...
Note that in the case of block patterns the normal wrapping is required around the normal information.
You may not use normal_map or individual normals with a bump_map. See section "Texture Maps" for an alternative way to do this.
Instead of placing the color of the image on the shape like an image map a bump map perturbs the surface normal based on the color of the image at that point. The result looks like the image has been embossed into the surface. By default, a bump map uses the brightness of the actual color of the pixel. Colors are converted to gray scale internally before calculating height. Black is a low spot, white is a high spot. The image's index values may be used instead (see section "Use_Index and Use_Color" below).
Where FILE_TYPE is one of the following keywords gif, tga, iff, ppm, pgm, png or sys. This is followed by the name of the file using any valid string expression. Several optional modifiers may follow the file specification. The modifiers are described below. Note that earlier versions of POV-Ray allowed some modifiers before the FILE_TYPE but that syntax is being phased out in favor of the syntax described here.
Filenames specified in the bump_map statement will be searched for in the home (current) directory first and, if not found, will then be searched for in directories specified by any +L switches or Library_Path options. This would facilitate keeping all your bump maps files in a separate subdirectory, and specifying a library path to them. Note that any operating system default paths are not searched unless you also specify them as a Library_Path.
By default, the bump pattern is mapped onto the x-y-plane. The bumps are projected onto the object as though there were a slide projector somewhere in the -z-direction. The bump pattern exactly fills the square area from (x,y) coordinates (0,0) to (1,1) regardless of the bitmap's original size in pixels. If you would like to change this default, you may translate, rotate or scale the normal or texture to map it onto the object's surface as desired.
The file name is optionally followed by one or more BITMAP_MODIFIERS. The bump_size, use_color and use_index modifiers are specific to bump maps and are discussed in the following sections. See section "Bitmap Modifiers" for other general bitmap modifiers.
After a bump_map statement but still inside the normal statement you may apply any legal normal modifiers except slope_map and pattern wave forms.
Section 7.6.2.2
Normal Maps
Section 7.6.2.3
Bump Maps
Section 7.6.2.3.1
Specifying a Bump Map
Table Of Contents