POV-Ray : Newsgroups : povray.newusers : Blocks of stone : Re: Blocks of stone Server Time
29 Jul 2024 00:26:50 EDT (-0400)
  Re: Blocks of stone  
From: Florian Brucker
Date: 17 Apr 2007 06:58:37
Message: <4624a85d$1@news.povray.org>
As Alain already mentioned: Use a different texture on each block. To
make things easier you can use the same texture but translate it to
different offsets each time:

	#include "colors.inc"
	#include "stones.inc"

	camera {
		location <5,0,-10>
		look_at x*5
	}

	light_source { <1,1,-1>*100 rgb 2 }

	background { rgb 1 }

	// Your texture here
	#local MyTexture = texture {
		T_Stone10
		scale 2
	}

	#local Block = box {
		// Your basic block without texture
		<0.02, 0.02, -0.23>, <0.98, 0.48, 0.23>
	}

	// Random seed
	#local S = seed(54890);

	#local a = 0;
	#while (a < 10)
		object {
			Block
			translate x*a
			texture {
				// Magic: Randomly translated texture
				MyTexture
				translate <rand(S),rand(S),rand(S)>*100
			}
		}

		#local a = a + 1;
	#end


HTH,
Florian


Post a reply to this message

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