POV-Ray : Newsgroups : povray.advanced-users : How to put an image over a material_map ? Server Time
28 Jul 2024 16:25:57 EDT (-0400)
  How to put an image over a material_map ? (Message 1 to 3 of 3)  
From: destroyedlolo
Subject: How to put an image over a material_map ?
Date: 23 Dec 2004 09:29:55
Message: <41CAD647.3080903@yahoo.com>
Hello,

I have sent this question on the newbies NG but nobody seems have a 
solution. So I'm  trying my change on Advanced user area ;-D


I have a height_field w/ a mask allowing me to change its textures on
some areas (vegetation, river, rock, ...).

How can I put another image over it (containing roads) ?

This is the code I've tryed and rising the "Cannot layer over a patterned
texture" error.

#declare terrain = height_field {
  png "Eau.png"
  smooth
  texture {
   material_map {
    png "Eau_m.png"
    texture {
     pigment {
      slope y
      color_map {
       [0 White]
       [0.60 SteelBlue*0.1]
       [0.65 White*2]
       [0.7 Gray95]
       [0.75 Gray80]
       [0.85 MediumForestGreen]
       [1 ForestGreen]
      }
     }
    }
    texture {pigment { Sapphire_Agate } scale 1/100 } // Eaux
    texture {pigment { White_Marble } scale 1/100 } // Rochers
    texture {pigment { Jade } scale 1/100 }   // Foret
   }
   rotate x*90
  }
  pigment { image_map { png "Eau_s.png" } rotate x*90}  // This line cause
problem
  translate <-.5, 0, -.5>
  scale <6900,65535,6075>
}

Thanks

Laurent


Post a reply to this message

From: Gilles Tran
Subject: Re: How to put an image over a material_map ?
Date: 23 Dec 2004 13:24:02
Message: <41cb0d42@news.povray.org>

41C### [at] yahoocom...
> This is the code I've tryed and rising the "Cannot layer over a patterned
> texture" error.

This is a limitation of layered textures.
Two solutions:
- add a road mask to your material_map. If you have already defined zones 
for water etc. you can have another for roads.
- use a texture_map statement and a mask for roads, and then have something 
like this:
texture{
    image_pattern{png "road_mask"}
    texture_map{
        [0 T_Road]
        [1 T_Other]
    }
}


-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: destroyedlolo
Subject: Re: How to put an image over a material_map ?
Date: 31 Dec 2004 07:00:57
Message: <41D53F57.3050505@yahoo.com>
Hi Gilles,

Thanks for your help :-)

Gilles Tran wrote:

> 41C### [at] yahoocom...
> 
>>This is the code I've tryed and rising the "Cannot layer over a patterned
>>texture" error.
> 
> 
> This is a limitation of layered textures.
> Two solutions:
> - add a road mask to your material_map. If you have already defined zones 
> for water etc. you can have another for roads.

It's the solution I use.
You can find the result on
http://destroyedlolo.homeunix.org:8080/galerie/France/RhoneAlpes/EauFroide/

I have to improve textures ...

> - use a texture_map statement and a mask for roads, and then have something 
> like this:
> texture{
>     image_pattern{png "road_mask"}
>     texture_map{
>         [0 T_Road]
>         [1 T_Other]
>     }
> }

Where do you put this sentence ?
I've tryed to add this bloc after the first texture bloc but I got an error.

Thanks & regards

Laurent


Post a reply to this message

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