POV-Ray : Newsgroups : povray.binaries.images : POV-Script Pixel-Post-Processing (WIP) Server Time
12 Aug 2024 21:25:19 EDT (-0400)
  POV-Script Pixel-Post-Processing (WIP) (Message 1 to 2 of 2)  
From: Tim Nikias v2 0
Subject: POV-Script Pixel-Post-Processing (WIP)
Date: 12 Jun 2003 05:33:51
Message: <3ee848ff@news.povray.org>
I've scripted a little program which places
tons and thousands of triangles in front of
the camera, effectively placing a set of triangles
in front of each pixel (if the triangles are set
to that resolution).

Anyways. What I currently do is take the color
information I gather from trace()-ing the objects
and calculating the resulting specular highlights,
and then place the color as a transparent rectangle
across a single pixel. I've got a crude method of
calculating how much the pixel has to be transparent
to get a similiar results, still, my calculations seem
somewhat more washed and smoother than what
POV-Ray calculates.

Here's the description on what I coded:

1. I calculate the Specular intensity like POV-Ray does, but
without the color component.
2. If the intensity is above 0, I add the color of the object to
an internal color-declaration. I also count the amount of
highlights added to a certain pixel, and add the intensities
for each pixel.
3. I normalize the color and multiply it with 1.85 (which is
slightly larger than sqrt(3), which is the length of <1,1,1>, pure
white)
4. I calculate the transparency of the pixel as follows:
pow(1-_Affect_T/_Affect_Counter,3);
Where _Affect_T is intensities and Affect_Counter is amount
of highlights at that pixel.
5. I put everything into rgbt and use that as pigment for the
pixel-quad.

The results are seen below: My calculated version is a little different,
in that it covers a slightly larger region and has a lesser degree of
"gradient" when moving from bright white highlight to the rim of the
highlight. Mine is much smoother in that regard than POV-Ray's.
Any suggestion on how to properly match it?

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde


Post a reply to this message


Attachments:
Download 'pixel320_without.jpg' (21 KB) Download 'pixel320_PPP.jpg' (21 KB)

Preview of image 'pixel320_without.jpg'
pixel320_without.jpg

Preview of image 'pixel320_PPP.jpg'
pixel320_PPP.jpg


 

From: Tim Nikias v2 0
Subject: Re: POV-Script Pixel-Post-Processing (WIP)
Date: 12 Jun 2003 06:47:45
Message: <3ee85a51$1@news.povray.org>
Okay, I've got to admit that it's getting
too complicated, at least for the effect. Trying
to implement the entire specular highlighting
effect this way is way overkill, I mean, POV-Ray
can do that by itself. So I'll focus on "blinding
effects" and leave the entire specular highlighting
stuff out...


-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> I've scripted a little program which places
> tons and thousands of triangles in front of
> the camera, effectively placing a set of triangles
> in front of each pixel (if the triangles are set
> to that resolution).
>
> Anyways. What I currently do is take the color
> information I gather from trace()-ing the objects
> and calculating the resulting specular highlights,
> and then place the color as a transparent rectangle
> across a single pixel. I've got a crude method of
> calculating how much the pixel has to be transparent
> to get a similiar results, still, my calculations seem
> somewhat more washed and smoother than what
> POV-Ray calculates.
>
> Here's the description on what I coded:
>
> 1. I calculate the Specular intensity like POV-Ray does, but
> without the color component.
> 2. If the intensity is above 0, I add the color of the object to
> an internal color-declaration. I also count the amount of
> highlights added to a certain pixel, and add the intensities
> for each pixel.
> 3. I normalize the color and multiply it with 1.85 (which is
> slightly larger than sqrt(3), which is the length of <1,1,1>, pure
> white)
> 4. I calculate the transparency of the pixel as follows:
> pow(1-_Affect_T/_Affect_Counter,3);
> Where _Affect_T is intensities and Affect_Counter is amount
> of highlights at that pixel.
> 5. I put everything into rgbt and use that as pigment for the
> pixel-quad.
>
> The results are seen below: My calculated version is a little different,
> in that it covers a slightly larger region and has a lesser degree of
> "gradient" when moving from bright white highlight to the rim of the
> highlight. Mine is much smoother in that regard than POV-Ray's.
> Any suggestion on how to properly match it?
>
> -- 
> Tim Nikias v2.0
> Homepage: http://www.digitaltwilight.de/no_lights
> Email: Tim### [at] gmxde
>
>
>


Post a reply to this message

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