POV-Ray : Newsgroups : povray.unofficial.patches : post_process suggestions? Server Time
2 Sep 2024 12:14:43 EDT (-0400)
  post_process suggestions? (Message 39 to 48 of 58)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Chris Huff
Subject: Re: post_process suggestions?
Date: 3 May 2000 08:20:00
Message: <chrishuff_99-02576D.07231003052000@news.povray.org>
In article <390fca4b$1@news.povray.org>, "Mark Wagner" 
<mar### [at] gtenet> wrote:

> You might want to take a look at the source code for the GIMP.  It has
> filters for all of these, except (I think) solarize.

Hmm, ok. I would really prefer algorithms to source code, but that could 
be useful. Any links?

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Ron Parker
Subject: Re: post_process suggestions?
Date: 3 May 2000 10:20:18
Message: <slrn8h0e6f.8ll.ron.parker@linux.parkerr.fwi.com>
On Wed, 03 May 2000 06:06:05 -0400, Glen Berry wrote:
>>This is a matrix function, as long as you do it along one of the eight
>>multiples of 45 degrees.  For the usual "light in the upper left corner"
>>effect, I believe the operation is
>>  
>> -1 0 0
>>  0 1 0   * .5 + .5
>>  0 0 0 
>
>The numbers in the matrix above are correct. I'm not sure about the
>multiplier and offset modifiers. For me, a vaue of one for the
>multiplier works, and the offset value should be set to one-half of
>the maximum possible value. I just tested these, and they work.

A multiplier of 1 can cause clipping at the ends of the range.  The
two worst-case values of the matrix are -1 (when the upper-left pixel
is white and the center is black) and 1 (vice-versa.)  To get this range
into the 0..1 range requires multiplying by .5 and adding .5, as I did.

If you neglect to multiply by .5, you increase the contrast of the 
resulting image, but at the expense of "washing out" areas with high
gradients.  A better way to increase contrast would be to apply the
filter as I've specified it, then apply an S-curve-shaped correction
to stretch the midrange.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
These are my opinions.  I do NOT speak for the POV-Team.


Post a reply to this message

From: Ron Parker
Subject: Re: post_process suggestions?
Date: 3 May 2000 10:22:56
Message: <slrn8h0ebe.8ll.ron.parker@linux.parkerr.fwi.com>
On Wed, 03 May 2000 06:56:52 -0400, Glen Berry wrote:
> Modern films don't exhibit this effect.

But some digital cameras seem to, oddly enough.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
These are my opinions.  I do NOT speak for the POV-Team.


Post a reply to this message

From: Ron Parker
Subject: Re: post_process suggestions?
Date: 3 May 2000 10:26:58
Message: <slrn8h0eiv.8ll.ron.parker@linux.parkerr.fwi.com>
On Wed, 03 May 2000 06:56:52 -0400, Glen Berry wrote:
>On Tue, 02 May 2000 20:48:21 -0500, Chris Huff
><chr### [at] yahoocom> wrote:
>
>>Stuff I don't even know the use for, let alone how to implement. Could 
>>anyone tell me what these are for?
>
>>posterize
>
>As Ron Parker described, classic posterization is simply reducing the
>color depth to a relatively small number, without using any dithering
>to hide the banding. I don't believe that one has to perform this in
>two passes, however. Simply divide the range between minimum allowable
>value (0), and maximum allowable value for a color into a few discrete
>ranges.

Most of the posterization filters I've seen seem to try to optimize the 
colors that are actually used for the image in which they're used. 
This differs significantly from just chopping off the low-order bits.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
These are my opinions.  I do NOT speak for the POV-Team.


Post a reply to this message

From: Glen Berry
Subject: Re: post_process suggestions?
Date: 3 May 2000 17:05:22
Message: <KZMQOYBIgEth1Z=EeP+KuFA7TPUQ@4ax.com>
On 3 May 2000 10:26:58 -0400, ron### [at] povrayorg (Ron Parker)
wrote:

>Most of the posterization filters I've seen seem to try to optimize the 
>colors that are actually used for the image in which they're used. 
>This differs significantly from just chopping off the low-order bits.

When I speak of "classic posterization" I am referring to it in its
original form - photographic film. There are a great many variations
that can be made in the process, but I tried to describe the most
basic and straightforward example I could. 

I don't really know the most common way it is implemented digitally,
but since they are imitating an old film-based process, I thought it
would be good to describe it from that viewpoint. It seemed better to
copy the technique "from the source" (film), than to simply copy from
the imitators (digital).

Later,
Glen Berry

