POV-Ray : Newsgroups : povray.general : Patterned Textures and Turbulence : Re: Patterned Textures and Turbulence Server Time
3 Dec 2024 22:57:55 EST (-0500)
  Re: Patterned Textures and Turbulence  
From: Chris R
Date: 12 May 2022 10:50:00
Message: <web.627d1e7b962984031441ea85cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
> > "Chris R" <car### [at] comcastnet> wrote:
> > > Alain Martel <kua### [at] videotronca> wrote:
> > >
> > > > > I am working on some scene elements with painted wood, where the paint is
> > > > > chipping away, exposing the underlying wood texture.  Since the paint and
wood
> > > > > have different finishes and normals, I want to use a texture_map rather than
> > > > > layered textures.
> > > > >
> > > > > If I just do scaling/rotation/translation transformations on the texture
> > > > > pattern, I know how to compensate for that in the textures in the map so
those
> > > > > transformations apply to the overall pattern, but not the patterns of the
> > > > > individual textures.  However, I can't figure out how to add turbulence to
the
> > > > > texture pattern without having it affect the textures in the map.
> > > > >
> > > > > Is this even possible, or do I just need to avoid turbulence in patterned
> > > > > textures?
> > > > >
> > > > > -- Chris R.
> > > > >
> > > > >
> > > > You can apply your turbulence with a negative value :
> > > >
> > > > warp{turbulence -1} should undo warp{turbulence 1}
> > >
> > > Ah, thanks.  I should have thought to try that.  I was concerned about how that
> > > would affect lambda and omega, but if I understand turbulence correctly, those
> > > act more like multipliers on the turbulence value and should thus be negated if
> > > turbulence is negative as well.
> > >
> > > -- Chris R.
> >
> > So, I tried this and it doesn't seem to work.  The picture below shows an
> > example of an object with a gradient x texture_map with leopard and bricks as
> > the sub-textures.  The middle picture applies a turbulence just to the gradient
> > pattern.  The 3rd picture applies a negative turbulence to each of the
> > sub-textures first.
> >
> >
> > -- Chris R.
>
> Just another short observation:
>
> warp { turbulence 1 }
> warp { turbulence -1 }
>
> applied to a texture does not result in a non-turbulated texture.  I believe the
> issue is that amount of turbulence applied to a point is dependent on the point
> itself.  Once you apply the turbulence, and then attempt to apply turbulence
> again, you are getting the turbulence from a new point, which will not be the
> same as the original point.
>
> -- Chris R.

I found a solution; use a pigment_pattern for the patterned texture rather than
using the pattern directly.  Apply the turbulence to the pigment for the
pigment_pattern:

texture {
   pigment_pattern {
      pigment {
         gradient x
         color_map {
            [0.0 rgb 0.0]
            [0.5 rgb 0.0]
            [0.5 rgb 1.0]
            [1.0 rgb 1.0]
         }
         warp { turbulence 0.1 }
         scale _box_size
      }
   }
   texture_map {
      [0.0 _t1]
      [0.5 _t1]
      [0.5 _t2]
      [1.0 _t2]
   }
}



-- Chris R.


Post a reply to this message


Attachments:
Download 'turb_pp.png' (171 KB)

Preview of image 'turb_pp.png'
turb_pp.png


 

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