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:22:40 EDT (-0400)
  Re: How to get a texture like (y>0.8 & z>0.9) -> texture a else -> tex=  
From: gonzo
Date: 4 Sep 2004 19:55:56
Message: <413a560c@news.povray.org>
D. H. Berlin wrote:
>>     Mytexture[ ((py>0.8) & (pz>1-0.1)) ]
> 
> Do you mean y and z instead of py and pz here?

I just copied the condition you had in your #if() statement.

You can put whatever condition in the parenthesis you want, if the 
condition is true it will use Mytexture[1], otherwise it will use 
Mytexture[0]


> Btw: When using x, y or z in an texture-block, does this always mean the x,y
> and z used by the texture-calculations, in contrary to the normal meaning
> of x,y and z which is <1,0,0>, <0,1,0> and <0,0,1>?  (Would be great.)
> Or is this special meaning of x,y and z only in effect in a function
> statement as used in the before examples?

About the only time I use <x,y,z> in a texture is to scale or rotate so 
that's specific to the texture. Don't know how <x,y,z> in a function 
declared elsewhere would be treated.

RG


Post a reply to this message

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