POV-Ray : Newsgroups : povray.general : texture_map & hight_fields : texture_map & hight_fields Server Time
31 Jul 2024 10:25:01 EDT (-0400)
  texture_map & hight_fields  
From: Bryan Heit
Date: 12 Apr 2007 16:41:51
Message: <461e998f@news.povray.org>
I am trying to generate a scene where I am assign textures to a 
height_field based on the height of the field.  I can get this to work 
fine if I define the pigment in the texture_map.  However, what I want 
to do is layer an image_map over the hight_field, and then set the 
texture based on the height of the height_field.

Basically, the effect I'm trying to achieve is a 3D map, using an 
image_map for colouration, and a height_field for 3D-ness.  I want to be 
able to define textures along the y-axis to make waves at the water 
level, trees in the hills, rocks on peaks, etc.

I've entered the code I am using at the bottom of the message; as the 
code is written it works.

However, if I remove the pigment commands, and add the following:

pigment {image_map { jpeg im_map_1 } rotate <90,0,0> scale <15,1,8.4> 
translate <1,1.001,-4.2> }

it stops working; regardless of where I put the pigment (outside/inside 
the texture, even individually entered into each layer of the 
texture_map).  When I add the line I get one of two errors:

1) "No matching } in 'texture', gradient found instead" (if "pigment" is 
placed inside of texture)

2) "Cannot layer a patterned texture over another" (if "pigment" is 
located outside of the texture block).

The pigment command above also works; if I put it into a texture block 
that just contains pigment, finish and normals it works fine.  It's only 
when I try to do a texture_map that things fail.

Any ideas?

Thanx

Bryan

-----------------------------------------------------------
height_field { tiff ht_map_1 smooth scale 
<15,(ht_map_1_height+0.0001),8.4> translate <1,1.001,-4.2>
   texture {
   gradient y
     texture_map {
       [0.0 pigment { color rgb <0,0,0> } finish { ambient 0.5 diffuse
         0.5 } normal { leopard 1 turbulence 1.7 scale 0.05 }]
       [(1/255) pigment { color rgb <0,0,1> } finish { ambient 0.5
         diffuse 0.5 } normal { leopard 1 turbulence 1.7 scale 0.05 }]
       [(3/255) pigment { color rgb <0,1,0> } finish { ambient 0.5
         diffuse 0.5 } normal { leopard 1 turbulence 1.7 scale 0.05 }]
       [1.0 pigment { color rgb <0,1,0> } finish { ambient 0.5 diffuse
       0.5 } normal { leopard 1 turbulence 1.7 scale 0.05 }]
    }//end texture map
   }//end texture
  }// end height_field


Post a reply to this message

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