You are here: Home / Learn / Nuggets / Radiance Asphalt Material

Radiance Asphalt Material

Description and code for dry and wet asphalt by Giulio Antonutto

Scene files: asphalt_scene.zip

asphalt.png
  • Attach the material test to a polygon with a normal pointing up.
  • Place a light, select a view (0 0 1 looking at 0 1 0).
  • Compile (oconv) and view the result (rvu).

Save as model.mat:

#This is the asphalt material where you can change
#the dry.data and wet.data for different appearance
#It refers to a cal file, test.dat, which is used
#to read the data for the asphalt r table data.
#You can find other r table data into the calculux software.
void plasdata test
6 refl dry.data test.cal alfa gamma beta
0
4 .07 .07 .07 1
void light light
0
0
3 1 1 1

Save as model.rad:

#polygon looking up
test polygon road
0
0
12
-100 -100 0
-100 100 0
100 100 0
100 -100 0
#simple light source
light sphere L
0
0
4 0 10 10 .1

Save as test.cal:

alfa(x,y,z) = (180/3.14159265)*Asin(-Dx*Nx-Dy*Ny-Dz*Nz);

gamma(x,y,z) = (180/3.14159265)*Acos(x*Nx + y*Ny + z*Nz);

beta(x,y,z) = if(sqrt(x^2+y^2),(180/3.14159265)*Acos((x/sqrt(x^2+y^2))*(Dx/sqrt(Dx^2+Dy^2))+(y/sqrt(x^2+y^2))*(Dy/sqrt(Dx^2+Dy^2))),0);

refl(v,x,y,z) = if((x*Nx + y*Ny + z*Nz),v/(100000*(x*Nx + y*Ny +z*Nz)^3),0);

Save as dry.data:

3
0 0 3
0 1 90
0 0 29
0.00
14.04
26.57
36.87
45.00
51.34
56.31
60.26
63.43
68.20
71.57
74.05
75.96
77.47
78.69
79.70
80.54
81.25
81.87
82.41
82.87
83.29
83.66
83.99
84.29
84.56
84.81
85.03
85.24

0 0 20
0
2
5
10
15
20
25
30
35
40
45
60
75
90
105
120
135
150
165
180
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
7700  7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700    7700
7100  7080    7030    7100    7120    7100    7080    7080    7070    7040    7020    7080    6980    7020    7040    7140    7080    7240    7190    7230
5860  5820    5870    5810    5810    5760    5700    5670    5640    5560    5480    5410    5310    5440    5460    5620    5660    5870    5810    5890
4680  4670    4650    4550    4570    4460    4300    4200    4100    3990    3890    3830    3730    3840    3910    4120    4190    4370    4380    4450
3780  3720    3730    3630    3470    3310    3140    2990    2850    2730    2630    2600    2500    2650    2780    2950    3050    3180    3230    3290
3080  3040    3050    2850    2700    2440    2180    2030    1930    1850    1790    1730    1730    1830    1940    2070    2240    2370    2380    2450
2580  2540    2510    2290    2030    1780    1570    1430    1340    1280    1240    1200    1200    1320    1400    1550    1630    1770    1790    1840
2170  2140    2050    1820    1530    1290    1100    1000    950     900     870     840     880     980     1030    1160    1230    1340    1370    1380
1880  1810    1740    1420    1160    950     800     730     690     640     620     640     640     720     780     880     950     1050    1080    1090
1450  1360    1210    900     660     530     460     410     390     370     360     360     390     440     500     550     600     660     690     710
1180  1080    870     570     410     320     280     260     250     230     220     230     250     280     310     370     410     450     470     510
970   870     640     390     260     200     180     170     160     150     150     160     170     190     230     270     300     330     350     370
800   690     500     290     170     140     130     120     110     110     110     110     130     150     170     190     220     260     270     290
700   580     370     210     130     100     90      80      80      80      80      90      100     120     140     160     170     200     210     220
600   510     290     150     90      70      70      60      60      60      60      70      70      90      100     120     140     170     170     180
520   410     230     120     70      60      60      60      50      40      0       0       0       0       0       0       0       0       0       0
480   360     190     80      60      50      50      50      50      0       0       0       0       0       0       0       0       0       0       0
440   320     170     70      60      50      50      50      0       0       0       0       0       0       0       0       0       0       0       0
410   280     140     60      50      40      40      40      0       0       0       0       0       0       0       0       0       0       0       0
370   260     120     60      40      30      30      0       0       0       0       0       0       0       0       0       0       0       0       0
340   230     110     50      40      30      30      0       0       0       0       0       0       0       0       0       0       0       0       0
320   210     90      50      40      30      30      0       0       0       0       0       0       0       0       0       0       0       0       0
290   190     80      40      30      30      0       0       0       0       0       0       0       0       0       0       0       0       0       0
270   170     70      40      30      30      0       0       0       0       0       0       0       0       0       0       0       0       0       0
260   160     60      30      30      30      0       0       0       0       0       0       0       0       0       0       0       0       0       0
250   160     60      30      20      10      0       0       0       0       0       0       0       0       0       0       0       0       0       0
230   150     60      30      20      10      0       0       0       0       0       0       0       0       0       0       0       0       0       0
220   140     60      30      20      0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
210   140     50      30      20      0       0       0       0       0       0       0       0       0       0       0       0       0       0       0

