POV-Ray : Newsgroups : povray.newusers : How to get a texture like (y>0.8 & z>0.9) -> texture a else -> texture= b? : Re: How to get a texture like (y>0.8 & z>0.9) -> texture a else -> tex= Server Time
2 Nov 2024 05:21:54 EDT (-0400)
  Re: How to get a texture like (y>0.8 & z>0.9) -> texture a else -> tex=  
From: D  H  Berlin
Date: 3 Sep 2004 17:05:00
Message: <web.4138dbb2682bae3f1c91ccbf0@news.povray.org>
Hi!

Great, this does work.
Thank you all!

Greetings
Dieter

#declare stufe_holz = texture {T_Wood10 scale 1 rotate y*20 finish {
reflection {0.0} ambient 0.5 diffuse 0.1 } };
#declare stufe_metal = texture {T_Silver_3D};
#declare stufe_metal_ab = 0.85;

#declare shm_tex_f =
function(py,pz) {
select(py-stufe_metal_ab,0,select(pz-(1-stufe_metal_ab),1,0) )
}
#declare stufe_holz_metal =
    texture {
      function {shm_tex_f(y,z) }
//      function{y}
      texture_map {
        [ 0.0 stufe_holz ]
        [ stufe_metal_ab stufe_holz ]
        [ stufe_metal_ab*1.0107 stufe_metal ]
        [ 1 stufe_metal ]
      }
    };


Post a reply to this message

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