POV-Ray : Newsgroups : povray.general : Parse Error: Cannot layer a patterned texture over another. : Re: Parse Error: Cannot layer a patterned texture over another. Server Time
18 Jun 2024 10:09:28 EDT (-0400)
  Re: Parse Error: Cannot layer a patterned texture over another.  
From: b
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.