POV-Ray : Newsgroups : povray.general : How is the arrangement of texture, pigment, and finish? Server Time
28 Mar 2024 05:42:17 EDT (-0400)
  How is the arrangement of texture, pigment, and finish? (Message 1 to 3 of 3)  
From: Kima
Subject: How is the arrangement of texture, pigment, and finish?
Date: 1 Feb 2020 19:15:01
Message: <web.5e36136e5b8d0040ecc0fada0@news.povray.org>
It may seem a stupid question, but what is the difference between

object{ ...
    texture{
        pigment{ ... }
        finish{ ... }
    }
}

and

object{ ...
    pigment{ ... }
    finish{ ... }
}

and

object{ ...
    pigment{ ...
        finish{ ... }
    }
}


Post a reply to this message

From: Bald Eagle
Subject: Re: How is the arrangement of texture, pigment, and finish?
Date: 1 Feb 2020 21:05:01
Message: <web.5e362e25a5419ea04eec112d0@news.povray.org>
"Kima" <nomail@nomail> wrote:
> It may seem a stupid question, but what is the difference between
>
> object{ ...
>     texture{
>         pigment{ ... }
>         finish{ ... }
>     }
> }
>
> and
>
> object{ ...
>     pigment{ ... }
>     finish{ ... }
> }
>
> and
>
> object{ ...
>     pigment{ ...
>         finish{ ... }
>     }
> }

Functionally, I guess it will come down to syntax, and what can and cannot be
automatically "upgraded" from a lesser to a wider scope "thing".
Not sure about the last one - I had no idea you could put a finish statement
_inside_ a pigment statement.

material is the widest scope, acting as a kind of wrapper for texture, normal,
finish, interior

texture is a wrapper for pigment and color

I'm sure it may be covered ok in the docs, though those can be less clear at
times.  ;)

I'm sure someone else has a better, more accurate explanation.

The thing to keep in mind is that POV-Ray has grown sort of organically from an
independent seed - and it's still growing, so there are things that change, and
work _almost_ all of the time, and some things seem to work all of the time but
are really "broken" if you go digging deep enough...

So just experiment with what works and try to debug to the best of your ability.
Texture maps and material maps drive me nuts.


Post a reply to this message

From: Alain Martel
Subject: Re: How is the arrangement of texture, pigment, and finish?
Date: 2 Feb 2020 10:02:14
Message: <5e36e476$1@news.povray.org>
Le 2020-02-01 à 19:10, Kima a écrit :
> It may seem a stupid question, but what is the difference between
> 
> object{ ...
>      texture{
>          pigment{ ... }
>          finish{ ... }
>      }
> }

Define the whole texture.

> 
> and
> 
> object{ ...
>      pigment{ ... }
>      finish{ ... }
> }

Define the pigment with the default finish, then define a custom finish 
that replace the default.

> 
> and
> 
> object{ ...
>      pigment{ ...
>          finish{ ... }
>      }
> }

Start by defining a pigment with the default finish, but then define a 
custom finish before finishing the pigment.

> 
> 

There is no functional difference between them, just different 
flowcharts doing the same thing.

As it is possible, but not encouraged, to #declare an object from within 
a pigment and use it elsewhere, there should be no problem with the 
third and it should give the same result as the first two. It's just not 
a recommended structure.


Post a reply to this message

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