POV-Ray : Newsgroups : povray.newusers : global setting for finish : Re: global setting for finish Server Time
28 Jul 2024 14:31:29 EDT (-0400)
  Re: global setting for finish  
From: Alain
Date: 26 Nov 2008 10:53:10
Message: <492d70e6$1@news.povray.org>
vincegal nous illumina en ce 2008-11-26 06:02 -->
> Hi,
> I'am newbies on POBray.
> I want to know if it's possible to make a global setting for the part {finish}
> on CSG object ?
> At this time i must replace all the line code one after one and it's very long.
> How can i do this ? using global setting or using teh replace function on the
> editor ??
> 
> I use POVray for windows
> 
> Thank for your answer
> 
> Vincent GALLAY
> 
> 
You can set any texture as the default one. For that, you need to use a
#default{...} block early in your scene.
Sample:
#default{texture{pigment checkers}finish{ambient 0.5 diffuse 0.5 brilliance 12}}

After that, any object that don't have a pigment deffined will have the default 
checkers pattern. Any texture that don't have a finish statement will get the 
finish stated.

You should apply the finish to the complete CSG object by placing the finish 
statement at the end of the CSG object, after all of the components. It's usualy 
beter to place it before the eventual transformations applyed to that CSG object.

Another way, is to use
#declare Name = texture{pigment{Some_Pigment} finish{Some_finish} }
early in your scene.
The name can be about anything, must start by a letter. It GREATLY recommended 
to always start the name of user-deffined variables start with an upper case letter.
That way, the various textures, including the finish, are regrouped toggether 
near the top of the scene, making it easier to find and edit them.
If a texture is used in several places, you only have to edit it once to change 
it everywhere it's used.

-- 
Alain
-------------------------------------------------
Drive A: not responding.. .Formating C: instead


Post a reply to this message

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