POV-Ray : Newsgroups : povray.advanced-users : Orthogonal overlapping layered textures. : Re: Orthogonal overlapping layered textures. Server Time
20 Apr 2024 05:48:54 EDT (-0400)
  Re: Orthogonal overlapping layered textures.  
From: omniverse
Date: 23 Mar 2017 15:15:01
Message: <web.58d41d83a8a4e9929c5d6c810@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I wanted to make a "+"-shaped pattern by overlapping a gradient x and a gradient
> y pigment with abruptly changing color maps.
>
> I seemed to get the first texture I specified in the layering - when I tried to
> put a clear texture with an orthogonal stripe (0.49-0.51) on top of that, it
> occluded the first texture.
>
> I always have problems correctly implementing layered textures....
>
> Gonna head to lunch - perhaps someone has advice / examples?

Can't imagine the layer transparency obscuring the underlying texture, shouldn't
be any problem with that alone anyway.

Don't know the exact thing you're trying to make (orthogonal=horizontal by any
chance?) but here's a scene file showing either a layered pattern or image
pattern. Not sure of how good that is so beware of faults. Maybe you can get
something figured out from it.
Use your own existing render output folder/directory.

//cmd:+w500 +h500 +fn +ua +oc:\renderings\image-pattern_cross-tiles

#version 3.7;

global_settings{assumed_gamma 1}

#declare LayeredPattern=yes;

#declare CreateImageMap=no;

light_source{-9*z,1}

camera{
 #if (CreateImageMap=yes)
 orthographic right x*3 up y*3
 #end
 location -4*z look_at 0}

background {rgb 0}

#declare GradX=
 texture{
  pigment{
   gradient x
   color_map{
    [0 red 1]
    //[0.49 red 1]
    [0.49 rgbt 1]
    [0.49 green 1]
    [0.51 green 1]
    [0.51 rgbt 1]
    //[0.51 blue 1]
    [1 blue 1]
   }
  }
 }

#declare GradY=
 texture{
  pigment{
   gradient y
   color_map{
    [0 red 1]
    //[0.49 red 1]
    [0.49 rgbt 1]
    [0.49 green 1]
    [0.51 green 1]
    [0.51 rgbt 1]
    //[0.51 blue 1]
    [1 blue 1]
   }
  }
 }

#declare GradXY=
pigment {green 1}


#if (LayeredPattern=no)

#if (CreateImageMap=yes)
union{
 box{-0.5,0.5
  pigment {rgb 0.25} // middle dark gray
  }
 box{-0.5,0.5
  pigment {rgb 1} // bottom white
  translate -y}
 box{-0.5,0.5
  pigment {rgb 1} // top white
  translate y}
 box{-0.5,0.5
  pigment {rgb 0.5} // left gray
  translate -x}
 box{-0.5,0.5
  pigment {rgb 0.5} // right gray
  translate x}
  scale <1,1,0.01>
}

 #else

plane{z,0
 texture{
  image_pattern{
   png "image-pattern_cross-tiles" //use_alpha
   map_type 0
   once
  }
  texture_map{
   [0 pigment {rgbt 1}] // outside area
   [0.25 GradXY] // middle tile
   [0.5 GradX] // left and right tiles
   [1 GradY] // top and bottom tiles
  }
  translate -0.5 // centering
  scale 3 // 1 unit boxes 3 wide, 3 tall
 }
}

#end

#else

plane{ // simple layered pattern
 z,0
 texture{GradX}
 texture{GradY}
}

#end


Post a reply to this message

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