POV-Ray : Newsgroups : povray.beta-test : Problem in pigment_pattern with bozo/f_noise3d Server Time
30 Jul 2024 22:22:22 EDT (-0400)
  Problem in pigment_pattern with bozo/f_noise3d (Message 1 to 3 of 3)  
From: Batronyx
Subject: Problem in pigment_pattern with bozo/f_noise3d
Date: 20 Sep 2001 22:06:16
Message: <3baaa098$1@news.povray.org>
Pentium II 266, 96MB, Windows98 SE, POV3.5b2
Problem in pigment_pattern with bozo/f_noise3d:


When using bozo as the pattern type in a pigment_pattern
the results are 'extremely' plateaued. So far, random tests with
other pattern types produce the expected behaviour however.

The following code demonstrates the behaviour as both a pattern
type in a texture block with accompanying texture map, and as a
function used in a pigment block. It also attempts to use the
function version as a means of varying the diffusion across the surface
of an object, and doesn't work as one might expect; another issue I'll
save for my next post.

//Start Code:
#version 3.5;

#include "colors.inc"
#include "functions.inc"

global_settings {
  assumed_gamma 1.0
  noise_generator 3
}

// ----------------------------------------
 background {color MediumBlue}

camera {
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}


light_source {
  <0, 0, 0>
  color rgb <1, 1, 1>
  translate <-30, 30, -30>
}

// ----------------------------------------



#declare Fn_AmbMap = function{ pigment{
       pigment_pattern {bozo scale 0.5}
                   color_map {
        [0.00 color rgb <0,0,0> ]
        [1.00 color rgb <1,1,1> ]
      }
   }
}//end function

#declare Fn_Green = function{pigment { color Green }}

#declare txDiffHi=  texture{
          pigment {function{Fn_Green(x,y,z).gray} }
         finish {diffuse 1}
  }

#declare txDiffLo=  texture{
          pigment {function{Fn_Green(x,y,z).gray} }
         finish {diffuse 0}
}

//Sphere 1  :Left
sphere {  0.0, 1
  texture{ pigment {function{Fn_AmbMap(x,y,z).gray}scale 0.5 }
         finish {diffuse pow((Fn_AmbMap(x.x,y.y,z.z).gray),1)}
  }
  rotate y*45
  translate <-2.25,0,4>
}

//Sphere 2 : Right
sphere {  0.0, 1
  texture{ pigment {function{Fn_Green(x,y,z).gray} }
         finish {diffuse pow((Fn_AmbMap(x.x,y.y,z.z).red),1)}
  }
  rotate y*45
  translate <2.25,0,4>
}

//Sphere 3 : Bottom
sphere {  0.0, 1
  texture{ pigment_pattern { bozo scale 0.5 }
              texture_map {
                  [0 txDiffLo ]
                  [1 txDiffHi ]
              }
          }
  rotate y*45
  translate <0,-2,4>
}


--
Batronyx ^"^
bat### [at] cadronhsacom
http://www.batronyx.com


Post a reply to this message

From: Dave Dunn
Subject: Re: Problem in pigment_pattern with bozo/f_noise3d
Date: 20 Sep 2001 22:21:12
Message: <3BAAA4CF.2F3FC2B@aol.com>
Batronyx wrote:

> Pentium II 266, 96MB, Windows98 SE, POV3.5b2
> Problem in pigment_pattern with bozo/f_noise3d:
>
> When using bozo as the pattern type in a pigment_pattern
> the results are 'extremely' plateaued. So far, random tests with
> other pattern types produce the expected behaviour however.

Bat, Long time.... Try using "pattern" instead of "pigment" and the bozo
will smooth right out  : )


Post a reply to this message

From: Batronyx
Subject: Re: Problem in pigment_pattern with bozo/f_noise3d
Date: 21 Sep 2001 00:03:09
Message: <3baabbfd@news.povray.org>
"Dave Dunn" <poi### [at] aolcom> wrote in message
news:3BA### [at] aolcom...
> Batronyx wrote:
>
> > Pentium II 266, 96MB, Windows98 SE, POV3.5b2
> > Problem in pigment_pattern with bozo/f_noise3d:
> >
> > When using bozo as the pattern type in a pigment_pattern
> > the results are 'extremely' plateaued. So far, random tests with
> > other pattern types produce the expected behaviour however.
>
> Bat, Long time.... Try using "pattern" instead of "pigment" and the bozo
> will smooth right out  : )
>

So you ARE that Dave Dunn. :D  Long time indeed.
You are correct. It does. However, it depends on how and where you use it:

I can't see where I would really ever 'just have to' use pigment_pattern
in a function. The third sphere in the code sample, though, shows where
I might need pigment_pattern in general though.

Very often I have a texture but would like to vary the finish attributes
across the surface for that extra touch of realism. Layered textures won't do
since only the finish of the topmost texture is used, and no form of mapping
syntax is supported for finishes in general ( the new variable reflection
being an exception - sort of).

Prior to the new pigment_pattern and/or image_pattern types, my only choice
was to create a material_map and/or pigment_map with 256 ( just two won't
do since they're taken modulo N [for material_maps anyway])texture entries
that vary only in finish. That's a lot of memory overhead. Now I 'can' get by
with as few as two textures since the new types interpolate. :)

Besides, <gleeful_clapping> It's still a bug. I found it. I got to help
</gleeful_clapping>, maybe. :D
--
Batronyx ^"^
bat### [at] cadronhsacom
http://www.batronyx.com


Post a reply to this message

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