POV-Ray : Newsgroups : povray.general : Mirrored texture? : Re: Mirrored texture? Server Time
2 Aug 2024 22:14:15 EDT (-0400)
  Re: Mirrored texture?  
From: Mike Williams
Date: 3 Jul 2004 21:39:33
Message: <BTZ8KEA+815AFwjK@econym.demon.co.uk>
Wasn't it Tyler Eaves who wrote:
>How can I mirror a texture across an axis?
>
>Here's what I'm trying to do. I'm modeling a guitar, and a common
>woodworking technique used on guitars is called 'bookmatching'. This is
>used on the top of the body for aestetic reasons. Basically you take a
>block of wood, say, 8" wide x 15" long x 0.5" thick. Cut it down the
>middle so you now have 2 8x15x0.25 peices. Now you lay the two peices side
>by side with two matching edges at the middle. The result is that many of
>the features of the grain are 'mirrored' across the middle of the body. I
>could probably get a good result by mirroring the texture, and then
>applying a small translation or rotation so they don't match EXACTLY.
>Anyone have an idea as to how to go about this?
>
>http://www.prsguitars.com/showcase/current/513rose.html


I'd do it by applying a flip repeat warp to the pigment to get the
mirror effect, then applying a turbulence warp afterwards to get the two
halves to not match exactly.

pigment { Whatever
  warp {repeat x*R warp x}
  warp {turbulence 0.2}
}

Where "R" is chosen larger than the size of the object so that you don't
actually see the repeats.


For this particular purpose, you might find that the smoothness of
"octaves 1" produces a better turbulation.

pigment { Whatever
  warp {repeat x*R warp x}
  warp {turbulence 0.2 octaves 1}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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