|
|
My light dome's not adaptive like that. I sample each light from an average
of 20 points on the dome to get less aliasing, but for the light positions I
just messed with some formulae until I got a nice even distribution of
lights over the dome (I couldn't be bothered coding a geodisic dome light
placement). My formula for spreading lights over a sphere is:
#declare invpow = function(x,p) {
select(x,-1+pow(1-abs(x),p),1-pow(1-abs(x),p)) }
#while (i < num_lights)
#local j=(i+.5)/num_lights;
#local dir =
vrotate(z,<invpow(j*2-1,.5)*90,invpow(j*2-1,.5)*sqrt(num_lights)*180,0>);
...place light...
#local i=i+1;
#end
To be honest I don't know why it gives such a good distribution, I found it
by trial and error, I have a knack for messing with pow() functions until I
get something that looks right!
Your weighted sampling technique sounds good, I assume you use bigger area
lights if they're representing a region with less lights in (if you see what
I mean). My area lights are setup so I can specify an angular size for them,
which matches the region I'm sampling on the dome, the angular size was
chosen using a simple sun-dial test scene adjusted until the distinct
shadows overlapped enough that they looked like 1 smooth shadow.
--
Tek
http://evilsuperbrain.com
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
news:web.461d485ac3e2923bc150d4c10@news.povray.org...
> First, thanks to the link to the HDRs, more to add to my collection! (you
> can never hav enough in my opinion...)
>
> Second, looks pretty good. Are you using any kind of weighted sampling?
> A
> good weighting technique can reduce the number of lights needed to get
> good
> results. I have been working on a lightdome macro that creates
> environment
> lighting from HDRs for quite some time now (not quite made it public, a
> few
> more tweaks maybe). Within the last month or so of development, I added
> area light support and found it worked out quite nicely. With point
> lights, I was using about 256 (2^8) light sources with pretty good
> results,
> but still had some artifacting visible depending on the probe used. With
> area lights, I found I could get similar results, but with less
> artifacting
> with as little as 32 (2^5) 3x3 area lights.
>
> I would like to see your scene perhaps to see how my lighting macro
> performs.
>
> If you need any further information on this, I'll see what I can do (I've
> been quite busy at non-POV lately, so have been here less frequently
> recently).
>
> I still hope to release my lighting macro at some point, I just have to
> convince myself that I'm satisfied with its operation.
>
> -tgq
>
>
Post a reply to this message
|
|