POV-Ray : Newsgroups : povray.general : Light Diffusion : Re: Light Diffusion Server Time
30 Jul 2024 18:10:14 EDT (-0400)
  Re: Light Diffusion  
From: CShake
Date: 22 Feb 2009 00:58:04
Message: <49a0e96c$1@news.povray.org>
Alain wrote:
> You can...
> - add area_light to your spot_light. This will make the shadows it cast 
> blury.
> - using photons and your filter, average a few normals. Keep the normals 
> small.
> 
> Sample of the averaged normals:
> 
> cylinder{z, z+0.01, Radius pigment{rgbt 1}
>     #local Smpl = 5; #local R = seed(0);
>     normal{average normal_map{
>         #while(Smpl >0)
>         [1 bumps 0.1 scale 0.01 translate<rand(R),rand(R),rand(R)>*0.01]
>         #local Smpl = Smpl -1;
>         #end
>             }
>         }
>     interior{ior 1.5}
>     photons{target refraction on}
>     }
> 
> The value of "Smpl" controlls the smoothness of the bluring. Don't use a 
> large value, as it affect the rays on two surfaces, and squares the 
> number of samples.
> The value after bumps controlls the bluring's intensity.
> 
> 

The averaged normals idea seems to work fairly well, thanks!

When I place the filter close to the light source (so the projected 
light is a large radius) it requires a ridiculous amount of photons to 
look anywhere near smooth, but such is the price of the effect it seems.

I notice that I can't use any filtering objects between the light source 
and the diffuser without using pass_through, in which case the filtering 
effect is completely ignored. Is there a way to fix that? I'm using a 
simple image_map filter to effectively make an image projector, and if I 
use pass_through, it's gone, and if I don't the diffuser cylinder just 
makes a black shadow. Is this just something I have to live with?

Thanks again for the normals idea though!


Post a reply to this message

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