0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0

Save as wet.data:

3
0 0 3
0 1 90
0 0 29
0.00
14.04
26.57
36.87
45.00
51.34
56.31
60.26
63.43
68.20
71.57
74.05
75.96
77.47
78.69
79.70
80.54
81.25
81.87
82.41
82.87
83.29
83.66
83.99
84.29
84.56
84.81
85.03
85.24

0 0 20
0
2
5
10
15
20
25
30
35
40
45
60
75
90
105
120
135
150
165
180
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0



1149  1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149    1149
1117  1117    1117    1121    1129    1125    1117    1113    1113    1105    1097    1085    1064    1060    1056    1069    1073    1077    1081    1081
1206  1218    1206    1170    1154    1089    1028    988     947     915     882     850     818     826     830     854     862     878     886     890
1777  1769    1769    1692    1429    1145    915     809     712     672     631     587     575     587     599     619     635     656     668     676
3262  3193    2971    2339    1623    1077    712     583     474     437     405     385     389     405     417     441     449     478     486     494
5545  5262    4327    2777    1457    830     474     376     300     279     263     259     263     275     291     312     324     344     352     364
8103  7399    5379    2789    1137    583     295     243     198     186     174     174     182     198     206     223     235     251     259     267
10523 9212    6144    2615    854     405     190     158     134     125     121     121     125     142     150     166     174     190     194     202
12458 10799   6472    2117    652     279     121     109     97      89      85      89      93      105     113     125     134     146     150     158
15785 12223   5525    1113    267     134     69      61      53      49      49      53      53      65      69      77      85      93      97      101
16991 12045   4270    611     105     61      36      32      32      32      32      32      36      40      45      53      57      65      69      73
17084 10969   2926    291     57      32      20      20      16      20      24      24      24      28      32      36      40      49      49      53
16639 9621    2028    146     32      20      16      12      12      12      16      16      16      20      24      28      32      36      36      40
15028 7852    1311    77      24      16      12      12      12      12      12      12      12      16      20      24      24      28      28      32
13296 6306    765     49      16      12      8       8       8       8       12      12      12      12      16      20      20      24      24      28
11495 4978    506     28      12      12      12      8       8       8       0       0       0       0       0       0       0       0       0       0
10111 3910    304     20      12      12      12      8       8       0       0       0       0       0       0       0       0       0       0       0
8949  3088    206     16      8       8       8       8       0       0       0       0       0       0       0       0       0       0       0       0
7630  2424    142     16      8       8       8       8       0       0       0       0       0       0       0       0       0       0       0       0
6601  1906    101     12      8       8       8       0       0       0       0       0       0       0       0       0       0       0       0       0
5658  1506    81      12      8       8       8       0       0       0       0       0       0       0       0       0       0       0       0       0
4812  1214    61      8       8       8       8       0       0       0       0       0       0       0       0       0       0       0       0       0
4145  1008    49      8       8       8       0       0       0       0       0       0       0       0       0       0       0       0       0       0
3606  850     40      8       4       4       0       0       0       0       0       0       0       0       0       0       0       0       0       0
3173  712     32      8       4       4       0       0       0       0       0       0       0       0       0       0       0       0       0       0
2777  611     28      8       4       4       0       0       0       0       0       0       0       0       0       0       0       0       0       0
2424  530     24      8       4       4       0       0       0       0       0       0       0       0       0       0       0       0       0       0
2153  465     20      8       4       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
1939  417     20      8       4       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0

0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
0     0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0
by RFritz – last modified Jun 16, 2016 01:31 PM