Old 17th October 2007, 13:30   #1
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
shader experiments collection and experience thread

hi there.

while toying with MD2.0's shader fx, i got deeper and deeper into it and i would like to share some ideas. But i also have a lot of questions, which also may be interesting to other preset authors.

I just discovered the .fx files in the data directory and found out a possible source for a strange effect.

My basic idea was to determine a motion vector by the gradient of color of a blurred image and it works quite fine.

code:

float1 n = 3;
float1 factor = 1; // dunno, these aren't any practical values i think

float3 dx = ( GetBlur2(uv + n*float2(texsize.z,0)) - GetBlur2(uv - n*float2(texsize.z,0)));
float3 dy = ( GetBlur2(0,uv + n*float2(texsize.w)) - GetBlur2(0, uv - n*float2(texsize.w,0)));

float2 new_uv = uv + float2(dx,dy).x*factor*texsize.zw; //movement into direction of the gradient
//replace .x .y .z for each channel

float2 new_uv = uv + float2(dy,-dx).x*factor*texsize.zw; //movement orthogonal to the gradient



in combination with a leopard-like pattern (as in geiss' thumb drum preset) and the right set of parameters you'll see nice popping flowers ;-)

But then i realized the blobs are turning from upper left to lower right. This could have two possible sources i think. Maybe it's due to rounding errors, or the errors is in the blurring algorithm. I already had a look at it... I guess i'll try to implement my own real gaussian one

argh, time is running out.
to be continued...

but one last thing: my mindblob resolution indepence fix. (new cool after effects)
Attached Files
File Type: m flexi - mindblob 2.0.m (15.3 KB, 664 views)
Flexi is offline   Reply With Quote
Old 18th October 2007, 17:13   #2
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
I've been busy composing some demos

have fun with 'em. I'd really love to see some edits.

But back to my problem.

have an exact look at the behavior of the demo flowers and change one line in the blur1_ps.fx
code:

//float2 uv2 = uv.xy;// + srctexsize.zw*float2(0.5,0.5);
float2 uv2 = uv.xy + srctexsize.zw*float2(1,1); // + moves blur UP, LEFT by 1-pixel increments


i don't want the blur to be moved! -> comment the pixel increment out and see the difference.

I tried my best to keep these presets resolution-safe. But if you want to see, what i actually see, set your screen to 1280x1024.

Btw: anyone here, who is familiar with conways game of life? You are also ment to have a look inside this pack

hail discordia!
Flexi
Attached Files
File Type: zip flexi - 7 demo sripts.zip (19.4 KB, 623 views)
Flexi is offline   Reply With Quote
Old 19th October 2007, 10:42   #3
bdrv
Senior Member
 
Join Date: Apr 2007
Posts: 183
amazing.
the stuff turning round looks like a feedback loop of some kind of calculation...the distancing between the red grains is the rounding in between two colours. the movement looks like petrol movement effect, but going round inside a secondary border limit with another colour, moving for the same reason that the yellow borders move.
actually I have been playing with your code, and i don't understand anything.

I want to just be able to copy already made pixel code from other programs, for example mediamonkey- is it possible?

also now it's possible to copy and paste text from the editor to different programs.

http://blogs.msdn.com/shawnhar/archi...er-second.aspx

Last edited by bdrv; 19th October 2007 at 11:37.
bdrv is offline   Reply With Quote
Old 19th October 2007, 12:43   #4
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
Thanks for reply and especially for the link!

but sorry - the parameters are truly finetuned.
i was surprised by the rotation myself!
feedback loop is the right catchword. It's feeded by its own existence .
In a more mathematical manner, that means it is a stable structure/pattern in a differential equation system. And due to the limitation of 8bit for a color channel it is a chaotical numeric solution. (btw: i was always bad at math in school and basic study - but i am hopelessly addicted to visual effects)
what do you mean with petrol movement?

i already have some ideas on my mind to simulate fire but that's far away yet.

Next steps will be, that i want to attract these lovely mathy lifeforms to walk thru labyrinths etc. dunno - i am the god of this little universe, what do you think do they expect harhar
Flexi is offline   Reply With Quote
Old 19th October 2007, 14:38   #5
bdrv
Senior Member
 
