POV-Ray : Newsgroups : povray.newusers : textures and warp Server Time
1 Nov 2024 05:22:38 EDT (-0400)
  textures and warp (Message 1 to 4 of 4)  
From: Mr Seb
Subject: textures and warp
Date: 22 Apr 2006 04:39:55
Message: <4449ebdb$1@news.povray.org>
I cambe back on Pov after about 1 year stop and I have a texture problem.

Let's look at my example :

camera {location <0,0,-5> look_at 0}
light_source {<0,0,-5> color rgb 1}

#declare pig1=pigment {
        checker
        color rgb <1,0,0>
        color rgb <0,1,0>
        scale 0.3
}

#declare pig2=pigment {
        checker
        color rgb <1,1,0>
        color rgb <0,1,1>
        scale 0.3
}

#declare pig=pigment {
      checker

      pigment {pig1}
      pigment{pig2}
      warp { turbulence 0.2}

}


box {<-1,-1,-1>,<1,1,1> pigment {pig}}



in this example, I create 2 checker pigments and I join them in another
checker. Then I warp the whole pigment. The big checker is deformed and so
are the 2 inner checkers (pig1 and pig2).
What if I would have pig1 and pig2 not deformed and the edge between them
deformed ?

Thanks for your answer


Post a reply to this message

From: Warp
Subject: Re: textures and warp
Date: 22 Apr 2006 12:21:16
Message: <444a57fc@news.povray.org>
Mr Seb <ban### [at] wanadoofr> wrote:
> What if I would have pig1 and pig2 not deformed and the edge between them
> deformed ?

#declare TurbCheckerFunc = function { pattern { checker turbulence .2 } };

#declare pig=pigment {
  function { TurbCheckerFunc(x, y, z) }
  pigment_map { [0 pig1] [1 pig2] }
}


-- 
                                                          - Warp


Post a reply to this message

From: Slime
Subject: Re: textures and warp
Date: 22 Apr 2006 17:06:03
Message: <444a9abb@news.povray.org>
I would do it this way (untested code):

#declare pig=pigment {
      pigment_pattern {
            checker
            <0,0,0>
            <1,1,1>
            warp { turbulence 0.2}
      }
      pigment_map {
            [0 pig1]
            [1 pig2]
      }
}

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Mr Seb
Subject: Re: textures and warp
Date: 23 Apr 2006 04:37:34
Message: <444b3cce@news.povray.org>
Yeah ! I wanted 1 method and I have 2 !!!!!

For the second method, it works but you forgot the words color rgb in the
checker definition.

Thanks for both of you


news:444a9abb@news.povray.org...
> I would do it this way (untested code):
>
> #declare pig=pigment {
>       pigment_pattern {
>             checker
>             <0,0,0>
>             <1,1,1>
>             warp { turbulence 0.2}
>       }
>       pigment_map {
>             [0 pig1]
>             [1 pig2]
>       }
> }
>
>  - Slime
>  [ http://www.slimeland.com/ ]
>
>


Post a reply to this message

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