POV-Ray : Newsgroups : povray.general : Toggling on and off "everything at ambient rgb 1" Server Time
15 Nov 2024 17:12:28 EST (-0500)
  Toggling on and off "everything at ambient rgb 1" (Message 1 to 6 of 6)  
From: Greg M  Johnson
Subject: Toggling on and off "everything at ambient rgb 1"
Date: 17 Jul 2004 21:11:02
Message: <40f9ce26$1@news.povray.org>
I thought I new how to do this, but everything I've tried, even after RTFM,
doesn't do the job.

I have a standard scene and I assume that with one statement of povray SDL,
I can simply turn on a situation where everything is as if it had
finish{ambient rgb 1}.   I cannot tell if either the docs are deficient,
povray just cannot do this, or I've got a big bug in my code that's messing
with the normal behavior of pov.

Thanks.


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: Toggling on and off "everything at ambient rgb 1"
Date: 18 Jul 2004 04:11:41
Message: <40fa30bd$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

	If all your objects must have the same ambient setting, you can use
the #default directive. But for any object that requires its own, you
will have to use a #if in the texture.

	If you want to be able to turn on or off the ambient for the whole
scene at once, you can also take a look at the "ambient_light" in
global_settings. It won't do much to switch between "ambient 1" and
something else in each object, but it will allow you to switch
between "ambient 0" and something else...

		Jerome

Greg M. Johnson wrote:
| I thought I new how to do this, but everything I've tried, even
after RTFM,
| doesn't do the job.
|
| I have a standard scene and I assume that with one statement of
povray SDL,
| I can simply turn on a situation where everything is as if it had
| finish{ambient rgb 1}.   I cannot tell if either the docs are
deficient,
| povray just cannot do this, or I've got a big bug in my code that's
messing
| with the normal behavior of pov.
|
| Thanks.
|
|

- --
******************************
*      Jerome M. Berger      *
* mailto:jbe### [at] ifrancecom *
*  http://jeberger.free.fr/  *
******************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA+jC7qIYJdJhyixIRAvUzAJwJ45RlzEj2C/NHkscbr+v4iD0zCACgpEBt
z+5fWRpiS7EM2BauHfaCAOY=
=bITw
-----END PGP SIGNATURE-----


Post a reply to this message

From: Hughes, B 
Subject: Re: Toggling on and off "everything at ambient rgb 1"
Date: 18 Jul 2004 05:39:23
Message: <40fa454b$1@news.povray.org>

news:40fa30bd$1@news.povray.org...
>
> If you want to be able to turn on or off the ambient for the whole
> scene at once, you can also take a look at the "ambient_light" in
> global_settings. It won't do much to switch between "ambient 1" and
> something else in each object, but it will allow you to switch
> between "ambient 0" and something else...

Yeah, there isn't really a one-keyword way to set everything in a scene to
ambient rgb <1,1,1> if all ambients are set as something else, e.g. ambient
rgb <0.1,0.2,0.3> in the individual finish statements. Greg might have
thought this was something possible with ambient_light.

As Jerome was implying, even if global_settings {ambient_light 1000} were
used, to try and overcome this, it just can't; since it is only a
multiplier. Anything set to zero will still be zero. This means finish
ambient's should be non-zero for the global ambient to be able to control
the range, whether done from a #default or every texture. Of course, if you
tend to use ambient as a color that'll need compensating for, too.

So if all finishes have default ambients, or higher, then using
ambient_light 10 could work. Checking on that ATM... no, wrong-- at least,
not completely right. Single colors are fine but if more than one color is
used it pushes the whole thing into rgb <1,1,1>, or white,  which isn't
necessarily the original pigment (unless ambient default to begin with).

Bob H.


Post a reply to this message

From: Gilles Tran
Subject: Re: Toggling on and off "everything at ambient rgb 1"
Date: 18 Jul 2004 06:42:17
Message: <40fa5409$1@news.povray.org>

news:40f9ce26$1@news.povray.org...
> I have a standard scene and I assume that with one statement of povray
SDL,
> I can simply turn on a situation where everything is as if it had
> finish{ambient rgb 1}.   I cannot tell if either the docs are deficient,
> povray just cannot do this, or I've got a big bug in my code that's
messing
> with the normal behavior of pov.

#declare Ambient=0;

then put finish{ambient Ambient} where needed and change the Ambient value
to 1.

G.


-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Toggling on and off "everything at ambient rgb 1"
Date: 18 Jul 2004 07:56:09
Message: <40fa6559$1@news.povray.org>
Yes, thanks, Bob, you guessed it.  I had a complex scene with about 18
different texture statements and I did *not* want to rewrite them all.  And
I misunderstood what those default settings do.

You can get close with low quality, lights-off radiosity, but the effect
isn't quite the same.

I was wondering whether I might be able to make a  "cartoon"  look with
ambient rgb 1  but lots of focal blur.



"Hughes, B." <bob### [at] charternet> wrote in message
news:40fa454b$1@news.povray.org...
> Yeah, there isn't really a one-keyword way to set everything in a scene to
> ambient rgb <1,1,1> if all ambients are set as something else, e.g.
ambient
> rgb <0.1,0.2,0.3> in the individual finish statements. Greg might have
> thought this was something possible with ambient_light.
>
> As Jerome was implying, even if global_settings {ambient_light 1000} were
> used, to try and overcome this, it just can't; since it is only a
> multiplier. Anything set to zero will still be zero. This means finish
> ambient's should be non-zero for the global ambient to be able to control
> the range, whether done from a #default or every texture. Of course, if
you
> tend to use ambient as a color that'll need compensating for, too.
>


Post a reply to this message

From: Brian Elliott
Subject: Re: Toggling on and off "everything at ambient rgb 1"
Date: 18 Jul 2004 11:00:49
Message: <40fa90a1$1@news.povray.org>
"Greg M. Johnson" <gregj;-)565### [at] aolcom> wrote in message
news:40f9ce26$1@news.povray.org...
> I thought I new how to do this, but everything I've tried, even after
RTFM,
> doesn't do the job.
>
> I have a standard scene and I assume that with one statement of povray
SDL,
> I can simply turn on a situation where everything is as if it had
> finish{ambient rgb 1}.   I cannot tell if either the docs are deficient,
> povray just cannot do this, or I've got a big bug in my code that's
messing
> with the normal behavior of pov.

There's a somewhat related method I use for managing ambient throughout a
scene with a global radiosity variable.

In every scene, I declare a Radiosity variable; it is always there, either
"off" or "on".  Then I declare a "Boolean inverse", which is used as a flag
in finish {} blocks.  Also the variables control the placement of
ambient_light in the global_settings{} block.

It basically goes like this:

#declare Radiosity = off;  // or "on"
#declare _Rad = (Radiosity ? 0 : 1);  // notRad is the opposite of Radiosity

global_settings
{
#if (Radiosity)
  ambient_light 0
  radiosity { <radiosity settings>}
#end
}

I keep that in my Insert Menu, so I don't have to type it in every scene.
Then every object which needs an EXPLICITLY defined ambient value, has a
finish statement similar to either of these two - Both methods work
differently.

finish { ambient 0.2 * _Rad}          // ambient = {0.2 or 0.0}
finish { #if (_Rad) ambient 0.2 #end} // ambient = {0.2 or texture default}

I think I have almost always used the first method.  The second allows
glowing ambient textures if you don't touch the global ambient_light, unlike
I have done.

But unfortunately you'll still have to painfully edit all those object
textures in your particular scene!

Cheers,
  Brian


Post a reply to this message

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