POV-Ray : Newsgroups : povray.newusers : how to create a wall made of stones Server Time
2 Nov 2024 05:20:45 EDT (-0400)
  how to create a wall made of stones (Message 1 to 7 of 7)  
From: blenderhead
Subject: how to create a wall made of stones
Date: 11 Oct 2004 15:50:00
Message: <web.416ae2d75c6a7794851714370@news.povray.org>
#declare Mortar = texture {
 pigment {
  marble
  turbulence 0.5
  lambda 1.5
  omega 1
  octaves 9
  frequency 3
  color_map {
   [0.0 color Gray50]
   [0.9 color Black]
   [1.0 color Gray50]
  }
 }
 normal {
  dents 1
  scale 0.001
 }
 finish {
  ambient 0.2
  diffuse 0.6
 }
}

#declare WallBrick = texture {
 T_Stone6
}

#declare WallTexture = texture {
 brick texture { Mortar }, texture { WallBrick }
 brick_size <0.25, 0.25, 1> mortar 0.03
}

And I build a wall with my WallTexture:
#declare Wall_Z = box {    //wall in z direction (left and right),
definition as left wall, but also used as the right wall
 <-10   ,  0, -20>
 <- 9.75, 10,  20>
 texture {
  WallTexture
 }
}

But the wall looks like something was painted on it, not like it was
constructed of stones that are independent from each other.


Post a reply to this message

From: Oleguer Vilella
Subject: Re: how to create a wall made of stones
Date: 11 Oct 2004 16:58:25
Message: <416af3f1$1@news.povray.org>
If you want to make like briks, you have this code:
======================================
#declare ParedTextura=texture {
pigment { brick Gray75 mortar 0.4 }
normal { brick normal { bump scale 0.1 } normal { agate scale <1.5, .1, .1>
mortar 0.4 }
finish { ambient 0 }
scale <.3, .3, .5> };
box { <-100, 0, 0> <100, 100, 1> texture { ParedTextura } translate <0, -30,
38> }
=======================================
Maybe it helps you.

Best regards,
Oleguer



news:web.416ae2d75c6a7794851714370@news.povray.org...
> #declare Mortar = texture {
>  pigment {
>   marble
>   turbulence 0.5
>   lambda 1.5
>   omega 1
>   octaves 9
>   frequency 3
>   color_map {
>    [0.0 color Gray50]
>    [0.9 color Black]
>    [1.0 color Gray50]
>   }
>  }
>  normal {
>   dents 1
>   scale 0.001
>  }
>  finish {
>   ambient 0.2
>   diffuse 0.6
>  }
> }
>
> #declare WallBrick = texture {
>  T_Stone6
> }
>
> #declare WallTexture = texture {
>  brick texture { Mortar }, texture { WallBrick }
>  brick_size <0.25, 0.25, 1> mortar 0.03
> }
>
> And I build a wall with my WallTexture:
> #declare Wall_Z = box {    //wall in z direction (left and right),
> definition as left wall, but also used as the right wall
>  <-10   ,  0, -20>
>  <- 9.75, 10,  20>
>  texture {
>   WallTexture
>  }
> }
>
> But the wall looks like something was painted on it, not like it was
> constructed of stones that are independent from each other.
>
>
>


Post a reply to this message

From: Tom Melly
Subject: Re: how to create a wall made of stones
Date: 12 Oct 2004 04:27:23
Message: <416b956b$1@news.povray.org>
"blenderhead" <nomail@nomail> wrote in message
news:web.416ae2d75c6a7794851714370@news.povray.org...
>
> But the wall looks like something was painted on it, not like it was
> constructed of stones that are independent from each other.

These images
http://www.tomandlu.co.uk/webres/raytracing/gallery/pics/tmwinter.jpg
http://www.tomandlu.co.uk/webres/raytracing/gallery/pics/tmsummer.jpg

use a macro from this file
http://www.tomandlu.co.uk/webres/raytracing/gallery/tmwinter.zip

Any help?


Post a reply to this message

