POV-Ray : Newsgroups : povray.general : The philosophy of union and non-overriding of pigments : Re: The philosophy of union and non-overriding of pigments Server Time
8 Aug 2024 08:14:19 EDT (-0400)
  Re: The philosophy of union and non-overriding of pigments  
From: Tom Melly
Date: 6 Feb 2001 10:20:54
Message: <3a801656$1@news.povray.org>
"Greg M. Johnson" <gre### [at] my-dejanewscom> wrote in message
news:3A800076.6EB9CAB2@my-dejanews.com...
> Can someone just help me understand the philosophy of how unions are
> textured?

Basically, you can set a default texture for the whole union that will be
applied to any parts of the union that are not individually textured
elsewhere. So, if the bulk of your union is white, but one object within it
is black, then you only need two texture statements - a black one for the
black object and a white one for the whole union. If the behaviour was
different - for example, if the union texture over-wrote the object texture,
then you would have to apply individual textures to every object in the
union, even though only one of them required a different texture to the
rest.

Where (to me) things get more confusing is the following code:

union{
  sphere{0, 1 pigment{White}}
  sphere{0, 1 translate x*2 normal{bozo 10}}
  sphere{0, 1 translate x*-2}
  pigment{Red}
  normal{granite}

}

Here, the sphere with the bozo normal applied generates a warning ("no
pigment"). Also, the white sphere will have no normal. I understand what is
happening, I just don't find it very useful or intuitive.

IMHO it would be better if the red pigment was applied to anything without a
pigment statement, and the granite normal to anything without a normal
statement.


Post a reply to this message

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