( Remove the "7" from 7no### [at] ezwvcom to email me. )


Post a reply to this message

From: Glen Berry
Subject: Re: post_process suggestions?
Date: 3 May 2000 17:36:52
Message: <7pYQOQdz3VwIq87b5HeLIG04BLgf@4ax.com>
On Wed, 03 May 2000 07:21:59 -0500, Chris Huff
<chr### [at] yahoocom> wrote:

>This is exactly what is done with my "steps" filter. I multiply the 
>float colors by a certain amount, convert to integer, and then scale 
>back to the original color range. And it is already per-channel, you can 
>have different numbers of steps for each channel.

I had thought that your steps filter might be the same as
posterization, but I was having a little trouble getting your patch to
work reliably at first, and couldn't confirm it right away. Thanks to
you and Nathan, I think I have everything in order now.

I just rendered the steps demo, and it does indeed perform a posterize
function, which brings me to something that I wanted to tell you the
moment I first saw that demo file. Since "steps" is really
"posterize", could I talk you into renaming it "posterize"? I have
three reasons for you to consider renaming it.

First, this has been the traditional name for this effect for several
years. Keeping with tradition avoids confusion and unnecessary
fragmentation of the language. It also simply feels more "correct" to
use the established word, at least to me.

Second, the word "steps" is more likely to appear in someone's POV
file as a variable name or something. Think of while loops, for
example. It would be easy to imagine someone wanting to have a
variable named "steps" to control incrementation of a loop. I can also
imagine someone rendering architecture and wanting to #declare a CSG
construction of a staircase and name it "steps."  How likely is it
that someone would ever use the word "posterize" in a POV script? I
suggest we take the less common word "posterize" and make it a
reserved word, instead of the much more common word "steps." This will
have much less of a potential limiting factor in choosing variable
names.

Third, at the moment there are probably only a very few people playing
with this filter, or even this patch for that matter. Renaming it now
wouldn't have a big impact on "existing scenes" because there would
probably only be a handful of those at the moment. I think that most
people would consider a patch only available in source form as being
"experimental," and wouldn't mind the change.

Thanks,
Glen Berry

( Remove the "7" from 7no### [at] ezwvcom to email me. )


Post a reply to this message

From: Peter Popov
Subject: Re: post_process suggestions?
Date: 3 May 2000 17:45:52
Message: <ie71hscr585hiohhurfjkp8bq9pe1ppnt5@4ax.com>
On Wed, 03 May 2000 07:23:10 -0500, Chris Huff
<chr### [at] yahoocom> wrote:

>Hmm, ok. I would really prefer algorithms to source code, but that [GIMP]
>could be useful. Any links?

www.gimp.org?


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Chris Huff
Subject: Re: post_process suggestions?
Date: 3 May 2000 18:59:00
Message: <chrishuff_99-AB4F00.18021003052000@news.povray.org>
In article <7pYQOQdz3VwIq87b5HeLIG04BLgf@4ax.com>, Glen Berry 
<7no### [at] ezwvcom> wrote:

> I just rendered the steps demo, and it does indeed perform a posterize
> function, which brings me to something that I wanted to tell you the
> moment I first saw that demo file. Since "steps" is really
> "posterize", could I talk you into renaming it "posterize"? I have
> three reasons for you to consider renaming it.

It would probably be a good idea, since it hasn't even been released in 
MegaPOV yet. The reason I didn't name it "posterize" was that I had no 
idea what "posterize" meant, but I thought it might be a useful feature. 
:-)


> First, this has been the traditional name for this effect for several
> years. Keeping with tradition avoids confusion and unnecessary
> fragmentation of the language. It also simply feels more "correct" to
> use the established word, at least to me.

Well, "steps" seems a lot less confusing than "posterize", but only 
because I didn't know anything about "posterize".


> Second, the word "steps" is more likely to appear in someone's POV
> file as a variable name or something.
...

This I don't really agree with, since you should always use at least one 
upper-case letter in your variable name to prevent exactly this problem. 
Not really a limiting factor.
Besides, "steps" is already a reserved word, used in photon mapping, not 
a new one. :-)


> Third, at the moment there are probably only a very few people playing
> with this filter, or even this patch for that matter. Renaming it now
> wouldn't have a big impact on "existing scenes" because there would
> probably only be a handful of those at the moment. I think that most
> people would consider a patch only available in source form as being
> "experimental," and wouldn't mind the change.

I doubt there is anyone at all using this patch in an actual scene at 
this time...and MegaPOV 0.5 hasn't even been released, so it is 
definitely a good idea to change it before the release.
I have done it in my personal version already.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Chris Huff
Subject: Re: post_process suggestions?
Date: 3 May 2000 19:01:14
Message: <chrishuff_99-B6FE85.18042503052000@news.povray.org>
In article <KZMQOYBIgEth1Z=EeP+KuFA7TPUQ@4ax.com>, Glen Berry 
<7no### [at] ezwvcom> wrote:

> I don't really know the most common way it is implemented digitally,
> but since they are imitating an old film-based process, I thought it
> would be good to describe it from that viewpoint. It seemed better to
> copy the technique "from the source" (film), than to simply copy from
> the imitators (digital).

Well, could you give me some information on the film-based process? My 
current patch is probably no closer to the film process than any other 
filter.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Chris Huff
Subject: Re: post_process suggestions?
Date: 3 May 2000 19:02:13
Message: <chrishuff_99-4278CC.18052403052000@news.povray.org>
In article <slr### [at] linuxparkerrfwicom>, 
ron### [at] povrayorg wrote:

> Most of the posterization filters I've seen seem to try to optimize the 
> colors that are actually used for the image in which they're used. 
> This differs significantly from just chopping off the low-order bits.

Could you give me some information on how this is done?

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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