Skip to content
Forum Archive

Water & Blur

26 posts

^..^#

Water & Blur

I ever wanted to know, why you get this strange grey veil, when you combine trans/water with heavy blur. And why does this combination work with medium or light blur?
UnConeD#
Because the water filter is a 2D diamond-shaped convolution combined with a time-dependant subtraction which is simulating the surface of a very thin layer of water when you iterate it. Adding a heavy blur upsets the convolution because its mask is also diamond shaped, and alters the whole feedback loop.

Maybe that wasn't the answer you were looking for.

Dynamic systems are often unstable, messing around with trans/water gets you unstable stuff, which is sometimes ugly, sometimes pretty.
^..^#
Ah, i understand! So if you could convert the diamond-shaped convolution into 3D and make it a octohedron then perhaps the two convolutions sum up in the gaps of their grid so that you would have constructive interference, but only if you add a phase-shift about h/pi*2 (for h = Planck constant).

Joking apart, thanks for the explanation! I got the simple one and will think about the first part for the next days... 😉
Tuggummi#
Well while were at it, what is the convo setting for water then? I think UnConeD was coughing at the other thread about that 🙄
^..^#
dunno..
was playing with some diamond shapes in the trans/convolution filter but it only gave me this grey veil i talked about but nothing like water. So the convo settings that imitate a water-effect must be more difficult than just a diamond shape, (if its possible anyways).
PAK-9#
Originally posted by Tuggummi
Well while were at it, what is the convo setting for water then? I think UnConeD was coughing at the other thread about that 🙄
There is no 'setting' for water in the convo filter, as coned just said if you had bothered to read his post "...combined with a time-dependant subtraction".

I sometimes wonder why the convo filter is called a convo filter because it doesnt actually convolve two signals in any domain... at least it doesnt appear to.

Most people just use it as a 'controlled blur' anyway
^..^#
Would it be possible to make a "tweakable" water ape in any way? Sometimes it would be nice if you could set the direction the waves spread out, for example.
PAK-9#
I had the idea of making a propper convolution filter, that is a codable ape that you enter a 2D signal to be convolved with the framebuffer... but I think 99% of AVS'rs wouldnt know what to do with it. To most people it would just be a dynamic controlled blur 😛
^..^#
Originally posted by PAK-9
but I think 99% of AVS'rs wouldnt know what to do with it.
including me 😉

But probably this isn't what i was looking for. I had a ape in mind which offers control about the "water" in the form of sliders. So that you are able to set the "amplitude of the waves", the directions they spread on the screen, the amount of color-splitting or something like that (like water-bumb does for example). Hope you get what i mean...
Tuggummi#
To most people it would just be a dynamic controlled blur 😛
Convo-glow that pulsates on beat!? OMG! I WANT THAT! 😁
UnConeD#
Um. Convolution does convolve two signals: the 2D signal of the picture, and the 2D signal of the convolution mask.
^..^#
Could someone please explain what Convolution and/or to convolve/convolute means. (excuse me, i'm not a native speaker but i haven't found the words in any dictionary yet 🙁 ). I'd like to know what a convolution effect actually does when it "convolves two signals". I've got a very vague idea about the meaning; it seems to be something like "twisting the data around", but im not sure 😕 ? All i know is, that it's not a simple addition or multiplication, like:

pointA + pointB = pointC
or:
Pa * Pb = Pc

I'd be grateful for any explanaition!
sidd#
A convulation function is the amount that two data sources overlap. Avs's convulation filter takes the values RGB (0..1) of the pixels surrounding each pixel on the screen, compares them to the values you put in the convo map, and replaces what is on the avs screen with the resulting convulation.

i think....
PAK-9#
Well it depends on the context a little... In this case I would say we have 2 2D signals which are convolved together to form an output (another 2D signal) where...

output[x,y]= (a=sum from 0 to width of ( b=sum from 0 to height of ( input1(a,b) times input2(x-a,y-b) ) ))

(I say it depends on the context because for example another use is determining the operation of a system from its impulse response... where y(n) is the system ,h(n) is the impulse response and x(n) is the output... (this is all discrete so n is the sample number)

y(n)= k=sum from -inf to inf of (x(k) times h(n-k))

or y(n)=x(n) convolved with h(n)
)
^..^#
😕 Thanks for the explanations, its getting a bit clearer now. unfortunately i find your formula a bit confusing, PAK. It would have been easier to read if you had explained the variables seperately (not inside of the formula) but never mind..
UnConeD#
What a convolution does:

Given two data signals (let's say u[k] and v[k] where k is an index 0,1,2,3,...).

The convolution of u[k] with v[k] = y[k] = sum(i=-inf..+inf,u[k]*v[i-k]). What this means is, you flip one of the two signals around (set k = -k), you overlap it with the other signal and a certain offset 'i'. Then you multiply the corresponding values, and sum the result. This gives you /one/ value of y[k].

You can see this visually if you convolve u[k] = [1 2 1] with v[k] = [3 2]:


u[k] = [0 1 2 1 0] (extra zeros for padding)
flipped v[k]:
v[0-k] = [2 3 0 0 0]
multiply corresponding elements:
* = [0 3 0 0 0]
sum = 3
=> y[0] = 3

u[k] = [0 1 2 1 0]
flipped v[k]:
v[1-k] = [0 2 3 0 0] (note difference with previous i)
multiply corresponding elements:
* = [0 2 6 0 0]
sum = 8
=> y[1] = 8

u[k] = [0 1 2 1 0]
flipped v[k]:
v[2-k] = [0 0 2 3 0]
multiply corresponding elements:
* = [0 0 4 3 0]
sum = 7
=> y[2] = 7

u[k] = [0 1 2 1 0]
flipped v[k]:
v[3-k] = [0 0 0 2 3]
multiply corresponding elements:
* = [0 0 0 2 0]
sum = 2
=> y[3] = 2
For other values of i, u[k] and v[i-k] do not overlap with non-zero values.

So the convolution of [1 2 1] and [3 2] is [3 8 7 2].

You can see a convolution as taking multiple copies of one signal and weighting it with the values of the other. For example, convolving with [0 1 0] has no effect, because only a single copy of the signal is used.
Convolving with [0 2 0] multiplies the signal by 2.

If you convolve by [0.5 0.5], then you effectively take a copy of the signal, shift it one position, and average it with the unshifted signal. This has the effect of blurring the signal, and removing sharp points and edges. In other words, this is a "low pass" filter. A convolution with [0.5 -0.5] enhances sharp points and edges and fades away slow variations. This is a "high pass" filter.

You can do convolutions in 2D, where the input can be seen as 2 images. A convolution with
[1 1]
[1 1], has the effect of blurring the image in both the x and y directions.

Convolutions are essentially linear time-invariant systems or filters. These are simplified elements used in the description of electronics, such as in audio equipment and synthesisers. Using frequency analysis and fourier/z transforms, you can find out exactly how a certain filter affects the frequency spectrum. Or in reverse, you can design a filter that has a specified result on the frequency spectrum. In electronics, the signals are voltages and are continuous, in computers, we use digital signals and the signal is discrete in time and quantization. This is digital signal processing.

This falls under system theory, signal processing and such, which you can learn about when you study engineering.
^..^#
😱

I really understood that! Thanks very much UnConeD!!! Your Explanations are great 👍

And sorry PAK, i should have know what you wrote; you meant this:
__
| '
>
|__, right?

(Sorry, but it seemed O.K in the preview, should be a capital Greek epsilon)
^..^#
Oh yes, sorry. 😁
Different letters, but we all meant the same: the mathematical symbol for a sum.