POV-Ray : Newsgroups : povray.newusers : Help with "Endless" texture : Re: Help with "Endless" texture Server Time
4 Nov 2024 13:03:51 EST (-0500)
  Re: Help with "Endless" texture  
From: Warp
Date: 1 May 2003 17:08:53
Message: <3eb18ce4@news.povray.org>
Tom & Lu Melly <all### [at] tomandlucouk> wrote:
> Oh, you want a tileable image.

  I didn't understand he wanted a tileable image either.

  There are several ways of doing this. For example like this:

// Makes a tileable texture from the given texture.
// The texture extends from <0,0> to <1,1>
#macro TileTexture(Texture)
  #local XTile =
    texture
    { gradient x texture_map
      { [0 Texture]
        [1 Texture translate x]
      }
    }
  #local a=0; // This is just a hack to avoid an issue with the parser
  texture
  { gradient y texture_map
    { [0 XTile]
      [1 XTile translate y]
    }
  }
#end

#declare Example =
  texture
  { pigment
    { granite color_map { [0 rgb <.4,.2,.1>][1 rgb <1,.8,.5>] }
    }
    finish { ambient 1 }
  }

box
{ 0, 1
  TileTexture(Example)
}

camera
{ right x location -z look_at 0
  translate <.5,.5>
}

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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