POV-Ray : Newsgroups : povray.general : pigment_pattern vs. "regular" pattern : Re: pigment_pattern vs. "regular" pattern Server Time
3 Aug 2024 16:26:21 EDT (-0400)
  Re: pigment_pattern vs. "regular" pattern  
From: Warp
Date: 2 Jan 2004 23:20:37
Message: <3ff64315@news.povray.org>
Suppose that you want to create a wood texture using eg. the 'wood'
pattern with turbulence and uneven scale (to elongate the whirls of
the wood in a certain direction).
  But suppose that you don't want to use this pattern to create a color
map but for example a texture map. That is, instead of making a wood
which uses different colors from eg red to yellow, you want it to use
different pre-defined textures.

  The basic problem which you had in POV-Ray 3.1 with this is that the
only way of doing this is to use the 'wood' pattern to create a texture_map
(which uses the pre-defined textures) and apply the turbulence and uneven
scale to the whole thing. This has the problem that it will also apply
the turbulence and the scale to those sub-textures.
  Suppose that you just want the *pattern* to look like an elongated
turbulented wood, not the textures it uses. You need some way to apply
the transformations to the pattern only but not to the textures inside
the texture_map.

  pigment_pattern is one way of achieving this. With it you can create
a *pattern* which is transformed in any way you like and then use that
to create your texture_map. The transformations you apply inside the
pigment_pattern will affect the pattern only, not anything else. That
is, the textures in the texture_map will be unaffected by these
transformations.

  However, using the function pattern (ie. "function { pattern { ... } }")
is more stylish because you don't need to create an obsolete color map
which you need in your pigment_pattern.

  I don't really know why pigment_pattern exists at all since usually
the function pattern does anything pigment_pattern does and even more.
  Perhaps creating a pattern from an image_map is easier with pigment_pattern
(I haven't really ever looked at that).

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