POV-Ray : Newsgroups : povray.general : finite texture : Re: finite texture Server Time
1 Aug 2024 22:21:10 EDT (-0400)
  Re: finite texture  
From: Lance Birch
Date: 12 Apr 2005 11:11:56
Message: <425be53c@news.povray.org>
I know it's A Bad Idea to post binaries here, but it's so tiny I thought no one
would mind!  Anywhere, here's an example of the material_map idea.  This one
uses 144 randomly generated textures for the bricks.  Save it as a .pov and put
the png in the same directory - you may have to correct for the line breaks.

--

camera {location <0,0,-1> look_at <0,0,0>}
light_source {<10,-4,-4> 2}

#declare Index = 0;
#declare R = seed(134624);
#declare BrickTex = array[144];
#while (Index <= 143)
 #declare BrickTex[Index] = texture {pigment{color rgb
<rand(R),rand(R),rand(R)>} normal {bumps rand(R)} scale rand(R)/2}
 #declare Index = Index + 1;
#end
#declare Index = 0;

plane {z, 0
 texture {
  material_map {
   png "brick.png"
   texture {pigment {color rgb <1,1,1>}}
   #while (Index <= 143)
    texture {BrickTex[Index]}
    #declare Index = Index + 1;
   #end
  }
 }
}

--

Hope this helps!

Lance.

thezone - thezone.firewave.com.au


Post a reply to this message


Attachments:
Download 'brick.png' (6 KB)

Preview of image 'brick.png'
brick.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.