[Radiance-general] illum-like behaviour for sky dome

Greg Ward gregoryjward at gmail.com
Mon May 24 09:46:32 PDT 2010


Hi Axel,

Your sky is probably twice as bright because without turning on direct  
jittering, all ray samples will be taken from the zenith, neglecting  
to integrate the cosine factor.  You can try again with -dj 1, but I  
don't think you'll like the noisy results.

A better approach is to remove the significant low frequencies from  
your sky, replacing them with the desired gensky or gendaylit  
distribution.  See the following entry in a thread from a couple years  
ago:

	http://www.radiance-online.org/pipermail/radiance-general/2008-May/005046.html

Christopher's suggestion is also a good one.  You can save the depth  
buffer using the -z option, convert it to an image, then use pcomb to  
select for depths greater than 1e9 as the sky, like so:

	rpict ... -x 1024 -y 768 -pa 0 -pj 0 -vf view1.vf -z view1.zbf  
scene.oct > view1.hdr
	rpict ... -x 1024 -y 768 -pa 0 -pj 0 -vf view1.vf sky_only.oct >  
view1sky.hdr
	pvalue -r -h -y 768 +x 1024 -df view1.zbf | pcomb -e  
'sel=if(gi(3)-1e9,2,1)' \
			-e 'ro=ri(sel);go=gi(sel);bo=bi(sel)' view1.hdr view1sky.hdr - \
			| pfilt -1 -r .6 -x /3 -y /3 > filtered.hdr

The sky_only.oct contains the nice, captured sky you wish to  
reproduce.  The final pfilt improves the appearance substantially.   
The -pj 0 turns off the usual pixel jittering, which can lead to some  
aliasing but is necessary to get exact pixel correspondence between  
renderings.  I'm sure you can figure out the rest, fixing any mistakes  
I made above.

Cheers,
-Greg

> From: Axel Jacobs <jacobs.axel at gmail.com>
> Date: May 23, 2010 2:51:52 PM PDT
>
> Dear list,
>
> I have a brightfunc applied to the glow of the sky dome. I would  
> like this pattern to be visible to the camera, but use a normal  
> gensky generated sky for all sample rays.
>
> Conceptually, this is similar to the illum type where a different  
> material is applied when the object (the sky in my case) is viewed  
> directly.
>
> I did try with illum:
>
> skyfunc glow skyglow
> 0
> 0
> 4  1 1 1  0
>
> skyglow brightfunc bracelet
> 2 band bracelet.cal
> 0
> 0
>
> skyfunc illum skymat
> 1 bracelet
> 0
> 3  1 1 1
>
> skymat source sky
> 0
> 0
> 4  0 0 1  180
>
> This works, but results in about twice the horizontal illuminance  
> compared to a normal glow sky. The sky now takes part in the direct  
> calculation (this works with -ab 0), and all light expectedly  
> emenates from the zenith. So using illum is not an option.
>
> Many thanks for your ideas
>
> Axel



More information about the Radiance-general mailing list