|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I was wondering if there is a way of producing blur effects on a pigment
(procedural or image map). I have been playing with the turbulence warp
and got close results using the code below with image maps.
warp{
turbulence <0.5,0.5,0.5>*0.005
octaves 6
omega 1.5
lambda 50
}
Unfortunately it requires quite a strong anti-aliasing setting for
acceptable results. It works better if colors are not too dissimilar. I
know that for image maps I can take it into a graphics editor and blur
the image but I would like to know if there is a proven method of
blurring pigments that can be done within POV-Ray. Specially if the
pigment is procedural.
Other variations of the warp above are useful for weathering effects on
pigments.
later,
FlyerX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
>
And here is the average with some Gaussian blurring
material{
texture{
pigment{
average pigment_map{
#declare r=seed(0);
#declare n=100; //number of samples (gets slow above 10)
#declare sigma=0.015;//as a fraction of 1.0
#declare max_blur_amount=sigma*3;//spread only 3sigmas out
#declare c=0;
#while (c<n) //loop n times
#declare dist=<rand(r),rand(r),rand(r)>*max_blur_amount;
#declare
gauss=(1/2/pi/pow(sigma,2))*exp(-(pow(dist.x,2)+pow(dist.y,2)+pow(dist.z,2))/(2*pow(sigma,2)));
[gauss image_map{sys "90.bmp" interpolate 2 } translate dist]
#declare c=c+1;
#end
}
}
}
}
later,
FlyerX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
That's what I do. I average a 2x2 to 8x8 copy of the pigment, depending
on the requirements of the image. For some projects I've made a blurred
image from the regular image and used that as the pigment.
I've also experimented with setting the anti-aliasing level to 4x4
samples per pixel, a threshold of zero, and jitter set to one. This
takes a bit of time (but not too much), and allows certain other
settings (such as area lights) to be set to lower levels and still
achieve the same quality.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
FlyerX wrote:
> Very good idea, thanks. It actually works. I did not think about
> average. Here is a simple code I typed for this
You welcome. And thanks for the examples I copied them and put them in
my snipit file.
Have fun!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |