Dark Bit Factory & Gravity
GENERAL => Projects => Topic started by: Kirl on January 22, 2011
-
I'm working on a dynamic pattern thingy, it is based on SuperLineFollow with which I wasted hours of my life. I always wanted to recreate it to add more variation options. Love to hear any suggestions.
Try it here! (http://kirl.nl/patterns.swf)
[UPDATE] updated file (http://kirl.nl/patterns2.swf)
[UPDATE2] final (?) version (http://www.kirl.nl/kirlySwirlys.html)
Mouse move: create swirly patterns!
Left Mouse Button: change color
Up/Down arrows: add or remove clones
Ctrl: toggle between particles/lines (Alt: switch particle shape)
-
I really like it! The mode with the circles/particles (which looks like curves lines) is my favourite one! The one with boxes will produce some very nice/interesting patterns too!
Particles and lines mode runs here at 17fps - but when adding a lot of clones, the particled mode runs a lot faster (still aroung 17 fps) while the lined mode rund down to 1 fps (is this normal?)
Anyway very nice work! =) *thumbs up*
-
Yeah, looks nice. Good job!
-
@Kirl:
I think you draw all particles (elements) for the whole screen, each frame - right?
Since the effect is everytime centered, you could possible optimize its speed by doing a small trick! What about splitting the screen into 4 parts (1 horizontal and 1 vertical line)?
So you just only need to calculate/draw the top/left part (and mirror this part in x and y). Maybe this could speed up your effect...
-
I have 19 FPS in the first mode ( 10 Particules ... )
Why are you displaying ten when I am changing the colour
Really nice :)
-
@LittleWhite:
The "ten" just tells you the number of used clones ^^ (you can change with cursors up/down to get some really nice effects)
@Kirl:
Found just a small bug ^^ Just add something like:
numberOfClones = (numberOfClones < 1) ? 1 : numberOfClones;
-
I didn't get that I have to click to change the parameters.
I love it
-
Cool effect, almost hypnotic with some of the patterns.
-
@LittleWhite
You need to click to set the focus of the page to the Flash file, it's something Flash requires when te page is loaded.
@va!n
Thanks for spotting the bug! The optimisation trick won't work because the 2 axis of symmetry rotate in opposite directions with an even nr of clones.
There are still some optimisations I can do, and I spotted a serious one-line slowdown for particle mode. I'll post an update soon.
-
Really nice effect. Have you tried to apply a gradient to the ribbons?
So it becomes something like
(http://www.plane9.com/ext/20110123-ribbondance.jpg)
Not sure what the speed in flash would be for that though
@LittleWhite
You need to click to set the focus of the page to the Flash file, it's something Flash requires when te page is loaded.
If you want to fix that problem you can use SWFObject. Google even has it in its javascript directory so you dont need to store the .js file on your own server.
-
This is very pretty. I'd like to see it implemented in C.
-
I uploaded an updated version (http://kirl.nl/patterns2.swf) which should run slightly faster.
@ Xetick
Thanks for the suggestion, transparency in Flash can become quite slow but a nice colour gradient shouldn't be a problem. Where did you get the image from?
I'll live with setting the focus manually, I usually link to the swf directly for convenience sake. Thanks for the tip though!
@valis
If you (or anybody) feel like porting it, I'll post the source when I'm done cleaning it up a bit, the actual math is pretty straightforward.
-
With 69 particules ... it freezes O_o
Controls answer ... if I am passing something on the middle I saw the number (to 1 now ... ) but nothing else.
Some for 68.
Way to do it:
- Do some move ... increase to +60
- Do some move
- FREEZE
Second note:
Yes it's faster ... but the FPS counter not working for sure now ;)
I can freeze it with 34 too ... I have attached screenshot ;)
It's often when particles go in mass to the center
-
Where did you get the image from?
It's from the next unreleased version of my visualizer Plane9 (http://www.plane9.com). When I saw your flash effect I wanted to try to make something like it and 15 minutes later I had that image.
It's just a pixel shader/shader node
float4 PS_Program(PSInput pi) : COLOR
{
float2 p = -1.0 + 2.0 * pi.tex;
float3 col = _hsv2rgb(pi.diffuse.a, 0.5, 0.5);
return float4(col*in1.x, pi.tex.y*(1.0-abs(p.x)));
}
in1.x is a evaluated from a expression and sent into the shader "in1.x = min(1,0.5+beat(1)*5);". It makes it pulse to the beat of the music
That shader is then connected to a ribbon node that draws a number of ribbons using a expression
rnr = ribbonnr/numribbons;
radius = noise1(time)*1.8;
pos.x = sin(time+PI*2*rnr)*radius;
pos.y = cos(time+PI*2*rnr)*radius;
pos.z = 0;
col.a = rnr;
width = 0.05;
noise1 generates a 1d noise value using simplex noise. Just to create some random but controlled motion since I have no support for user input like you do.
The ribbon node is connected to a clone node that creates another copy and rotates it 180 degrees to create the mirror effect.
So not as nice movement as you have but it's something. You seems to have a form of rubber/string effect attached to the moving particles that creates quite a lot of the effect.
-
Ah, it's nice and reminds me of lots of happy hours playing with Jeff Minters trip a tron in a dark room!
-
@LittleWhite
Does it actually come to a complete halt, or is it a temporary freeze? It can get really slow at points.
@Xetick
Yes, I use an array of xy points of which the 1st springs to the mouse, following points spring to each previous point. These form a ribbon which I copy and rotate. With an even number of ribbons the xscale of every other ribbon is flipped.
Plane9 looks great, love the rotating glowing lines!
@Shockwave
The name is enough to know I missed something great.
-
It freezes completeley ... I have wait aroud ... 3 minutes ...
EDIT: Ok ... forget about the issue ... was certainly Firefox / or my PC because I didn't restart it since a long time.
Now it's not bugging (even with 90 particles :))
Nice optimisation job
-
That's weird, what browser are you using? ???
Can you crash the first version as well?
-
That's weird, what browser are you using? ???
Can you crash the first version as well?
GNU/Linux Ubuntu 10.04 / Firefox 3.6.13
But ... It was the first time that I get your app freeze. Maybe some memory issue with Firefox. Since I can't recrash it, and since the crash environment was: Don't switch off the computer during one week ...
(Youtube video were not starting ... so ... best is to restart the whole Firefox (which I have forgot to do before reporting the issue)
-
I finished up this pattern thingy and slapped an ad on it, love to hear what you think.
Try it here! (http://www.kirl.nl/kirlySwirlys.html)
-
@Kirl:
The link you posted is invalid ^^ Fixed link:
http://www.kirl.nl/kirlySwirlys.html (http://www.kirl.nl/kirlySwirlys.html)
-
It works for me - it's an interesting pattern. I like how it reacts to the mouse. It isn't obvious at first, but when I realised it, I thought it was clever.
-
Fixed the link, thanks!
If you move the mouse over the question mark in the upper right corner, you get a short description of all the variation options.
-
It looks really nice Kirl, seems to run faster too because it's really smooth in firefox for me now, even if I add a lot of extra lines.