From: blenderhead
Subject: Re: how to create a wall made of stones
Date: 12 Oct 2004 08:10:00
Message: <web.416bc919d1ea55e529322d750@news.povray.org>
"Tom Melly" <pov### [at] tomandlucouk> wrote:
> These images
> http://www.tomandlu.co.uk/webres/raytracing/gallery/pics/tmwinter.jpg
> http://www.tomandlu.co.uk/webres/raytracing/gallery/pics/tmsummer.jpg
>
> use a macro from this file
> http://www.tomandlu.co.uk/webres/raytracing/gallery/tmwinter.zip

And they look interesting... ;) Thank you for this, although it is not
exactly what I wanted. I am really a newbie and I just want to have a wall
made of bricks (not of natural stone, although it looks nice), but the
bricks should look like real bricks. A possible solution would be to add a
kind of translation to the texture of each stone. Now it looks like this:

 ---------------   -----------------   -----------------
|Texture starts | |...continues     | |...and so on     |
|at this brick..| |here...          | |                 |
 ---------------   -----------------   -----------------

As you well know, this doesn't look very realistic, because the bricks are
made from different stones (but the same kind of stone), they are mixed up
during construction and so on. I want it like this:

 --------------   -----------------   ------------------   ----------------
|Brick with    | |another brick    | |...texture that   | |...by the mortar|
|stone texture | |with similar...  | | is interrupted...| |                |
 --------------   -----------------   ------------------   ----------------

Any idea how I could do this?


Post a reply to this message

From: dan B hentschel
Subject: Re: how to create a wall made of stones
Date: 12 Oct 2004 09:15:00
Message: <web.416bd885d1ea55e5a3fcf12a0@news.povray.org>
"blenderhead" <nomail@nomail> wrote:
>
>  --------------   -----------------   ------------------   ----------------
> |Brick with    | |another brick    | |...texture that   | |...by the mortar|
> |stone texture | |with similar...  | | is interrupted...| |                |
>  --------------   -----------------   ------------------   ----------------
>
> Any idea how I could do this?

You can use a variation on my wood floor routine, pasted at the bottom of
this message. I will post an image of the output into the
povray.binary.images group so you can see if this is the type of thing you
are looking for.

 - dan B hentschel




#macro M_Wood1A(r,g,b)
    [0.0, 0.1 color rgb <0.88*r, 0.60*g, 0.40*b>
              color rgb <0.88*r, 0.60*g, 0.40*b>]
    [0.1, 0.9 color rgb <0.88*r, 0.60*g, 0.40*b>
              color rgb <0.60*r, 0.30*g, 0.20*b>]
    [0.9, 1.0 color rgb <0.60*r, 0.30*g, 0.20*b>
              color rgb <0.60*r, 0.30*g, 0.20*b>]
#end

#macro M_Wood1B(r,g,b)
    [0.0, 0.1 color rgbt <0.55*r, 0.32*g, 0.20*b, 0.100>
              color rgbt <0.55*r, 0.32*g, 0.20*b, 0.500>]
    [0.1, 0.2 color rgbt <0.55*r, 0.35*g, 0.20*b, 0.650>
              color rgbt <0.88*r, 0.60*g, 0.40*b, 0.975>]
    [0.2, 0.3 color rgbt <0.88*r, 0.60*g, 0.40*b, 0.975>
              color rgbt <0.60*r, 0.30*g, 0.20*b, 1.000>]
    [0.3, 0.4 color rgbt <0.60*r, 0.30*g, 0.20*b, 0.100>
              color rgbt <0.60*r, 0.30*g, 0.20*b, 0.500>]
    [0.4, 0.9 color rgbt <0.60*r, 0.30*g, 0.20*b, 0.650>
              color rgbt <0.88*r, 0.60*g, 0.40*b, 0.975>]
    [0.9, 1.0 color rgbt <0.88*r, 0.60*g, 0.40*b, 0.975>
              color rgbt <0.55*r, 0.32*g, 0.20*b, 1.000>]
#end

#declare P_WoodGrain1A =
pigment {
    wood
    turbulence 0.04
    octaves 3
    scale <0.05, .05, 1>
}

#declare P_WoodGrain1B =
pigment {
    wood
    turbulence <0.1, 0.5, 1>
    octaves 5
    lambda 3.25
    scale <0.15, .5, 1>
    rotate <5, 10, 5>
    translate -x*2
}

