POV-Ray : Newsgroups : povray.newusers : height field based on TGA file and UV mapping : Re: height field based on TGA file and UV mapping Server Time
28 Sep 2024 07:43:09 EDT (-0400)
  Re: height field based on TGA file and UV mapping  
From: Thomas de Groot
Date: 23 Apr 2012 04:26:24
Message: <4f951230$1@news.povray.org>
On 22-4-2012 19:23, rodv92 wrote:
> Hello !
>
> i would like to know if it is possible to use uv mapping for file based height
> fields ?
>

Iirc, it should be possible, but I am unable to find again an example 
where I may have used it :-(

In the Insert Menu, under Special Shapes, there is this:

  // ----------------- HF_Square macro ------------------
#declare Fn_1 =
  function(x, y, z)
   {1-(-f_snoise3d(x*2,y*2,z*2)*0.25)}
// -----------------------------------------------------
object{ HF_Square( Fn_1, //Function,
                      0, // UseUVheight:  0 or 1
                      1, // UseUVtexture: 0 or 1
                <50,50>, // Resolution,
                      1, // Smooth: 0 or 1
                      "",// FileName, ""=no file,
            <-1,0,-1>*2, //MnExt,
            <1,1,1>*2    //MxExt
                       ) //------------------------------
   texture{ pigment{ checker
                     color rgb<1,0.6,0>
                     color rgb<1,1,1>*0.9
                     scale 0.05}
            finish { phong 0.1}
          } // end of texture
   scale<1,1,1>*1
   rotate<0,0,0>
   translate<0,-1.5,0>
} // end of HF_Square ----------------------------------

Could this help you?

Thomas


Post a reply to this message

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