Join Date: Apr 2007
Posts: 183
petrol movement because the colour movements spread through the dark areas just like flames on top of alcohol or petrol, as there are voids of air that fill and disperse-it looks very similar to a petrol effect.

the game of life is unbelievable its massive!
how is it possible to convert the greyscale data into shades of one colour-hey I will work it out I am supposed to be learning:-D
bdrv is offline   Reply With Quote
Old 19th October 2007, 16:48   #6
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
that's a charming interpretation. cool!

Quote:
how is it possible to convert the greyscale data into shades of one colour?
the easiest way is a linear interpolation with the lerp function.

float3 color = lerp( float3(1,0.5,0), float3(0.1,0,0.2), x);
is a fade from orange to dark violet
where x is the unidimensional grey value (0..1) - take any 2 colors you want
if you want to do a shade of just one color, all you need to do is simple multiplication: float3(1,0.5,0)*x;
do this in the composite shader as after-effect with no effect on the following frame.

take a look into the composite shader of the mindblob2.0
the red channel (x) is for the bubblegum-wireframe in the foreground. it's in the last line
(hey and look how i drop the blurred shadow in the line before )
feel free to comment some lines out and look what each of them is doing.

The built in docs are also very helpful
Flexi is offline   Reply With Quote
Old 20th October 2007, 13:30   #7
bdrv
Senior Member
 
Join Date: Apr 2007
Posts: 183
cheers- will have a go
bdrv is offline   Reply With Quote
Old 23rd October 2007, 00:17   #8
geiss
Nullsoft Visualization Developer
 
Join Date: May 2001
Posts: 147
Hey guys - version 2.0a will be out soon. Here are my new & updated presets so far for it. (I excluded old presets that didn't change.)

http://www.geisswerks.com/t/new_in_v2.0a.zip

Some of the experiments on here have been really cool, I am really impressed. It was really cool to see the Game of Life presets - I had actually just done the same thing myself! - you'll see a few of my efforts at it in this preset pack.

Going to a full-blown fluid sim might be tough because you're only working with 8 bits of precision... plus you only have 3 channels (r/g/b)... for that you really need four (velocity x and y, pressure, and something you're propagating (mass, color, etc)). You can ignore temperature without much trouble. Of the four steps performed each frame (1. apply forces to velocities, 2. advect mass/temp/velocities[sic] etc. by velocities, 3. compute pressure values, 4. apply gradient of pressure to velocities), the pressure calculation is the only hard one, because it involves a lot of "long distance travel" of information and many iterations per frame. Check out some of Jos Stam's work involving Vorticity Confinement, and read Keenan Crane's article in GPU Gems 3, if you want some good primers on it. But I don't think MilkDrop is quite ready for full-on fluid sim yet. But hey, something might be hackable, it is definitely worth trying... maybe you could use the Blur3 texture (or a gradient of it) as the pressure!

Ciao for now,
Ryan
geiss is offline   Reply With Quote
Old 23rd October 2007, 21:47   #9
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
woohoo

this wil be spaaaaacy
http://www.youtube.com/watch?v=QGnTfg-MUhs

blur3/pressure is a fantastic idea. I'll have a try.
I think, vorticity has to come emergent from simple rules. Maybe i will find things in the near field - you never know (but i do, hehehe).

here are my latetest results. but there's still only very few music detection in it yet. but i'm on it. i started also a lot of experiments with fractals in the past months.
search this board for my fractal trees - now, there's so much power in it, i can feel it.

Tune in, turn on, space out.
Flexi
Attached Files
File Type: zip living picture 1.zip (49.4 KB, 537 views)
Flexi is offline   Reply With Quote
Old 25th October 2007, 03:44   #10
kostyap
Junior Member
 
kostyap's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Posts: 47
Quote:
Originally posted by geiss

