POV-Ray : Newsgroups : povray.newusers : inheritance of pigment and finish? Server Time
1 Nov 2024 03:18:18 EDT (-0400)
  inheritance of pigment and finish? (Message 1 to 2 of 2)  
From: Hadmut
Subject: inheritance of pigment and finish?
Date: 23 Jun 2006 20:12:24
Message: <449C8364.8020204@msgid.danisch.de>
Hi,

another question:

Is it possible to inherit pigment and finish seperately?

I'd like to do something like



object {
union {

   box with pigment color red ...
   box with pigment color green ...
   box with pigmetn color blue ...


}
finish {reflection  0.3}}


i.e. to give the parts of a union different colors while defining other
parts of the texture globally for all parts of the union. It does not
seem to work, the colors red/green/blue seem to completely override all
texture settings including the finish...



regards
Hadmut


Post a reply to this message

From: Alain
Subject: Re: inheritance of pigment and finish?
Date: 24 Jun 2006 12:33:22
Message: <449d6952$1@news.povray.org>
Hadmut nous apporta ses lumieres en ce 23/06/2006 20:12:
> Hi,
> 
> another question:
> 
> Is it possible to inherit pigment and finish seperately?
> 
> I'd like to do something like
> 
> 
> 
> object {
> union {
> 
>    box with pigment color red ...
>    box with pigment color green ...
>    box with pigmetn color blue ...
> 
> 
> }
> finish {reflection  0.3}}
> 
> 
> i.e. to give the parts of a union different colors while defining other
> parts of the texture globally for all parts of the union. It does not
> seem to work, the colors red/green/blue seem to completely override all
> texture settings including the finish...
> 
> 
> 
> regards
> Hadmut
Any texture attributed to a component in an union will override the one given to the
whole union. 
When you define a pigment, you are using the default texture altered by your pigment.
Unless you define it otherwise, the default texture is texture{pigment{rgb
0}finish{ambient 0.1 
diffuse 0.6 reflection 0}}
That finish is thus effectively given to your components and everride the one given to
the whole union.

Alain
-------------------------------------------------
BE ALERT!!!!  (The world needs more lerts ...)


Post a reply to this message

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