POV-Ray : Newsgroups : povray.general : Actual Specular calculations? : Re: Actual Specular calculations? Server Time
4 Aug 2024 08:24:38 EDT (-0400)
  Re: Actual Specular calculations?  
From: Christopher James Huff
Date: 11 Jun 2003 17:06:05
Message: <cjameshuff-118730.15574211062003@netplex.aussie.org>
In article <3ee75484@news.povray.org>,
 "Tim Nikias v2.0" <tim### [at] gmxde> wrote:

> I've looked around in the docs, but can't find any
> reference to the actual formulae used to derive
> the specular effect when using the specular-finish
> along with roughness, so perhaps someone might
> jump in and explain it to me?

This is documented in the function do_specular() in lighting.cpp.


> What I'm trying to do (in order to clear up what exactly
> I want to know):
> Shoot a ray at an object, and from that point shoot
> rays to the different light-sources to check for specular
> highlights from them (just the way a raytracer does). Now
> I know that at certain angles, the highlight is generated,
> but I'd like to know the exact angles etc for my pixel-
> post-processing script. I don't want to simulate the
> raytracing process with that script, but to gather information
> on where highlights are occuring, in order to bleed the
> bright light across the objects boundaries, just like it
> happens in the human eye (or probably any eye, for
> that matter).

Well, the highlight isn't a point, it practically covers every point on 
the object is not in shadow, and could have multiple relative maxima and 
non-point maxima. For example, the points of maximum intensity on a 
torus can be a ring. This approach is pretty much a dead-end.

In any case, this happens because of the brightness, not because of 
anything special to highlights. What you want sounds somewhat similar to 
the old MegaPOV glow post-process filter, which operated by combining a 
slightly blurred version of the image with the unblurred version. High 
brightness areas bleed more, giving them a glowing look. If you are 
trying to implement this in POV script instead of a patch, you will need 
to use the HDR patch to avoid clipping the values.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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