Going to a full-blown fluid sim might be tough because you're only working with 8 bits of precision... plus you only have 3 channels (r/g/b)... for that you really need four (velocity x and y, pressure, and something you're propagating (mass, color, etc)). You can ignore temperature without much trouble.
You can use 16bit texture format for precision. As for extra channels I believe you can add multiple render targets to your rendering path and stuff velocity and pressure in there
kostyap is offline   Reply With Quote
Old 25th October 2007, 14:05   #11
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
Quote:
Originally posted by geiss
you're only working with 8 bits of precision... plus you only have 3 channels (r/g/b)...
... plus the limit of 64 instructions

but hm, let me ponder...
don't you realize Blur3 with an additional sampler too?

nevertheless, the possibilities are seriously endless!
gogogo everyone

Power!
Flexi is offline   Reply With Quote
Old 26th October 2007, 12:41   #12
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
hehe,
this one is really ...EMO...

maybe someone likes to map a cool colorfade to the three colors used

hacking on.
Flexi is offline   Reply With Quote
Old 26th October 2007, 12:44   #13
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi

ehm, i uploaded the wrong file...

(@mod: delete this post)

Last edited by Flexi; 26th October 2007 at 13:43.
Flexi is offline   Reply With Quote
Old 26th October 2007, 13:41   #14
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
and here it is
Attached Files
File Type: m flexi - tinkerbell.m (10.6 KB, 546 views)
Flexi is offline   Reply With Quote
Old 27th October 2007, 16:46   #15
shifter
Senior Member
 
Join Date: Jun 2002
Location: Australia
Posts: 149
hmmm.. i don't know if this is the same issue, but milkdrop has always had issues keeping things centred. prior to v2 if you wanted a completely static image you had to fudge some of the settings.. and how well it worked depended on the resolution. something similar seems to be happening with the shaders, my waves keep heading for one of the corners...
shifter is offline   Reply With Quote
Old 27th October 2007, 17:05   #16
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
but you changed the line in the fx file as mentioned above?
Flexi is offline   Reply With Quote
Old 28th October 2007, 15:21   #17
shifter
Senior Member
 
Join Date: Jun 2002
Location: Australia
Posts: 149
fraid so, it changed the direction of the bias but not the fact that it's biased
shifter is offline   Reply With Quote
Old 30th October 2007, 00:04   #18
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
mind-beater par excellence.
Attached Files
File Type: m flexi - cpu muncher.m (17.7 KB, 425 views)
Flexi is offline   Reply With Quote
Old 14th November 2007, 15:09   #19
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
hoohoo?
something's going on...

mind the gap: http://gapminder.org/

where are you distorted vis-people all gone?
Attached Files
File Type: zip sigil magix.zip (2.4 KB, 441 views)
Flexi is offline   Reply With Quote
Old 20th November 2007, 00:18   #20
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
sry that my presets only come one after the other... but i can't hold them back..

have fun
Attached Files
File Type: zip flexi - smashing fractals 2.0.zip (4.0 KB, 527 views)
Flexi is offline   Reply With Quote
Old 5th December 2007, 15:46   #21
Zylot
Major Dude
 
Zylot's Avatar
 
Join Date: Jul 2001
Location: Pa, US(of)A
Posts: 803
Seems like you can't get Milkdrop2, though, without winamp 5, correct? I'll keep my 1.4, and my winamp 2.91.

-------------
What do you wish for?
--Instrumentality
Zylot is offline   Reply With Quote
Old 5th December 2007, 18:20   #22
kostyap
Junior Member
 
kostyap's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Posts: 47
Quote:
Originally posted by Zylot
Seems like you can't get Milkdrop2, though, without winamp 5, correct? I'll keep my 1.4, and my winamp 2.91.
I did not try it myself, but I'd try install Winamp 5. Grab MD2 files, and copy them to your old winamp install
kostyap is offline   Reply With Quote
Old 6th December 2007, 14:53   #23
Zylot
Major Dude
 
Zylot's Avatar
 
Join Date: Jul 2001
Location: Pa, US(of)A
Posts: 803
No dice, "this plugin requires winamp 5.12 or later".

I say no to the bloat.

-------------
What do you wish for?
--Instrumentality
Zylot is offline   Reply With Quote
Old 20th December 2007, 18:14   #24
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
remix of one of the flower demos
Attached Files
File Type: milk benski - flower remix.milk (10.4 KB, 334 views)
Benski is offline   Reply With Quote
Old 4th January 2008, 14:14   #25
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
ehm... dunno what to say
have a look ;-)
Attached Files
File Type: milk flexi - cell tissue.milk (17.4 KB, 350 views)
Flexi is offline   Reply With Quote
Old 5th January 2008, 12:10   #26
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
Krash needs to come back.
ryan is offline   Reply With Quote
Old 6th January 2008, 04:37   #27
bdrv
Senior Member
 
Join Date: Apr 2007
Posts: 183
holy custard blobs! that is very strange and beautiful! the 3D vectors as well are electric...i am meeeelting! I just spent ages downloading everything from everywhere and it's fabulous
bdrv is offline   Reply With Quote
Old 6th January 2008, 04:49   #28
bdrv
Senior Member
 
Join Date: Apr 2007
Posts: 183
would love to see what the results are like with the latest graphics cards and pixel shaders at max resolutions etc-what are people running these at on the best cards? Any chance of some screenshots? Cheers!

Flexi-the spirals look like some kind of science modelling.
bdrv is offline   Reply With Quote
Old 6th January 2008, 14:16   #29
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
and it won't stop...
(all presets designed on a Radeon9600)
Attached Files
File Type: milk flexi - not the spoon.milk (14.1 KB, 300 views)
Flexi is offline   Reply With Quote
Old 7th January 2008, 20:02   #30
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
...To boldly go where no man has done before...

these are two must-see demos!
there's still one color channel unused, so please tell me what would make these demos deployable presets. I'm really into it at the moment.
no questions at all?
i'm just a bad solo entertainer and this isn't rocket science
Attached Files
File Type: zip flexi - my daily soma.zip (5.9 KB, 474 views)
Flexi is offline   Reply With Quote
Old 7th January 2008, 21:34   #31
51Strong
Member
 
Join Date: Jan 2006
Posts: 80
Your improving allot flexi.
Keep it up
51Strong is offline   Reply With Quote
Old 16th March 2008, 02:34   #32
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
Attached Files
File Type: milk flexi - 3d mosaic glass test.milk (13.5 KB, 326 views)
Flexi is offline   Reply With Quote
Old 16th March 2008, 15:46   #33
bdrv
Senior Member
 
Join Date: Apr 2007
Posts: 183
looks like an unprocessed fullsize texture with a small blob 20 pixels big floating around?
bdrv is offline   Reply With Quote
Old 16th March 2008, 15:48   #34
Stahlregen
Senior Member
 
Join Date: Feb 2008
Posts: 218
Interesting... a bit non-interactive, though. Seems to go well with random patterns such as Geiss's reaction diffusion.
Stahlregen is offline   Reply With Quote
Old 16th March 2008, 17:31   #35
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
@bdrv: yes and no, the blobs are just custom shapes with a lens mapped on one color channel in the comp shader. This is the new multi-shape feature in action: 1024 instances of shape_1 with a relative position to their instance number and a fine 3D rotation procedure. You can change the my_x/y/z vars just like for a custom wave. Go define your own 3D figures

Imagine hundreds of particles floating in a 3D space. Regrettably all instances share only one collective pool of vars (from frame to frame) so i can't give them dynamic kinetic behavior (with each instance remembering its position and velocity)

@stahlregen: this was more ment as a technical demonstration, i haven't seen any presets which use multiple shape instances yet. ;-)

here's a "cube" with disabled after-effects
Attached Files
File Type: milk flexi - the new cubism.milk (13.6 KB, 309 views)
Flexi is offline   Reply With Quote
Old 16th March 2008, 18:02   #36
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
and one a little more sophisticated attempt
Attached Files
File Type: milk flexi - fluid brane.milk (14.0 KB, 327 views)
Flexi is offline   Reply With Quote
Old 1st April 2008, 22:45   #37
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
this is pretty cool, considering there's only one color channel used.
(and hey, it's generously commented)
Attached Files
File Type: milk flexi - faceless faces.milk (13.6 KB, 306 views)
Flexi is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop > MilkDrop Presets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump