POV-Ray : Newsgroups : povray.general : Can use TWO image_map on ONE heigh_field? : Re: Can use TWO image_map on ONE heigh_field? Server Time
2 Nov 2024 09:22:00 EDT (-0400)
  Re: Can use TWO image_map on ONE heigh_field?  
From: Mike Andrews
Date: 15 Apr 2004 07:25:00
Message: <web.407e70da94e902359735c0c0@news.povray.org>
"jong" <sjl### [at] earthsinicaedutw> wrote:
> Hi,
>
> I try to use two image_map on the heigh_field.
> But the result always show the later one.
> Here is the simplified scene:
>
> height_field {jpeg "mount.jpg" smooth
> pigment {image_map{jpeg "mount_green.jpg"}}
> pigment {image_map{jpeg "road.jpg"}}
> finish  {ambient 0.1 diffuse 0.9 phong 0.5}
>              }
>
> I also try to use pigment_map. But the result
> is not change. It always only show the later one
> (road.jpg) on the heigh_field.
>
> Is there any mistake in the syntax?
> How can I do to show both of them?

I'd probably use a pigment_pattern{} block. If you can produce an image that
is white where you want the road and black elsewhere (call it something
like 'road_binary.jpg') then this might work:-

height_field {
  jpeg "mount.jpg" smooth
  pigment {
    pigment_pattern{image_map{jpeg "road_binary.jpg"}}
    pigment_map{
      [0.5 image_map{jpeg "mount_green.jpg"}]
      [0.5 image_map{jpeg "road.jpg"}]
    }
  }
  finish {ambient 0.1 diffuse 0.9 phong 0.5}
}

>
> Thanks all,
>
> Shiann-Jong

Bye for now,

Mike Andrews.


Post a reply to this message

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