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