POV-Ray : Newsgroups : povray.general : texture dependent on surface normal angle? Server Time
6 Nov 2024 00:29:34 EST (-0500)
  texture dependent on surface normal angle? (Message 1 to 4 of 4)  
From: Rafal 'Raf256' Maj
Subject: texture dependent on surface normal angle?
Date: 27 Oct 2004 23:28:33
Message: <Xns9590382047634raf256com@203.29.75.35>
Is there a way to blend textures, as in texture_map, but using angle of 
normal as a pattern? 

So that "walls" - surfaces like :

 |
 | plane { x,0 }  or plane { z,0 }
 |
 |

will have texture A, and flat surfaces like 

-----  plane { y,0 }

would have texture B, and

plane { y,0 rotate x*45 /* or z*45 */ }  will be 50% A and 50% B


I want to use it for rusty ship - so that deck floor would have quite 
normal surface, and all walls will have "water steams" / rust (like this 
marks under windows, etc)

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: texture dependent on surface normal angle?
Date: 27 Oct 2004 23:31:51
Message: <Xns959038AF91C18raf256com@203.29.75.35>
spa### [at] raf256com news:Xns9590382047634raf256com@203.29.75.35

> would have texture B, and
> plane { y,0 rotate x*45 /* or z*45 */ }  will be 50% A and 50% B

So its something between MlPov's, and 3.6 faced normal pattern.

It would be excelent to have possibility of using:

pigment {
  function { normal.z }
}

where normal is normal vector of given surface in currently evaluated 
point. Or is something like this already available?


-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: ABX
Subject: Re: texture dependent on surface normal angle?
Date: 28 Oct 2004 02:17:08
Message: <nm31o0tr572ves5e3u1jm6ivavo9qd70l4@4ax.com>
On 27 Oct 2004 23:28:33 -0400, "Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote:
> Is there a way to blend textures, as in texture_map, but using angle of 
> normal as a pattern?

Slope pattern can help you

http://www.povray.org/documentation/view/3.6.1/393/

ABX


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: texture dependent on surface normal angle?
Date: 11 Nov 2004 23:29:58
Message: <Xns959F384FBE9DFraf256com@203.29.75.35>
abx### [at] abxartpl news:nm31o0tr572ves5e3u1jm6ivavo9qd70l4@4ax.com

> http://www.povray.org/documentation/view/3.6.1/393/
> 

Yeap, it did, thanx.

Btw - isn't there any way to use it in a function? 

Like:

pigment {
  function {
    f_slope.x + x*2 + f_bozo(x,y,z)
  }
}



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

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