POV-Ray : Newsgroups : povray.general : Brick texture Server Time
1 Nov 2024 17:22:00 EDT (-0400)
  Brick texture (Message 1 to 5 of 5)  
From: Ian Snook
Subject: Brick texture
Date: 6 Apr 2011 11:25:01
Message: <web.4d9c857533d7c5e4413a4eea0@news.povray.org>
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?


Post a reply to this message

From: Alain
Subject: Re: Brick texture
Date: 6 Apr 2011 13:38:45
Message: <4d9ca525@news.povray.org>

> 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?
>
>

In your code, you have the following user variables: Hx, Hy, White.

The variable "White" is declared in colors.inc. It's not initialised by 
default.
You need to include that file as follow:
#include "colors.inc"

In that file, it's defined as:
#declare White   = rgb 1;

If it's the only colour you use, you can add just that #declare to your 
code.

Place that line early in your code before you use any colour name.

Hx and Hy are also user variable. You need to explicitely #declare them 
before you use them.
#declare Hx = 23;

Keep in mind that anything starting with an UPERCASE character is always 
a "user" variable. You may declare it yourself, or have it declared in 
some include file.



Alain


Post a reply to this message

From: Ian Snook
Subject: Re: Brick texture
Date: 7 Apr 2011 10:10:00
Message: <web.4d9dc4ea4eb3ea1b413a4eea0@news.povray.org>
The hy, hz, and hx are defined sizes, as its a for a house. and the white
statement works, but that is not the issue the whole statement works and brings
a white box, but want i want is to add somewhere in this statement (instead of
white) a brick looking texture but not sure where or what im doing wrong (only
with the brick texture not what i already have)



Alain <aze### [at] qwertyorg> 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?
> >
> >
>
> In your code, you have the following user variables: Hx, Hy, White.
>
> The variable "White" is declared in colors.inc. It's not initialised by
> default.
> You need to include that file as follow:
> #include "colors.inc"
>
> In that file, it's defined as:
> #declare White   = rgb 1;
>
> If it's the only colour you use, you can add just that #declare to your
> code.
>
> Place that line early in your code before you use any colour name.
>
> Hx and Hy are also user variable. You need to explicitely #declare them
> before you use them.
> #declare Hx = 23;
>
> Keep in mind that anything starting with an UPERCASE character is always
> a "user" variable. You may declare it yourself, or have it declared in
> some include file.
>
>
>
> Alain


Post a reply to this message

From: Alain
Subject: Re: Brick texture
Date: 7 Apr 2011 18:22:50
Message: <4d9e393a$1@news.povray.org>

> The hy, hz, and hx are defined sizes, as its a for a house. and the white
> statement works, but that is not the issue the whole statement works and brings
> a white box, but want i want is to add somewhere in this statement (instead of
> white) a brick looking texture but not sure where or what im doing wrong (only
> with the brick texture not what i already have)
>
>

brick should then replace White in the pigment.

In 2.5.11.5, COLOR_1 and COLOR_2 are place holders. You must supply one 
pigment for each. If you don't set these, you get redish bricks with 
gray mortar.

Minimal sample:
texture{ pigment{ brick } }

Sample:
texture{ pigment{ brick Aquamarine Firebrick brick_size <7,1,7> mortar 0.1}
  finish{diffuse 0.76 ambient 0.02 phong 0.4 phong_size 100}
}




Alain


Post a reply to this message

From: Paolo Gibellini
Subject: Re: Brick texture
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.