home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / misc / recurtex.inc < prev    next >
Text File  |  1994-12-31  |  10KB  |  347 lines

  1.  
  2. // For any particular frame, we pull in the last one as the image map
  3. if (frame == 0)
  4.    define wall_image 0
  5. else if (frame == 1)
  6.    define wall_image image("out000.tga")
  7. else if (frame == 2)
  8.    define wall_image image("out001.tga")
  9. else if (frame == 3)
  10.    define wall_image image("out002.tga")
  11. else if (frame == 4)
  12.    define wall_image image("out003.tga")
  13. else if (frame == 5)
  14.    define wall_image image("out004.tga")
  15. else if (frame == 6)
  16.    define wall_image image("out005.tga")
  17. else if (frame == 7)
  18.    define wall_image image("out006.tga")
  19. else if (frame == 8)
  20.    define wall_image image("out007.tga")
  21. else if (frame == 9)
  22.    define wall_image image("out008.tga")
  23. else if (frame == 10)
  24.    define wall_image image("out009.tga")
  25.  
  26. //
  27. // "wire_exper" returns 1 if we are on the visible part of the surface,
  28. // and returns 0 if we are on the see-through part of the surface.
  29. //
  30. define density 0.5
  31. define freq 0.5
  32. define wall_exper (noise(freq*P, <2, 0.7, 3>) > density ? 1 : 0)
  33. define wall_color  <0.71, 0.65, 0.26>
  34. define lep_map
  35.    color_map([0.0, 0.2, yellow, orange]
  36.              [0.2, 0.4, orange, wall_color]
  37.          [0.4, 0.6, wall_color, brown]
  38.          [0.6, 0.8, brown, tan]
  39.          [0.8, 1.0, tan, sienna])
  40. if (complexity == 0)
  41. define wall_texture matte_white
  42. else
  43. define wall_texture
  44. texture {
  45.    layered
  46.       texture {
  47.      special surface {
  48.         ambient wall_exper * wall_color, 0.2
  49.         diffuse wall_exper * wall_color, 0.5
  50.         specular wall_exper * wall_color, 0.5
  51.         microfacet Cook 5
  52.         transmission white, 1 - wall_exper, 1.0
  53.         // reflection white, wall_exper
  54.         }
  55.      },
  56.       texture {
  57.      special matte {
  58.         color lep_map[leopard_fn]
  59.         }
  60.      }
  61.       }
  62.  
  63. define diffusion_obj_map
  64.    color_map([0.0, 0.2, white, white]
  65.          [0.2, 0.6, white, orange]
  66.          [0.6, 1.0, orange, coral])
  67.  
  68. define diffusion_obj_texture
  69.    texture { special shiny { color diffusion_obj_map[noisy_onion_fn] } }
  70.  
  71. define Grnt0a
  72. texture {
  73.    noise surface {
  74.       color white
  75.       position_fn 1
  76.       lookup_fn 1
  77.       octaves 6
  78.       turbulence 5
  79.       ambient 0.2
  80.       diffuse 0.6
  81.       specular 0.3
  82.       microfacet Reitz 5
  83.       color_map(
  84.      [0.000, 0.153, <0.729, 0.502, 0.451>, 0.306,
  85.             <0.769, 0.686, 0.592>, 0.792]
  86.      [0.153, 0.398, <0.769, 0.686, 0.592>,  0.792,
  87.             <0.843, 0.753, 0.718>,  0.396]
  88.      [0.398, 0.559, <0.843, 0.753, 0.718>,  0.396,
  89.             <0.780, 0.667, 0.561>,  0.976]
  90.      [0.559, 0.729, <0.780, 0.667, 0.561>,  0.976,
  91.             <0.741, 0.659, 0.576>,  0.820]
  92.      [0.729, 1.001,  <0.741, 0.659, 0.576>, 0.820,
  93.              <0.729, 0.502, 0.451>,  0.306])
  94.       }
  95.    }
  96.  
  97. //-----Alpha Creams With Cracks
  98. define Grnt9a
  99. texture {
  100.    noise surface {
  101.       color white
  102.       position_fn 1
  103.       lookup_fn 1
  104.       octaves 6
  105.       turbulence 5
  106.       ambient 0.2
  107.       diffuse 0.6
  108.       specular 0.3
  109.       microfacet Reitz 5
  110.    color_map(
  111.       [0.000, 0.216, <0.812, 0.812, 0.812>, 0.835,
  112.       <0.745, 0.843, 0.835>, 0.847]
  113.       [0.216, 0.241, <0.745, 0.843, 0.835>, 0.847,
  114.       <0.404, 0.337, 0.337>, 0.463]
  115.       [0.241, 0.267, <0.404, 0.337, 0.337>, 0.463,
  116.       <0.773, 0.729, 0.745>, 0.622]
  117.       [0.267, 0.759, <0.773, 0.729, 0.745>, 0.622,
  118.       <0.914, 0.843, 0.725>, 0.651]
  119.       [0.759, 0.784, <0.914, 0.843, 0.725>, 0.651,
  120.       <0.153, 0.133, 0.208>, 0.437]
  121.       [0.784, 0.810, <0.153, 0.133, 0.208>, 0.437,
  122.       <0.812, 0.812, 0.812>, 0.835]
  123.       [0.810, 1.001, <0.812, 0.812, 0.812>, 0.835,
  124.       <0.812, 0.812, 0.812>, 0.835])
  125.    }
  126. }
  127.  
  128. //---------- Transparent Green Moss Colors
  129. define Grnt23a
  130. texture {
  131.    noise surface {
  132.       color white
  133.       position_fn 1
  134.       lookup_fn 1
  135.       octaves 6
  136.       turbulence 5
  137.       ambient 0.2
  138.       diffuse 0.6
  139.       specular 0.3
  140.       microfacet Reitz 5
  141.    color_map(
  142.       [0.000, 0.168, <0.824, 0.725, 0.584>, 0.600,
  143.       <0.514, 0.584, 0.533>, 0.600]
  144.       [0.168, 0.301, <0.514, 0.584, 0.533>, 0.600,
  145.       <0.298, 0.376, 0.318>, 0.600]
  146.       [0.301, 0.398, <0.298, 0.376, 0.318>, 0.600,
  147.       <0.263, 0.337, 0.282>, 0.700]
  148.       [0.398, 0.558, <0.263, 0.337, 0.282>, 0.700,
  149.       <0.431, 0.506, 0.451>, 0.600]
  150.       [0.558, 0.655, <0.431, 0.506, 0.451>, 0.600,
  151.       <0.529, 0.631, 0.471>, 0.500]
  152.       [0.655, 0.735, <0.529, 0.631, 0.471>, 0.500,
  153.       <0.333, 0.376, 0.318>, 0.700]
  154.       [0.735, 0.823, <0.333, 0.376, 0.318>, 0.700,
  155.       <0.298, 0.376, 0.318>, 0.600]
  156.       [0.823, 0.876, <0.298, 0.376, 0.318>, 0.600,
  157.       <0.416, 0.376, 0.318>, 0.500]
  158.       [0.876, 0.929, <0.416, 0.376, 0.318>, 0.500,
  159.       <0.416, 0.376, 0.318>, 0.600]
  160.       [0.929, 1.001, <0.416, 0.376, 0.318>, 0.600,
  161.       <0.824, 0.725, 0.584>, 0.700])
  162.    }
  163. }
  164.  
  165. define Grnt24a
  166. texture {
  167.    noise surface {
  168.       color white
  169.       position_fn 1
  170.       lookup_fn 1
  171.       octaves 6
  172.       turbulence 5
  173.       ambient 0.2
  174.       diffuse 0.6
  175.       specular 0.3
  176.       microfacet Reitz 5
  177.    color_map(
  178.       [0.000, 0.053, <0.784, 0.627, 0.522>, 0.500,
  179.       <0.784, 0.627, 0.624>, 0.500]
  180.       [0.053, 0.263, <0.784, 0.627, 0.624>, 0.500,
  181.       <0.824, 0.557, 0.376>, 0.500]
  182.       [0.263, 0.281, <0.824, 0.557, 0.376>, 0.500,
  183.       <0.643, 0.380, 0.376>, 0.500]
  184.       [0.281, 0.325, <0.643, 0.380, 0.376>, 0.500,
  185.       <0.839, 0.722, 0.722>, 0.500]
  186.       [0.325, 0.711, <0.839, 0.722, 0.722>, 0.500,
  187.       <0.784, 0.627, 0.522>, 0.500]
  188.       [0.711, 0.798, <0.784, 0.627, 0.522>, 0.500,
  189.       <0.769, 0.380, 0.376>, 0.500]
  190.       [0.798, 0.895, <0.769, 0.380, 0.376>, 0.500,
  191.       <0.824, 0.557, 0.376>, 0.500]
  192.       [0.895, 0.982, <0.824, 0.557, 0.376>, 0.500,
  193.       <0.784, 0.627, 0.522>, 0.500]
  194.       [0.982, 1.001, <0.784, 0.627, 0.522>, 0.500,
  195.       <0.784, 0.627, 0.522>, 0.500])
  196.    }
  197. }
  198.  
  199. //--------------------Crack & OverTint /Red---------------------
  200. define Crack1
  201. texture {
  202.    noise surface {
  203.       color white
  204.       position_fn 1
  205.       lookup_fn 1
  206.       octaves 6
  207.       turbulence 5
  208.       ambient 0.1
  209.       diffuse 0.2
  210.       specular 0.3
  211.       microfacet Reitz 5
  212.    color_map(
  213.       [0.00, 0.04, black,     0.6, black,   1.0]
  214.       [0.04, 0.97, firebrick, 0.8, dimgray, 0.9] 
  215.       [0.97, 1.00, black,     0.9, black,   1.0])
  216.    }
  217. }       
  218.  
  219. define clear_yellow
  220. texture {
  221.    surface {
  222.       ambient 0
  223.       diffuse 0
  224.       transmission yellow, 0.9, 1
  225.       }
  226.    }
  227.  
  228. //------------ Moss Greens & Tan 
  229. define Grnt25
  230. texture {
  231.    noise surface {
  232.       color white
  233.       position_fn 1
  234.       lookup_fn 1
  235.       octaves 6
  236.       turbulence 5
  237.       ambient 0.2
  238.       diffuse 0.6
  239.       specular 0.3
  240.       microfacet Reitz 5
  241.       color_map(
  242.      [0.000, 0.168, <0.824, 0.725, 0.584>, 0.000,
  243.             <0.514, 0.584, 0.533>, 0.000]
  244.      [0.168, 0.301, <0.514, 0.584, 0.533>, 0.000,
  245.             <0.298, 0.376, 0.318>, 0.000]
  246.      [0.301, 0.398, <0.298, 0.376, 0.318>, 0.000,
  247.             <0.263, 0.337, 0.282>, 0.000]
  248.      [0.398, 0.558, <0.263, 0.337, 0.282>, 0.000,
  249.             <0.431, 0.506, 0.451>, 0.000]
  250.      [0.558, 0.655, <0.431, 0.506, 0.451>, 0.000,
  251.             <0.529, 0.631, 0.471>, 0.000]
  252.      [0.655, 0.735, <0.529, 0.631, 0.471>, 0.000,
  253.             <0.333, 0.376, 0.318>, 0.000]
  254.      [0.735, 0.823, <0.333, 0.376, 0.318>, 0.000,
  255.             <0.298, 0.376, 0.318>, 0.000]
  256.      [0.823, 0.876, <0.298, 0.376, 0.318>, 0.000,
  257.             <0.416, 0.376, 0.318>, 0.000]
  258.      [0.876, 0.929, <0.416, 0.376, 0.318>, 0.000,
  259.             <0.416, 0.376, 0.318>, 0.000]
  260.      [0.929, 1.001, <0.416, 0.376, 0.318>, 0.000,
  261.             <0.824, 0.725, 0.584>, 0.000])
  262.    }
  263. }
  264.  
  265. //-------- White Tan & thin Reds
  266. define Grnt29
  267. texture {
  268.    noise surface {
  269.       color white
  270.       position_fn 1
  271.       lookup_fn 1
  272.       octaves 6
  273.       turbulence 5
  274.       ambient 0.2
  275.       diffuse 0.6
  276.       specular 0.3
  277.       microfacet Reitz 5
  278.    color_map(
  279.       [0.000, 0.053, <0.784, 0.627, 0.522>, 0.000,
  280.       <0.784, 0.627, 0.624>, 0.000]
  281.       [0.053, 0.263, <0.784, 0.627, 0.624>, 0.000,
  282.       <0.824, 0.557, 0.376>, 0.000]
  283.       [0.263, 0.281, <0.824, 0.557, 0.376>, 0.000,
  284.       <0.643, 0.380, 0.376>, 0.000]
  285.       [0.281, 0.325, <0.643, 0.380, 0.376>, 0.000,
  286.       <0.839, 0.722, 0.722>, 0.000]
  287.       [0.325, 0.711, <0.839, 0.722, 0.722>, 0.000,
  288.       <0.784, 0.627, 0.522>, 0.000]
  289.       [0.711, 0.798, <0.784, 0.627, 0.522>, 0.000,
  290.       <0.769, 0.380, 0.376>, 0.000]
  291.       [0.798, 0.895, <0.769, 0.380, 0.376>, 0.000,
  292.       <0.824, 0.557, 0.376>, 0.000]
  293.       [0.895, 0.982, <0.824, 0.557, 0.376>, 0.000,
  294.       <0.784, 0.627, 0.522>, 0.000]
  295.       [0.982, 1.001, <0.784, 0.627, 0.522>, 0.000,
  296.       <0.784, 0.627, 0.522>, 0.000])
  297.    }
  298. }
  299.  
  300. //------------- Gray Granite with white patches
  301. define Stone8
  302. texture {
  303.    layered
  304.       Grnt0a { scale <2, 3, 2> rotate <0, 0, -30> },
  305.       Grnt9a { scale <5, 3, 4> rotate <0, 0, 40> },
  306.       texture { shiny { color white } }
  307.    }
  308.  
  309.  
  310. //------------- Peach & Cream Marble with orange veining
  311. define Stone23
  312. texture {
  313.    layered
  314.       clear_yellow,
  315.       Crack1 { scale <1, 2, 1.5> rotate <0, 0, 40> },
  316.       Grnt24a { scale <2, 1, 2> rotate <40, 0, 30> },
  317.       Grnt29 { scale <1, 1, 2> rotate <40, 0, 30> }
  318.    }
  319.  
  320. //------------- Green & Tan Moss Marble
  321. define Stone24
  322. texture {
  323.    layered
  324.       Grnt23a { scale <2, 1, 2> rotate <40, 0, -30> },
  325.       Grnt25 { scale <1, 1, 2> rotate <0, 0, 50> rotate <20, 0, 30> }
  326.    }
  327.  
  328. define jade
  329. texture {
  330.    noise surface {
  331.       color white
  332.       ambient 0.3
  333.       diffuse 0.8
  334.       specular 0.3
  335.       microfacet Reitz 5
  336.       position_fn position_objectx
  337.       lookup_fn   lookup_sawtooth
  338.       octaves     3
  339.       turbulence  3
  340.       color_map(
  341.          [0.0, 0.8, <0.1, 0.6, 0.1>, <0.0, 0.3, 0.0>]
  342.          [0.8, 1.0, <0.1, 0.6, 0.1>, <0.0, 0.2, 0.0>])
  343.       }
  344.     rotate <80, 0, 0>
  345.     scale <0.5, 0.5, 0.5>
  346.    }
  347.