POV-Ray : Newsgroups : povray.general : Blur modifier : Re: Blur modifier Server Time
31 Jul 2024 04:27:23 EDT (-0400)
  Re: Blur modifier  
From: FlyerX
Date: 24 Nov 2007 01:08:05
Message: <4747bfc5@news.povray.org>
Leroy wrote:
> Couldn't you use the average of a pigment with its copy slightly moved?
> Come to think of it, you could use any number of copies all moved 
> differently.
> 
Very good idea, thanks. It actually works. I did not think about 
average. Here is a simple code I typed for this

material{
texture{
         pigment{
         average pigment_map{
	#declare r=seed(0);
	#declare max_blur_amount=0.05; //as a fraction of 1.0
	#declare n=50; //number of samples
	#declare c=0;
	#while (c<n) //loop n times
		[1.0 image_map{sys "90.bmp" interpolate 2}
		translate<rand(r),rand(r),rand(r)>*max_blur_amount]
	#declare c=c+1;
	#end
	}
         }
}}

I hope I can put it as a macro so I can call it as a special pigment.

thanks again,

FlyerX


Post a reply to this message

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