![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I've been playing around with the blurred pattern patch in MegaPOV MCP.
The blur types available suffer from a "stepping" effect, they produce a
"stairstep" blend instead of a smooth "ramp" blend. This can be made
almost invisible with enough samples, but can easily get too slow, and
may cause problems when used with isosurfaces.
This is the result of my first experiment in trying to get a completely
smooth blur effect for patterns, without using too many samples. It is
implemented as an additional blur type, and works by making samples in a
grid relative to the origin instead of the evaluation point, then
interpolating them. In other words, it creates a small voxel map and
interpolates the voxel data to get a smoothly varying value.
Currently, it only uses a 2*2*2 voxel map, meaning 8 samples total, but
I plan on extending it to allow more, which should even out the
"lumpiness" (which was intentionally exaggerated in this image for
testing, and seems to be amplified by the JPEG compression, but is still
noticeable with smaller amounts of blur). Um, any information on
different types of image interpolation would be welcome. ;-)
Another nice thing about this method: it should be posible to cache the
voxel data between calls to the pattern. This could speed things up even
further.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
Attachments:
Download 'blur2.jpeg.jpg' (24 KB)
Preview of image 'blur2.jpeg.jpg'
![blur2.jpeg.jpg](/povray.binaries.images/attachment/%3Cchrishuff-DB4B16.12234405032001%40news.povray.org%3E/blur2.jpeg.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Smoothly Blurred Patterns - blur2.jpeg (1/1)
Date: 5 Mar 2001 12:39:57
Message: <3AA3CF6E.1DD3F8DD@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff wrote:
> [...]
> This is the result of my first experiment in trying to get a completely
> smooth blur effect for patterns, without using too many samples. It is
> implemented as an additional blur type, and works by making samples in a
> grid relative to the origin instead of the evaluation point, then
> interpolating them. In other words, it creates a small voxel map and
> interpolates the voxel data to get a smoothly varying value.
> Currently, it only uses a 2*2*2 voxel map, meaning 8 samples total, but
> I plan on extending it to allow more, which should even out the
> "lumpiness" (which was intentionally exaggerated in this image for
> testing, and seems to be amplified by the JPEG compression, but is still
> noticeable with smaller amounts of blur). Um, any information on
> different types of image interpolation would be welcome. ;-)
I must be quite dumb today, but i don't really get how it works. Maybe
just send the code to enlighten me.
Does it perhaps only work on repetitive patterns?
>
> Another nice thing about this method: it should be posible to cache the
> voxel data between calls to the pattern. This could speed things up even
> further.
>
That's also one thing i thought about when planning adaptive sampling. I
planned subdividing a 3d grid and stopping when differences are below a
certain threshold value.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3AA3CF6E.1DD3F8DD@gmx.de>, Christoph Hormann
<chr### [at] gmx de> wrote:
> I must be quite dumb today, but i don't really get how it works.
One way to look at it is this: it divides the world up into cubes, which
are aligned with the origin. The evaluation point only affects which
cube is chosen, the cube is not centered around the evaluation point. To
get the final result, the values of the corners of the cube are weighted
according to their distance from the evaluation point, and added
together.
> Maybe just send the code to enlighten me.
Not yet...I want to clean it up a bit first, and maybe get it to be a
bit more functional (a user specifiable number of samples, for one
thing).
> Does it perhaps only work on repetitive patterns?
It works on any pattern.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Smoothly Blurred Patterns - blur2.jpeg (1/1)
Date: 5 Mar 2001 13:03:13
Message: <3AA3D4E2.A405A713@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff wrote:
>
> One way to look at it is this: it divides the world up into cubes, which
> are aligned with the origin. The evaluation point only affects which
> cube is chosen, the cube is not centered around the evaluation point. To
> get the final result, the values of the corners of the cube are weighted
> according to their distance from the evaluation point, and added
> together.
>
I think i understand...
but that probably could lead to strange results when the cube structure
interferes with the pattern.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3AA3D4E2.A405A713@gmx.de>, Christoph Hormann
<chr### [at] gmx de> wrote:
> but that probably could lead to strange results when the cube structure
> interferes with the pattern.
When the blur distance is larger than the size of the cubes, it doesn't
blend to a 50-50 mixture of the colors, but gives a bunch of fuzzy
squares that are larger than the actual pattern. I'm planning a type 3
that will supersample the voxels before interpolating, which will give
better results. This will be a true blurring, not the "subsample and
interpolate" method 2 uses. Also, when I let it use higher resolution
voxel maps, this won't be a problem.
BTW, method 0 also has this problem...it gives some pretty odd results
when the distance between samples is larger than the distance between
cubes. I haven't checked method 1, but it should have this aliasing
problem as well.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Smoothly Blurred Patterns - blur2.jpeg (1/1)
Date: 5 Mar 2001 14:11:45
Message: <3AA3E4EE.481C65B2@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff wrote:
>
> When the blur distance is larger than the size of the cubes, it doesn't
> blend to a 50-50 mixture of the colors, but gives a bunch of fuzzy
> squares that are larger than the actual pattern. I'm planning a type 3
> that will supersample the voxels before interpolating, which will give
> better results. This will be a true blurring, not the "subsample and
> interpolate" method 2 uses. Also, when I let it use higher resolution
> voxel maps, this won't be a problem.
Sounds interesting, i'm looking forward to it.
>
> BTW, method 0 also has this problem...it gives some pretty odd results
> when the distance between samples is larger than the distance between
> cubes. I haven't checked method 1, but it should have this aliasing
> problem as well.
Probably correct, although it would be quite uncommon to use that large
distance values.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Tony[B]
Subject: Re: Smoothly Blurred Patterns - blur2.jpeg (1/1)
Date: 5 Mar 2001 17:11:33
Message: <3aa40f15@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Dang! Quick as usual! That's a very good thing. :)
Interesting pattern... Um, can you mention at least one case in which we
would actually need this or it would be hard to do any other way?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3aa40f15@news.povray.org>, "Tony[B]" <ben### [at] catholic org>
wrote:
> Interesting pattern... Um, can you mention at least one case in which we
> would actually need this
You've never wanted to blur a pattern before?
Well, a blurred drawing (like one that got wet), stains, fuzzy
lettering, isosurface pigment functions...there are lots of potential
uses. What do you use the blur filter in image editing programs for?
> or it would be hard to do any other way?
I don't think there *is* another way to do it. Well, you could probably
create a DF3 pattern from an array with the data generated using
eval_pattern()...difficult, slow, and memory consuming.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff wrote:
>
> > or it would be hard to do any other way?
>
> I don't think there *is* another way to do it. Well, you could probably
> create a DF3 pattern from an array with the data generated using
> eval_pattern()...difficult, slow, and memory consuming.
The only possible way i'd thought of was jittering the positions of 255
averaged textures. Not that efficient!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Nekar Xenos
Subject: Re: Smoothly Blurred Patterns - blur2.jpeg (1/1)
Date: 6 Mar 2001 02:33:35
Message: <3aa492cf@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I wonder how 3d graphics cards do it? I've seen something like tri-linear
something-or-other gives the best results in games. Don't know exactly how
it works and if it only works with bitmaps. The top one gives a nice
'paintbrush' effect. I would have thought to do something like the Blend
option in CorelDraw for patterns but that might also be a bit difficult.
Nekar Xenos
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |