POV-Ray : Newsgroups : povray.general : Heightfields from textures? : Re: Heightfields from textures? Server Time
3 Aug 2024 06:16:47 EDT (-0400)
  Re: Heightfields from textures?  
From: Hughes, B 
Date: 27 Apr 2004 00:04:15
Message: <408ddbbf$1@news.povray.org>
"Jon Berndt" <jsb### [at] hal-pcdotorg> wrote in message
news:408da35f$1@news.povray.org...
> I am guessing that there might be a way to
> generate a heightfield that is based on a texture, perhaps?

You're in luck. In the documentation, see the second example under section
6.7.11.16  Function Image.

My own example then, using function patterns, below.

Bob H.

/* lumpy HF by combining function patterns */

#local F_Pbozo=
function {
 pattern {
  bozo
  turbulence 0.5
  scale 0.1
 }
}

#local F_Pbumps=
function {
 pattern {
  bumps
  turbulence 0.5
  scale 0.1
 }
}

height_field {
 function 500,500 {
  pattern {
   function {
    (F_Pbozo(x,y,z)*1.4)
    *
    (F_Pbumps(x,y,z)*0.9)
   }
  }
 }
 smooth
 pigment {gradient y}
 translate -0.5
 scale <10,1,10>
}


Post a reply to this message

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