POV-Ray : Newsgroups : povray.unofficial.patches : Hi Ron : Re: Hi Ron Server Time
2 Sep 2024 20:15:49 EDT (-0400)
  Re: Hi Ron  
From: Ron Parker
Date: 8 Jul 1999 17:55:29
Message: <37851e51@news.povray.org>
On 8 Jul 1999 17:31:34 -0400, Ron Parker wrote:
>On Thu, 8 Jul 1999 18:45:17 +0100, Mick Hazelgrove wrote:
>>Apart from the obligatory nag about the superpatch update :) I have a
>>request/query
>>
>>Do you remember the thread about noise and basic shapes so months ago?
>>
>>Well is possible to add noise and to HFs? not in the sense of graphic noise
>>but in a way similar to that the isopatch uses.
>>
>>If so, if it's easy to add, can we have it?
>
>I'm not sure what you mean.  Are you wanting to add a higher-frequency
>noise to a lower-frequency heightfield (i.e. more than one noise sample
>per pixel)?
>
>There is a way you can fake it with the iso patch, though it's probably
>kinda slow.  The 3.1e superpatch has a pigment function that, afaik, 
>should work with an interpolated imagemap to give you a nice isosurface
>approximation of a heightfield.  Once you get that working, you can 
>then add any function you want to it, including noise.

Here's a sample showing what I mean.  For some reason the bilinear interpolation
doesn't seem quite as useful as I thought it would, but here ya go anyway.  You
should substitute your own heightfield where I have sphere.bmp.  The .001 is 
used to chop off the planar surface that would otherwise be generated by the
black background in my test image.

//--------- cut here ----->8=======
camera {location <0,3,-3> look_at 0}
light_source {<-20,20,-20> rgb <.8,.8,1>}
light_source {<20,20,-20> rgb <1,.8,.8>}

#declare xx=function{
  pigment {
    image_map {
      sys "sphere.bmp" 
      interpolate 2
    } 
  rotate 90*x
  }
}

isosurface {
  function{y-xx(x,y,z)+.001+.05*noise3d(20*x,20*y,20*z)}
  bounded_by {box {0,1}}
  eval                  
  translate -.5
  scale 3
  texture {
    pigment {color rgb 1}
    finish {ambient .3}
  }
}
//--------- cut here ----->8=======


Post a reply to this message

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