POV-Ray : Newsgroups : povray.newusers : global setting for finish Server Time
24 Nov 2024 10:59:44 EST (-0500)
  global setting for finish (Message 1 to 7 of 7)  
From: vincegal
Subject: global setting for finish
Date: 26 Nov 2008 06:05:01
Message: <web.492d2cd3b48ca67b9b697e920@news.povray.org>
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


Post a reply to this message

From: m a r c
Subject: Re: global setting for finish
Date: 26 Nov 2008 07:03:02
Message: <492d3af6$1@news.povray.org>

web.492d2cd3b48ca67b9b697e920@news.povray.org...
> 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't override a yet defined texture for an object.
What I'd do is #declare a finish as
#declare My_finish=finish{finish items}

and replace all finish statements in objects textures by
finish{My_finish}

This way when you make changes in My_finish, you doun't have to edit all 
objects textures


You'd be welcome too on the french POV-community news server
news.lightning-generator.org

Marc


Post a reply to this message

From: SharkD
Subject: Re: global setting for finish
Date: 26 Nov 2008 07:30:01
Message: <web.492d403c4e112c87386fb5870@news.povray.org>
"vincegal" <v.g### [at] reflexions-francecom> wrote:
> 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

I think "ambient" is the only one you can set globally. However, you can declare
a texture as a varaible and then use the variable wherever you need it instead.

-Mike


Post a reply to this message

From: Alain
Subject: Re: global setting for finish
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

From: stbenge
Subject: Re: global setting for finish
Date: 26 Nov 2008 14:07:32
Message: <492d9e74$1@news.povray.org>
Alain wrote:
> vincegal nous illumina en ce 2008-11-26 06:02 -->
>> I want to know if it's possible to make a global setting for the part 
>> {finish}
>>
> You can set any texture as the default one. For that, you need to use a
> #default{...} block early in your scene.

This is my favorite method, though I usually only use it to bring the 
default ambient value down to 0 for every object's finish. I use it in 
every scene I make, because I never did like the standard default 
ambient value as it tends to be somewhat unrealistic.

Sam


Post a reply to this message

From: SharkD
Subject: Re: global setting for finish
Date: 26 Nov 2008 15:10:01
Message: <web.492dac304e112c87dbdde9050@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> 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}}

Nice tip! I didn't know that.

-Mike


Post a reply to this message

From: Alain
Subject: Re: global setting for finish
Date: 26 Nov 2008 17:54:57
Message: <492dd3c1$1@news.povray.org>
SharkD nous illumina en ce 2008-11-26 15:06 -->
> Alain <ele### [at] netscapenet> wrote:
>> 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}}
> 
> Nice tip! I didn't know that.
> 
> -Mike
> 
> 
It's not limited to finish, pigment or textures. You can have a complete material.
#default{material{
	pigment{rgbt 0.8]
	finish{ambient 0 diffuse 0.1 reflection{0.01, 1 fresnel}conserve 
energy}interior{ior 1.38 fade_color rgb<1, 0.31, 0.84>fade_distance 0.1 
fade_power 1001
	media{scattering 1 rgb<0,0.6,0.1>}
	media{emission rgb <0, 1, 0>samples 99}
	}
}

-- 
Alain
-------------------------------------------------
Disc space -- the final frontier!


Post a reply to this message

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