#declare floor_sd=seed(12);

#macro wood_floor_texture(r,g,b)
    #if (simple_blocks)
        pigment { color rgb <0.88*r, 0.60*g, 0.40*b> }
    #else
        #declare tex_scale = 0.8 + rand(floor_sd)*0.4;
        #declare tex_rotate = y * (rand(floor_sd)*10 - 20);
        #declare tex_translate = rand(floor_sd)*5;
        texture {
            pigment { P_WoodGrain1A  color_map { M_Wood1A(r,g,b) } }
            scale tex_scale
            rotate tex_rotate
            translate tex_translate
        }
        texture {
            pigment { P_WoodGrain1B  color_map { M_Wood1B(r,g,b) } }
            scale tex_scale
            rotate tex_rotate
            translate tex_translate
        }
        finish {
            specular 0.3
            roughness 0.3
            ambient 0
            diffuse 0.4
            reflection 0.05
        }
        normal {
            wood
            turbulence 0.04
            octaves 3
            scale <0.05, .02, 1>
        }
    #end
#end

#macro wood_floor(board_spacing, board_width, board_length, nails,
floor_width, floor_length)
    union {
        #declare x_pos=-floor_width;
        #while (x_pos<floor_width)
            #declare first_board=rand(floor_sd)*board_length;
            #declare z_pos=-floor_length;
            #while (z_pos<floor_length)
                #declare board_lighten = rand(floor_sd)*0.3+0.85;
                #if (first_board>0)
                    box {
                        <x_pos, -1, z_pos>
                        <x_pos+board_width, 0, z_pos+first_board>
                        wood_floor_texture(
                            (rand(floor_sd)*0.1+0.95)*board_lighten,
                            (rand(floor_sd)*0.1+0.95)*board_lighten,
                            (rand(floor_sd)*0.1+0.95)*board_lighten
                        )
                    }
                    #declare z_pos = z_pos + first_board + board_spacing;
                    #declare first_board=0;
                #else
                    box {
                        <x_pos, -1, z_pos>
                        <x_pos+board_width, 0, z_pos+board_length>
                        wood_floor_texture(
                            (rand(floor_sd)*0.1+0.95)*board_lighten,
                            (rand(floor_sd)*0.1+0.95)*board_lighten,
                            (rand(floor_sd)*0.1+0.95)*board_lighten
                        )
                    }
                    #declare first_board=0;
                    #declare z_pos = z_pos + board_length + board_spacing;
                #end
            #end
            #declare x_pos = x_pos + board_width + board_spacing;
        #end
    }
#end

#if (do_board_floor)
object {
    wood_floor(0.005, 2, 14, 0, -left_wall, -back_wall)
}
#else
box {
    <left_wall,-1,back_wall>
    <right_wall,0,7>
    wood_floor_texture(1,1,1)
}
#end


Post a reply to this message

From: Tom Melly
Subject: Re: how to create a wall made of stones
Date: 12 Oct 2004 10:21:59
Message: <416be887$1@news.povray.org>
"blenderhead" <nomail@nomail> wrote in message
news:web.416bc919d1ea55e529322d750@news.povray.org...
>
> Any idea how I could do this?

I daresay some of the other posts have pointed you in useful directions, but
just to add my two ha'penny worth...

What you are seeing is normal and correct - it's just not what you want.

There are two obvious ways to avoid it.

1. Translate each brick to an arbitary location, apply the texture, and then
translate it back again.
2. Translate the texture applied to each brick to an arbitary location.

Obviously, each of these solutions require that each brick be an independant
object (unless you use an image map)


Post a reply to this message

From: blenderhead
Subject: Re: how to create a wall made of stones
Date: 13 Oct 2004 12:45:00
Message: <web.416d5b42d1ea55e57ffa9bb50@news.povray.org>
"dan B hentschel" <dan### [at] alumritedu> wrote:
> You can use a variation on my wood floor routine, pasted at the bottom of
> this message. I will post an image of the output into the
> povray.binary.images group so you can see if this is the type of thing you
> are looking for.
>
>  - dan B hentschel

Oh, great, that's very nice! It seems that this is what I am looking for.
Thank you!


Post a reply to this message

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