POV-Ray : Newsgroups : povray.general : Parse Error: Cannot layer a patterned texture over another. Server Time
27 Dec 2024 01:42:41 EST (-0500)
  Parse Error: Cannot layer a patterned texture over another. (Message 1 to 5 of 5)  
From: b
Subject: Parse Error: Cannot layer a patterned texture over another.
Date: 23 Sep 2014 18:30:01
Message: <web.5421f36eb06a23c15b482a740@news.povray.org>
I'm trying to render a realistic looking Earth. I'm texturing an image and
nomral map now I want to have specular map. I found I can do this with a
material_map however when I add that into the mix (shown below) I get the above
error. How can I have all 3 things: image_map, bump_map and material_map?



 54 sphere {0,1
 55   //finish { ambient 0.1 diffuse 0.5 specular 0.7 }
 56   //pigment { White }
 57   pigment {
 58       image_map {
 59         jpeg "earthmap4k.jpg" once map_type 2
 60       }
 61       translate <0,-0.5,0>
 62       scale <1,2,1>
 63   }
 64   normal {
 65     bump_map {
 66       jpeg "earthbump4k.jpg" once map_type 2
 67       bump_size 15.0
 68     }
 69     translate <0,-0.5,0>
 70     scale <1,2,1>
 71   }
 72   texture {
 73       material_map {
 74         jpeg "earthspec4k.jpg"
 75         once map_type 2
 76         //interpolate 2 once
 77         texture { LandTex }
 78         texture { WaterTex }
 79         }
 80       translate <0, -0.5, 0>
 81       scale <1,2,1>
 82   }
 83   rotate -180.0*y
 84 }


Post a reply to this message

From: Alain
Subject: Re: Parse Error: Cannot layer a patterned texture over another.
Date: 23 Sep 2014 19:27:27
Message: <542201df@news.povray.org>

>
> I'm trying to render a realistic looking Earth. I'm texturing an image and
> nomral map now I want to have specular map. I found I can do this with a
> material_map however when I add that into the mix (shown below) I get the above
> error. How can I have all 3 things: image_map, bump_map and material_map?
>
>
>
>   54 sphere {0,1
>   55   //finish { ambient 0.1 diffuse 0.5 specular 0.7 }
>   56   //pigment { White }
>   57   pigment {
>   58       image_map {
>   59         jpeg "earthmap4k.jpg" once map_type 2
>   60       }
>   61       translate <0,-0.5,0>
>   62       scale <1,2,1>
>   63   }
>   64   normal {
>   65     bump_map {
>   66       jpeg "earthbump4k.jpg" once map_type 2
>   67       bump_size 15.0
>   68     }
>   69     translate <0,-0.5,0>
>   70     scale <1,2,1>
>   71   }
>   72   texture {
>   73       material_map {
>   74         jpeg "earthspec4k.jpg"
>   75         once map_type 2
>   76         //interpolate 2 once
>   77         texture { LandTex }
>   78         texture { WaterTex }
>   79         }
>   80       translate <0, -0.5, 0>
>   81       scale <1,2,1>
>   82   }
>   83   rotate -180.0*y
>   84 }
>
>
>

A material_map is designed to works with palleted images. Using a high 
or true colour leads to problems as you'll need maps spanning a huge 
array of values.
A material_map DON'T contain materials but textures.

So, you may want to have a palleted, or B&W, source image with one index 
for the water and another for the ground areas. A pure black and white 
image will do just right and will be relatively small as a bonus: 1 bit 
per pixel.

Now, you need to provide the image_map for the ground areas with it's 
finish and normals and a texture for the water areas with the wanted 
specular.




Alain


Post a reply to this message

From: b
Subject: Re: Parse Error: Cannot layer a patterned texture over another.
Date: 24 Sep 2014 12:50:00
Message: <web.5422f53bacd2b05a5b482a740@news.povray.org>
Alain <kua### [at] videotronca> wrote:


>
> A material_map is designed to works with palleted images. Using a high
> or true colour leads to problems as you'll need maps spanning a huge
> array of values.
> A material_map DON'T contain materials but textures.
>
> So, you may want to have a palleted, or B&W, source image with one index
> for the water and another for the ground areas. A pure black and white
> image will do just right and will be relatively small as a bonus: 1 bit
> per pixel.
>
> Now, you need to provide the image_map for the ground areas with it's
> finish and normals and a texture for the water areas with the wanted
> specular.
>
>
>
>
> Alain


Hi Alain, You describe perfectly what I'm already doing! It doesn't answer the
question. :-(


Post a reply to this message

From: clipka
Subject: Re: Parse Error: Cannot layer a patterned texture over another.
Date: 24 Sep 2014 13:00:14
Message: <5422f89e@news.povray.org>
Am 24.09.2014 00:25, schrieb b:
>
> I'm trying to render a realistic looking Earth. I'm texturing an image and
> nomral map now I want to have specular map. I found I can do this with a
> material_map however when I add that into the mix (shown below) I get the above
> error. How can I have all 3 things: image_map, bump_map and material_map?

You can't layer a pattern-mapped (or averaged) texture over another; 
instead, you'll need to pattern-map layered textures.


Post a reply to this message

From: b
Subject: Re: Parse Error: Cannot layer a patterned texture over another.
Date: 25 Sep 2014 18:45:00
Message: <web.54249abaacd2b05a5b482a740@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.09.2014 00:25, schrieb b:
> >
> > I'm trying to render a realistic looking Earth. I'm texturing an image and
> > nomral map now I want to have specular map. I found I can do this with a
> > material_map however when I add that into the mix (shown below) I get the above
> > error. How can I have all 3 things: image_map, bump_map and material_map?
>
> You can't layer a pattern-mapped (or averaged) texture over another;
> instead, you'll need to pattern-map layered textures.

Thanks, Your and Alain's comments made me think more about what I'm attempting.
Then I found the solution: put the image and bump maps into the textures used in
the material_map.

 34 #declare WaterTex = texture {
 35   pigment {
 36       image_map {
 37         jpeg "earthmap4k.jpg" once map_type 2
 38       }
 39   }
 40   normal {
 41     bump_map {
 42       jpeg "earthbump4k.jpg" once map_type 2
 43       bump_size 15.0
 44     }
 45   }
 46   finish { ambient 0.3 diffuse 0.6 specular 0.8 }
 47   };
 48
 49 #declare LandTex = texture {
 50   pigment {
 51       image_map {
 52         jpeg "earthmap4k.jpg" once map_type 2
 53       }
 54   }
 55   normal {
 56     bump_map {
 57       jpeg "earthbump4k.jpg" once map_type 2
 58       bump_size 15.0
 59     }
 60   }
 61   finish { ambient 0.3 diffuse 0.3 specular 0.0 }
 62   };
 63
 64 sphere {
 65   0, 1
 66   texture {
 67       material_map {
 68         jpeg "earthspec4k.jpg"
 69         once map_type 2
 70         texture { LandTex }
 71         texture { WaterTex }
 72         }
 73       translate <0, -0.5, 0>
 74       scale <1,2,1>
 75   }
 76   rotate -180.0*y
 77   scale RE
 78 }


Post a reply to this message

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