POV-Ray : Newsgroups : povray.newusers : how to make a marble tiling ? Server Time
1 Nov 2024 19:16:33 EDT (-0400)
  how to make a marble tiling ? (Message 1 to 6 of 6)  
From: regdo
Subject: how to make a marble tiling ?
Date: 17 Jan 2005 14:37:57
Message: <41ec1415$1@news.povray.org>
Hi to all.
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 ?


Post a reply to this message

From: Neil Kolban
Subject: Re: how to make a marble tiling ?
Date: 18 Jan 2005 00:48:15
Message: <41eca31f$1@news.povray.org>
I'm pretty much a newbie here but your task sounds like something I want to
do too.

My immediate thought would be to create a single tile composed of a cube in
the center with 4 cubes around it (one on each side) a little bit less in
height than the center cube.  You could then texture the center cube as the
"marble tile" and the surrounding cubes as the "grout" or filler.  Once you
have one cube, you could then duplicate it as many times as you need.

A second thought, if you want to go with a map, would be to use something
like wings3d and subdivision modeling.  You could then create a single tile
and use UV Mapping to map your tile map onto your object.  You could export
and build a POV-Ray object using PoseRay.

I suspect that an even more elegant way (but one that I haven't got my mind
around) would be to have a flat plane (or cube) and use texturing with
normals and colormaps to achieve a result without having to replicate over
and over.

The last technique is the one most interesting to me and I think I'll make
that my new puzzle.

Neil

"regdo" <reg### [at] wanadoofr> wrote in message
news:41ec1415$1@news.povray.org...
> Hi to all.
> 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 ?


Post a reply to this message

From: Slime
Subject: Re: how to make a marble tiling ?
Date: 18 Jan 2005 01:17:03
Message: <41eca9df@news.povray.org>
> 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/ ]


Post a reply to this message

From: regdo
Subject: Re: how to make a marble tiling ?
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

From: Neil Kolban
Subject: Re: how to make a marble tiling ?
Date: 18 Jan 2005 14:19:58
Message: <41ed615e$1@news.povray.org>
I'd like to capture what you found for our PovRay wiki.  Can you update the 
Wiki (see http://www.wikipov.org/) or else email me (kol### [at] kolbancom) 
with your results and I'll post on your behalf?

Neil

"regdo" <reg### [at] wanadoofr> wrote in message 
news: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

From: Neil Kolban
Subject: Re: how to make a marble tiling ?
Date: 20 Jan 2005 19:12:00
Message: <41f048d0$1@news.povray.org>
Slime,
Based on your algorithm, I thought I'd have a go at understanding it and 
playing with it.  My result is at:

http://www.wikipov.org/ow.asp?TileMacro

Thank you for the idea and the seed.  All credit to you my friend.

Neil


Post a reply to this message

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