POV-Ray : Newsgroups : povray.newusers : how to make a marble tiling ? : Re: how to make a marble tiling ? Server Time
29 Jul 2024 22:24:09 EDT (-0400)
  Re: how to make a marble tiling ?  
From: regdo
Date: 18 Jan 2005 13:59:11
Message: <41ed5c7f$1@news.povray.org>
Slime wrote:
>>I'm trying to make a scene in which I want a marble floor, and would
>>like to make it tiled.
>>I tried a simple bump-map from a square picture, but it's ugly : I think
>>I need a height_field, but I can't figure out how to make it match my
>>map (just 4 white squares with "soft" white edges to make the joints).
>>If you have a better idea of how to do it, I'll take any suggestion.
>>Can anyone help ?
> 
> 
> If you're finding that a tiled normal and pigment isn't good enough, then
> the way to go is definitely to create one version of the tile, and copy it
> many times.
> 
> The copying can be done with while loops. Here's how I would do it (untested
> code):
> 
> /* make this object as fancy as you want; use a height field if you like */
> #declare Tile = box {
> <.05,-1,.05>, <.95,0,.95>
> }
> 
> #declare NumTilesX = 10;
> #declare NumTilesZ = 10;
> 
> #declare TileNumX = 0;
> #while (TileNumX < NumTilesX)
>     #declare TileNumZ = 0;
>     #while (TileNumZ < NumTilesZ)
> 
>         object {
>             Tile
>             translate <TileNumX, 0, TileNumZ>
>         }
> 
>         #declare TileNumZ = TileNumZ + 1;
>     #end
>     #declare TileNumX = TileNumX + 1;
> #end
> 
> There are a number of ways that this little script can be improved, but it's
> a good starting point for placing tiled objects.
> 
> As far as making an image_map line up with a height_field, do something like
> this:
> 
> height_field {
>     tga "myheight.tga"
>     pigment {
>         image_map {
>             tga "mypigment.tga"
>         }
>         rotate 90*x
>     }
> 
>     // transform height field here, no earlier
> }
> 
>  - Slime
>  [ http://www.slimeland.com/ ]
> 
> 
Thanks, I like that method, and will keep it in mind. In fact, I found a 
good starting point in Gilles Tran's "fridge" scene : it has a wall and 
a floor that matched my need, and I used a layered texture to map the 
marble on "his" boxed texture.
Thanks anyway for your answers.


Post a reply to this message

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