DRAFT
The issue is about the same for procedural materials and procedural textures. I'll just say textures for the rest of this note, but it generally goes for both. Some of these are written so that they automatically work properly for surfaces in multiple orientations. (I'm hoping to find time this summer to generalize this approach, coding textures relative to the surface normal, therefore relative polygon coordinates, rather than world coordintes, and thereby make the following points nearly obsolete. Then we can use the fully 3D textures more easily in the next version of DW, which will automatically swap in snazzy materials on Export>Radiance (as well as exporting a commented ~.rif file, etc.)...)
Many textures (most?) textures, however, need to be rotated to match the face you're modifying. So the issue usually is: how to do that. There's a major but sly clue in the Radiance web docs at
http://radsite.lbl.gov/radiance/man_html/ray.html#Materials
where it says "transform", but what (the __) that means is only described elsewhere.
Texfunc:
mod texfunc id
4+ xpert ypert zpert funcfile transform
0
n A1 A2 .. An
I can't recall just where this is spelled out more clearly. I have seen it somewhere. But I'll take a shot at just explaining it. Basically, you can add one or more "tweaks" to transform the materials function, at the end of the texfunc description where it says "transform". Each tweak will consist of a command line flag for a transformation, followed by a value, in degrees for rotational transforms. The flags follow the syntax of the radiance xform function, as documented at
http://radsite.lbl.gov/radiance/man_html/xform.1.html
The wierd thing is you just use the flags, not the whole xform function. It's just like xform is built in to the processing of texfunc (which I think is actually the case).
My favorite transforms are -rx N, -ry N, -rz N, for rotations about the given axis, where N is the value in degrees, and -s N, where N is a scaling factor to change the size.
For each transformation you add, you need to increase the parameters count (the number at the beginning of the line) by 2, 1 for the flag, and one for the value.
In case that's clear as mud, here's an example of a floor tile, rotated to use as a wall tile. (Three versions, for floor (up facing), south-facing, and west facing.):
If you actually want to use this example, you'll need the wobbly_tile.cal and colour_tile.cal functions, which you can grab from Auckland at:
###### tile material #1, for floor #########
# clay tiles with grout, compound material definition
# clay_tiles.mat (From Auckland)
#
# a fairly useful clay_tile texture. The tiles are "wobbled"
# and have colour variation. The mortar colour is white, the
# tile colour is mainly orange-red.
#
#grout width= 0.04; tile dimensions=1.0 x 1.0; wobble=0.1; noise=0;
#
void texfunc tile_texture
4 tile_x tile_y tile_z ~matthews/materials/wobbly_tile.cal
0
5 .04 1.0 1.0 .1 0
#
#grout width= 0.04; tile dimensions=1.0 x 1.0, color wobble=0.05; noise=0;
# color of grout=1, 1, 1; color of tile .39, .28, .12
#
tile_texture colorfunc tile_colour
4 tred tgreen tblue ~matthews/materials/colour_tile.cal
0
11 .04 1.0 1.0 .05 0
1 1 1
.39 .28 .12
#
tile_colour plastic clay_tiles
0
0
5 1 1 1 0.1 0
#
#use "clay_tiles" as the material for your geometry objects
###### tile material #2, for South Elevations #########
# clay tiles with grout, compound material definition
# clay_tiles.mat (From Auckland)
#
# a fairly useful clay_tile texture. The tiles are "wobbled"
# and have colour variation. The mortar colour is white, the
# tile colour is mainly orange-red.
#
#grout width= 0.04; tile dimensions=1.0 x 1.0; wobble=0.1; noise=0;
#
void texfunc tile_texture_south
6 tile_x tile_y tile_z ~matthews/materials/wobbly_tile.cal -rx 90
0
5 .04 1.0 1.0 .1 0
#
#grout width= 0.04; tile dimensions=1.0 x 1.0, color wobble=0.05; noise=0;
# color of grout=1, 1, 1; color of tile .39, .28, .12
#
tile_texture_south colorfunc tile_colour_south
6 tred tgreen tblue ~matthews/materials/colour_tile.cal -rx 90
0
11 .04 1.0 1.0 .05 0
1 1 1
.39 .28 .12
#
tile_colour_south plastic clay_tiles_south
0
0
5 1 1 1 0.1 0
#
#use "clay_tiles_south" as the material for your geometry objects
###### tile material #3, for West Elevations #########
# clay tiles with grout, compound material definition
# clay_tiles.mat (From Auckland)
#
# a fairly useful clay_tile texture. The tiles are "wobbled"
# and have colour variation. The mortar colour is white, the
# tile colour is mainly orange-red.
#
#grout width= 0.04; tile dimensions=1.0 x 1.0; wobble=0.1; noise=0;
#
void texfunc tile_texture_west
6 tile_x tile_y tile_z ~matthews/materials/wobbly_tile.cal -ry 90
0
5 .04 1.0 1.0 .1 0
#
#grout width= 0.04; tile dimensions=1.0 x 1.0, color wobble=0.05; noise=0;
# color of grout=1, 1, 1; color of tile .39, .28, .12
#
tile_texture colorfunc tile_colour_west
6 tred tgreen tblue ~matthews/materials/colour_tile.cal -ry 90
0
11 .04 1.0 1.0 .05 0
1 1 1
.39 .28 .12
#
tile_colour_west plastic clay_tiles_west
0
0
5 1 1 1 0.1 0
#
#use "clay_tiles_west" as the material for your geometry objects
http://archpropplan.auckland.ac.nz/Graphics/radiance/functions/wobbly_tile.html
http://archpropplan.auckland.ac.nz/Graphics/radiance/functions/colour_tile.html
These function files are really just text files that need to be where your texfunc description says they are. Otherwise you don't need to do anything to them directly -- they just sit there for Radiance to look at.