![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi all:
I finally managed to finish a beta version of my lighting macros. The
whole thing is a bit complicated to explain, specially because I'm not a
scientist nor a light engineer.
The main purpose is to automate the use of artificial light sources on
POV-Ray scenes. I collected some real luminaries data, and tried to combine
it all in a sort of "system" trough the use of several macros and
predefined constants.
Do not expect anything "phisically correct", tough: it's only my usual
"muddling along" style. Surely many of my asumptions and understandings are
wrong, but the "system" seems to obtain decent results when compared with
actual photographs of the same lighting and film conditions.
Here are the include files, a test scene and a readme. I've setup also a
web page for it, which is basically the readme file plus some example
images:
http://www.ignorancia.org/lightsys
*ANY* comments welcome...
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
Attachments:
Download 'us-ascii' (6 KB)
Download 'us-ascii' (3 KB)
Download 'us-ascii' (2 KB)
Download 'us-ascii' (3 KB)
Download 'us-ascii' (7 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
fade_distance sqrt(area) for diffuse sources. Verified with the
cornell scene and by testing against true ambient source. I didn't
test omnidirectional source because the only difference is the
projected area.
_____________
Kari Kivisalo
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kari Kivisalo wrote:
> fade_distance sqrt(area) for diffuse sources.
> Verified with the cornell scene
Hmmm... regardless of the light intensity or the scene scale? I'm not
sure there is a value or fomula that can be seen as "definive". I can
obtain exactly the same results on your cornell scene with very different
settings for fade_distance and light color.
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jaime Vives Piqueres wrote:
>
> Hmmm... regardless of the light intensity or the scene scale? I'm not
> sure there is a value or fomula that can be seen as "definive".
There is but it's not sqrt(area), it's sqrt(sqrt(area)) or sqrt(diameter)
in case of square source. I calculated this some time ago but mixed
variables :)
fade_distance is the only way to specify the physical dimension of the
source for intensity calculations. I integrated in matlab 2601 point sources
over a 25x25 square and calculated the relative error to fade_distance 1
and fade_distance 5. It turned out that fade_distance sqrt(sqrt(area))
best matches the integrated axial intensity. Division by sqrt(area)
normalises the equation so it can be compared.
http://www.pp.htv.fi/kkivisal/relative_error.gif
In far field (5xdiameter) all the formulas converge to 1/d^2 unless
fade_distance is really big or small compared to source dimensions.
_____________
Kari Kivisalo
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kari Kivisalo wrote:
>There is but it's not sqrt(area), it's sqrt(sqrt(area)) or sqrt(diameter)
>in case of square source.
> fade_distance is the only way to specify the physical dimension of the
> source for intensity calculations.
I insist: for which light color? Because it all depends on the color you
give to the light_source.When I read the definition of fade_distance from
the POV manual, I deduce it can be done equally with the color. Then, take
for example your cornell box scene, and change these light source values:
color LightColor*7
fade_distance (DX+DZ)/2
with these other:
color LightColor*7*pow((DX+DZ)/2,2)
fade_distance 1
and you will see they give the same scene! So, what this means?
> http://www.pp.htv.fi/kkivisal/relative_error.gif
Sorry, I'm not that mathematically minded: I do not see what the graphic
is suposed to show... :( I really prefer to test things with pov! :)
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Jaime,
Just followed the link to your site.. saw that you had said that your BOLTS
picture was inspired by Andrew Harron. Did you mean me, as my name is Andrew
Cocker, or were you referring to the author of the original BRAZIL bolts
render? Just curious :-)
Thanks for the lighting macros.. just going to give them a try now.
All the best,
Andrew Cocker
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jaime Vives Piqueres wrote:
> color LightColor*7*pow((DX+DZ)/2,2)
> fade_distance 1
>
> and you will see they give the same scene!'
Now scale the whole scene by 0.00001 and keep fade_distance 1 :)
Use one source.
> So, what this means?
It means the the difference in in the far field is not visible. Even
for X and sqrt(X) :)
> > http://www.pp.htv.fi/kkivisal/relative_error.gif
>
> Sorry, I'm not that mathematically minded: I do not see what the graphic
> is suposed to show... :( I really prefer to test things with pov! :)
It's the relative error of axial intensity between distances 1-25, when using
fade_distance 1 and fade_distance 5 to estimate 25x25 square source. Just to
demonstrate fade_distance 1 produces higher error. The error decreases with
distance so in the far field the error becomes insignificant for both cases.
The blue curve is fade_distance 1.
The equation used in pov clearly tries to estimate the combined axial near
field of multiple point sources on planar surface. fade_distance tells the
size of the source.
_____________
Kari Kivisalo
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kari Kivisalo wrote:
> Jaime Vives Piqueres wrote:
>> color LightColor*7*pow((DX+DZ)/2,2)
>> fade_distance 1
>>
>> and you will see they give the same scene!'
>
> Now scale the whole scene by 0.00001 and keep fade_distance 1 :)
> Use one source.
Hmmm... now I see it! I used a variable to scale down the entire scene
at will (including light color), and tested both methods. I found that
"fade_distance 1" and "sqrt(sqrt(area))" give the same results for anything
above 1, and both are constant (they give the same light at any scale above
1). For scales smaller than fade_distance, both start to give wrong
results: with "fade_distance 1" light loses more and more intensity, while
"sqrt(sqrt(area))" behaves the contrary, but not so hardly.
Then, can this means the POV attenuation formula is not really
appropriated for values bellow 1? Anyhow, as I assumed a scale of 1 unit =
1 cm for my macro, this not really important: any of both methods works
fine.
But in the meanwhile, I found that srqt(sqrt(area)) permits a more
intuitive use of my MAX_LUMENS variable, so I will use it with your
permision. :)
> The equation used in pov clearly tries to estimate the combined axial near
> field of multiple point sources on planar surface. fade_distance tells the
> size of the source.
Hmmm... then this is why it is different from the typical inverse square
law for point sources? This will be very helpful on the official docs. The
current explanation is somewhat "difficult to understand" for mere mortals.
Thanks for your explanations, Kari: fade_distance was the more intriguing
part of light_sources for me.
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Andrew :
> Just followed the link to your site.. saw that you had said that your
> BOLTS picture was inspired by Andrew Harron. Did you mean me, as my name
> is Andrew Cocker, or were you referring to the author of the original
> BRAZIL bolts render? Just curious :-)
Well, I put this only to avoid any "plagiarism" claims by the author of
the reference image. And really, I started to do it when you posted the
original image: then I visited utzweb.com (I had problems to read it from
the image corner!) and seen the full size image, so it can be considered
that way.
Actually, you acted more as "instigator", which is perhaps a more
important role... ;)
P.S.: Indeed, you haven't tell us the original image was postprocesed! :)
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Jaime Vives Piqueres" <jai### [at] ignorancia org> wrote in message
news:3c600962@news.povray.org...
> P.S.: Indeed, you haven't tell us the original image was postprocesed!
:)
Yes, I did. See my original 'Bolts' post.
Andy
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |