POV-Ray : Newsgroups : povray.binaries.scene-files : Skylight include file : Re: Lighting system blunders Server Time
2 Sep 2024 04:12:48 EDT (-0400)
  Re: Lighting system blunders  
From: Philippe Debar
Date: 10 Dec 2002 15:37:20
Message: <3df65080@news.povray.org>
"Jaime Vives Piqueres" <jai### [at] ignoranciaorg> wrote in message
news:200### [at] ignoranciaorg...

> On Tue, 10 Dec 2002 10:55:58 +0100
> Philippe Debar <phd### [at] wanadoobe> wrote:
>
> > I made several mistakes...
>
>   Not really difficult if my code is involved...



You won't take away from the glory of my mistakes! They were my own! My own!
;-) ;-) ;-)

(More seriously: they were.)



> > Firstly, demo files D and E which should have shown how smoothly the
> > two include files work together (in my dreams) do not run. That is
> > because I used a beta-version of Jaime's lighting system and the file
> > structure is different from the released one. Drats.
>
>   I haven't noticed it because I have not traced the demos...:) Sorry,
> but I was just starting an outdoor scenes, I used Skylight for first
> time on it, rather than first trying the demos.



No problem. I usually act the same (then understand that I do not
understand, and then run and study the demos ;-)).





>   Well, I've tested this part and I've done my own modifications. It
> even helped to find some faulty asumptions I was doing with the color
> filter operations. Apart from this, I think you must not use at all
> anyhting in the place of lm, and let the intensity control of the sun
> to Skylight only.



You mean: I should not adjust the luminosity of the sky with your code, but
leave it wholly independent? I plan to have one day a "scientific" Y to
lumen conversion and hence have a real integration with your system. In the
meanwhile, I wanted the luminosity to be dependant both on Intensity_Mult
and on Exposure.



> Just like this:
>
> (((lct/REF_WHITE)+(<COLOR_FILTER.gray,COLOR_FILTER.gray,COLOR_FILTER.gr
> ay>-COLOR_FILTER))*EXPOSURE)
>
>   This way, if I set EXPOSURE to 1, REF_WHITE to <1,1,1> and
> COLOR_FILTER to <0,0,0>, the the resulting image is the same as if these
> variables where not declared, whih is the correct behavior, I think. It
> also works fine with the incoming version III, indeed.



It looks very logical. I'll think about it. If anybody test this, I'll be
happy to hear their thoughts.





>   And one more thing, you can forget about compatibility with version
> I, as it was just a mess.



I'll think about removing it. But I wanted to offer as much compatibility as
I could.





>   For the rest of the Skylight include, I must say that I'm really
> impresed. I have not tried even to understand the code,



It's not that complicated, really. It looks like it is, but it really is
mathematical formulas copied from the paper into SDL.



> but I see it is
> very nicely done and the results seem almost perfect in terms of
> colors.



Many thanks. But once again: the merit is Preetham's.




> Only two things annoy me:
>
>   1) The skydome texture is based on a luminous finish, with ambient,
> wich is perhaps not handy for lazy people like me, wich uses global
> ambient set to 0. I just have modified my copy to use "diffuse 1" and
> it works great.



Yes, it is because I designed it to use with radiosity, to get realistic
lighting.



Furthermore, with diffuse 0 ambient 1 (and no highlights) it looks the same
whatever the light sources in the scene are, which was my goal. With diffuse
1 (and I suppose ambient 0), it is dependant on the scene lighting. I did
not test it that way, so I had no idea the results would be good, but I am
really happy to learn it :-)



BTW, I forgot to include fiLuminous in #ifndef(...#end. That would have
allowed you to do the same without modifying the include file.


>   2) Both with low and high tesselation, I see on the skydome
> different "poligonal" zones, showing slighty different colors, but I
> can't figure what is causing it.



I bet it is diffuse 1, which makes the sky colors dependant on the lighting,
so the difference in orientation of the polygons shows. For the time being I
can think of no solution but leaving diffuse 0 and ambient 1 and play with
Intensity_Mult to get the luminosity you seek. I may try to add normals to
the mesh to reduce this problem.



> Will test it further, as I'm taking the
> rest of the day free... :)



Lucky you ;-) Enjoy your day off!





>   Again: great work, Phillipe!



Many thanks!





Povingly,





Philippe


Post a reply to this message

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