|  |  | Thank you very much Warp! :)
This is very useful. I modify your example in order to use the value of the
image maps as an individual value. I translate each cube according to the
green component of the picture. It work well, and I think base on that
thing I can use the value to compute any kind of stuff! :)
here it's your example modified...
// create a regular point light source
#declare Image =
  function { pigment { image_map { png "firstMap.png" } } }
#declare ImageWidth = 160;
#declare ImageHeight = 120;
#declare IndY = 0;
#while(IndY < ImageHeight)
  #declare IndX = 0;
  #while(IndX < ImageWidth)
    #declare ImageColor =
      Image(IndX/ImageWidth, IndY/ImageHeight, 0);
    box
    { -.4, .4 pigment { color ImageColor }
      translate <-ImageWidth/2 + IndX, 10.0*ImageColor.green,
                 -ImageHeight/2 + IndY>
    }
    #declare IndX = IndX+1;
  #end
  #declare IndY = IndY+1;
#end
camera { location <25, 200, -125> look_at 0 angle 35 }
light_source { <200, 500, -100>, 1 }
// ------------
btw, I modified the filename to match the file that I put in my test dir.
but you probably figure it out... ;)
thanks!
impress/OPV
Post a reply to this message
 |  |