POV-Ray : Newsgroups : povray.general : Brick texture : Re: Brick texture Server Time
29 Jul 2024 14:15:58 EDT (-0400)
  Re: Brick texture  
From: Paolo Gibellini
Date: 8 Apr 2011 05:25:52
Message: <4d9ed4a0$1@news.povray.org>
>Ian Snook  on date 06/04/2011 17:23 wrote:
> Im trying to create a brick texture on a house shaped box but am having trouble:
>
> this is the code for my box (without trying to add brick texture)
>
> box {<-Hx,0,1>,<  Hx,Hy,9>
>        texture { pigment{ color White}
>                  finish { phong 1}
>                } // end of texture
>        scale<1,1,1>  rotate<0,0,0>  translate<0,0,0>
>      no_shadow
>      }
>
> and i have been trying to put one of the following examples in
> http://www.povray.org/documentation/view/3.6.0/368/
> but keep getting declared errors and have no idea what to do, can anyone help?
>
>
Time ago I made a brick texture based on Philippe texture (sorry, I 
didn't remember the original post, it was a nice plane full off pebbles).

// Texture begin here
#declare t_brick_space=texture{
	pigment{color rgb <200,90,10>/255}
	finish{diffuse .65}
	normal{granite .6 scale .4}
}

#declare t_brick=texture{
	pigment{color rgb <188,67,8>/255}
	finish{
		diffuse .7
		roughness .15
	}
	normal{
		average
		normal_map{
			[1.00
			boxed 1
			poly_wave .3
			slope_map{
				[0.00 <0,0>]
				[0.02 <0,0>]
				[0.02 <0,.5>]
				[0.6 <1,0>]      // Increase or decrease the bump
			}
			]
			[1.00 granite .15 ]
		}
	}
}

#declare t_wall=texture{
	boxed
	poly_wave .3
	texture_map{
		[0.00 t_brick_space]
		[0.05 t_brick_space]
		[0.05 t_brick]
		[1.00 t_brick]
	}
	warp{planar}
	rotate -90*x
	scale 0.5
	translate <.5,0,.5>
	warp{repeat 1.05*x}
	warp{repeat 1.05*z offset .5*x}
	scale 0.4*z  // Change here brick props
	#local tseg_Warp_scale=1.3;
	scale tseg_Warp_scale
	warp{
		turbulence <.3,1.5,.3>*.1 //Some turbulence
		octaves 4
		lambda 1.5
	}
	scale 1/tseg_Warp_scale
	scale 0.3
	rotate 90*x
}
// Texture end here


Example:
box{<-2,0,-0.2> <2,2,0.2> texture{t_wall}}

With some adjustments you can obtain something similar to bricks.

Paolo


Post a reply to this message

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