POV-Ray : Newsgroups : povray.general : Possible to alter finishes with texture patterns? Server Time
28 Dec 2024 19:35:40 EST (-0500)
  Possible to alter finishes with texture patterns? (Message 1 to 4 of 4)  
From: tutki
Subject: Possible to alter finishes with texture patterns?
Date: 7 Feb 2022 11:35:00
Message: <web.620149699f1ce1c95c8e85ceb98f01db@news.povray.org>
Currently I have a layered texture that uses the `checker` pattern in the top
layer to alternate between a flat metal color and patches of `cells` patterns
(basically using a transparent color in the checker layer where the cells show
through). I want the metal part to have a metallic finish with specular
component, but the cells part non-metallic. But I can't figure out how to make
the metallic finish apply only to the metallic part of the checker pattern;
adding the finish block makes the entire texture metallic, which is not
intended.

How do I make it so that the metallic finish only applies to half of the checker
pattern?


Post a reply to this message

From: William F Pokorny
Subject: Re: Possible to alter finishes with texture patterns?
Date: 7 Feb 2022 13:42:26
Message: <62016812$1@news.povray.org>
On 2/7/22 11:31, tutki wrote:
> Currently I have a layered texture that uses the `checker` pattern in the top
> layer to alternate between a flat metal color and patches of `cells` patterns
> (basically using a transparent color in the checker layer where the cells show
> through). I want the metal part to have a metallic finish with specular
> component, but the cells part non-metallic. But I can't figure out how to make
> the metallic finish apply only to the metallic part of the checker pattern;
> adding the finish block makes the entire texture metallic, which is not
> intended.
> 
> How do I make it so that the metallic finish only applies to half of the checker
> pattern?
> 

I'm unsure if I understand your issue. My up front answer would be to 
specify a finish block in both textures used in the checker based texture.

#declare T0 = texture { pigment { rgb 0 } finish { reflection { 1 } } }
#declare T1 = texture { pigment { rgb 0 } finish { reflection { 0 } } }
#declare Obj00 = object {
     Plane00
     texture { checker
       //texture { pigment { rgb 0 } finish { reflection { 1 } } }
       //texture { pigment { rgb 0 } finish { reflection { 0 } } }
         texture { T0 }
         texture { T1 }
     }
}

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: Possible to alter finishes with texture patterns?
Date: 7 Feb 2022 13:45:00
Message: <web.62016849e7ec5a3c1f9dae3025979125@news.povray.org>
"tutki" <nomail@nomail> wrote:
> Currently I have a layered texture that uses the `checker` pattern in the top
> layer to alternate between a flat metal color and patches of `cells` patterns
> (basically using a transparent color in the checker layer where the cells show
> through). I want the metal part to have a metallic finish with specular
> component, but the cells part non-metallic. But I can't figure out how to make
> the metallic finish apply only to the metallic part of the checker pattern;
> adding the finish block makes the entire texture metallic, which is not
> intended.
>
> How do I make it so that the metallic finish only applies to half of the checker
> pattern?

You have to define your checker pattern as a texture, and then provide a
_texture list_ that has all of the specifically defined texture/finish entries.

Usual:
pigment{ checker // 2 colors/textures
         color White
         color Black }

What you want:
texture {
     checker
     texture_1
     texture_2
}

Try it with a simple sample scene and you'll see what I mean.

http://www.f-lohmueller.de/pov_tut/tex/tex_830e.htm

http://www.f-lohmueller.de/pov_tut/tex/tex_890e.htm


Post a reply to this message

From: tutki
Subject: Re: Possible to alter finishes with texture patterns?
Date: 7 Feb 2022 15:05:00
Message: <web.62017b0ce7ec5a3c5c8e85ceb98f01db@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
[...]
> texture {
>      checker
>      texture_1
>      texture_2
> }
[...]

Ahh, I didn't realize `checker` could be used with two textures.  After some
tweaking I managed to do what I wanted. Thanks!


Post a reply to this message

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