POV-Ray : Newsgroups : povray.general : Inverse colors Server Time
10 Aug 2024 17:31:16 EDT (-0400)
  Inverse colors (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Bill DeWitt
Subject: Inverse colors
Date: 28 Nov 1999 00:51:34
Message: <3840c2e6@news.povray.org>
I can't think of a way to make an object have the inverse color of the
objects behind it. Is there a way?

I was thinking that it would be something like a filter that had a negative
value, but that didn't work of course...


Post a reply to this message

From: PoD
Subject: Re: Inverse colors
Date: 28 Nov 1999 06:57:41
Message: <38411913.1E16ECD8@merlin.net.au>
Bill DeWitt wrote:
> 
> I can't think of a way to make an object have the inverse color of the
> objects behind it. Is there a way?
> 
> I was thinking that it would be something like a filter that had a negative
> value, but that didn't work of course...

pigment{ rgbf <1,1,1,-1> }
finish{ ambient 0.5 }  // this value threw me 

Cheers, PoD.


Post a reply to this message

From: Bill DeWitt
Subject: Re: Inverse colors
Date: 28 Nov 1999 09:15:05
Message: <384138e9@news.povray.org>
"PoD" <pod### [at] merlinnetau> wrote :
>
> pigment{ rgbf <1,1,1,-1> }
> finish{ ambient 0.5 }  // this value threw me
>

    That makes a nice raised look (I am using text) but not quite an
inverse. What I want would be something that shows white over black ,black
over white, purple over green, green over purple... so that rgb<1,1,0> would
be rgb<0,0,1> etc.

    I would just manually (mathematically) change the pigment, but I want
one part of the object to show one value and the other part to show another
as it moves around. I think it could be done with media and I am going to
try today, but I would rather have a pigment.


Post a reply to this message

From: Chris Huff
Subject: Re: Inverse colors
Date: 28 Nov 1999 09:35:26
Message: <281119990935319591%chrishuff_99@yahoo.com>
Just an idea, and something I haven't tested, have you tried transmit
instead of filter?

This sounds like something my transparency patch is designed for, I
should get back to work on that.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Bill DeWitt
Subject: Re: Inverse colors
Date: 28 Nov 1999 10:37:42
Message: <38414c46@news.povray.org>
"Chris Huff" <chr### [at] yahoocom> wrote :
>
> Just an idea, and something I haven't tested, have you tried transmit
> instead of filter?

    I did try a negative transmit, and various filters with various
transmits, to no avail. Unfortuantely negative transmit is just 'more of
zero transmit', not 'transmit a negative value'...8-(

> This sounds like something my transparency patch is designed for, I
> should get back to work on that.
>

    Seems like a perfect use for rgbt -1


Post a reply to this message

From: Rune
Subject: Re: Inverse colors
Date: 28 Nov 1999 10:58:53
Message: <3841513d@news.povray.org>
PoD wrote:
>Bill DeWitt wrote:
>>
>> I can't think of a way to make an object have the inverse color of the
>> objects behind it. Is there a way?
>>
>> I was thinking that it would be something like a filter that had a
negative
>> value, but that didn't work of course...
>
>pigment{ rgbf <1,1,1,-1> }
>finish{ ambient 0.5 }  // this value threw me
>
>Cheers, PoD.

Or like this:

pigment {rgb 0.5 filter -1}

Now you can use any finish.

finish {ambient 1 diffuse 0}
will make make the object exactly the opposite
color, thereby making it look like a 2d effect.

But the default
finish {ambient 0.1 diffuse 0.6}
will make it look solid, like the colors
behind the object is painted on the object!

Note though, that the ray must pass through an
odd number of surfaces. That means that it
doesn't work with most normal objects because
they have an even number of surfaces. You can
may have to use clipped_by or something else.

Greetings,

Rune

---
Updated November 19: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!


Post a reply to this message

From: Rune
Subject: Re: Inverse colors
Date: 28 Nov 1999 11:11:40
Message: <3841543c@news.povray.org>
Bill DeWitt wrote:
>"PoD" <pod### [at] merlinnetau> wrote :
>>
>> pigment{ rgbf <1,1,1,-1> }
>> finish{ ambient 0.5 }  // this value threw me
>>
>
>    That makes a nice raised look (I am using text) but not quite an
>inverse. What I want would be something that shows white over black ,black
>over white, purple over green, green over purple... so that rgb<1,1,0>
would
>be rgb<0,0,1> etc.

It does make a perfect inverse if the camera rays passes through an odd
number of surfaces with that texture. If it passes through a object like
sphere or text, the rays will pass through an even number of surfaces with
the texture, and the background will be reversed back to normal again.

Greetings,

Rune

---
Updated November 19: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!


Post a reply to this message

From: Bill DeWitt
Subject: Re: Inverse colors
Date: 28 Nov 1999 13:18:22
Message: <384171ee@news.povray.org>
"Rune" <run### [at] inamecom> wrote
>
> It does make a perfect inverse if the camera rays passes through an odd
> number of surfaces with that texture. If it passes through a object like
> sphere or text, the rays will pass through an even number of surfaces with
> the texture, and the background will be reversed back to normal again.
>

    That helps! But it still only seems to work on Black and White, or maybe
on the total value of the rgb content (I haven't finished testing). For
whatever reason, in front of red, green and blue it is just gray. It seems
to filter the inverse of the average value of RGB. I wonder if you can
divide up the filter to make it work on each part separately.

    Like: pigment { color red filter -1, color green filter -1, color blue
filter -1 } I will try it when this round of testing is done.

    BTW, Rune. Thank you for the work you put into the signature macro. I am
making something really nice out of it. I will show it in just a little
while.


Post a reply to this message

From: Bill DeWitt
Subject: Re: Inverse colors
Date: 28 Nov 1999 13:45:13
Message: <38417839@news.povray.org>
"Rune" <run### [at] inamecom> wrote :
>
> Or like this:
>
> pigment {rgb 0.5 filter -1}
>

I found that I had to use a much higher negative value and ambient 0  to get
the effect I wanted.
pigment { rgbf < 0.5, 0.5, 0.5, -5.0 > }

...doesn't make sense to me(if it was going to work,-1 should have done it),
but since it works I will use it. Thanks to all.


Post a reply to this message

From: Matt Giwer
Subject: Re: Inverse colors
Date: 29 Nov 1999 16:24:20
Message: <3842EF0F.B381443C@giwersworld.org>
Bill DeWitt wrote:
> 
> I can't think of a way to make an object have the inverse color of the
> objects behind it. Is there a way? 

	What does "behind" mean in 3D modeling? Or is that the problem?
Making all the objects do this regardless of point of view?


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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