Gel maps are very cool

BlitzMax Forums/BlitzMax Programming/Gel maps are very cool

Dubious Drewski(Posted 2005) [#1]
I figured out the mechanics of gel maps. When you apply
them to particle animation you get a really cool result,
and some very complicated movement. After a few hours
of toiling, I've written this:

Yes I know, it looks like nothing special. but you have to see
it in motion to know what I'm talking about!

You can get the Source and Exe here.


REDi(Posted 2005) [#2]
Cool, nice effect!
It'd make a cool screensaver!


Filax(Posted 2005) [#3]
Very nice ! thanks for the code !


ImaginaryHuman(Posted 2005) [#4]
Pretty nice. Where does the term `gel map` come from, can you explain?


Dreamora(Posted 2005) [#5]
perhaps because it looks like a gelart mass that is glowing :-) (don't know if this is written correct, in german it is just called "gel")


Dubious Drewski(Posted 2005) [#6]
It's a Gel map because the canvas behaves like a kind of gel.
That is, it remembers forces that are applied to it and slowly
forms back into shape. In this case, I made it remember your
mouse strokes, so that's what you're seeing when you rub
the canvas. It will make perfect sense if you hit G.
Once I get back home, I'd like to make this code deform a
picture in the same way. It should look neat!

Merry Christmas (etc) to all!


popcade(Posted 2005) [#7]
nice and funny effect, really cool ;)


sswift(Posted 2005) [#8]
Basically to render this effect, you blit a quad to a texture with multiply blending, with the darkness of the quad being how fast you want the "gel" to return to it's normal "shape", and then you blit the particles on top with add blending. The quad darkens the previous frame, and as a result, the frame before that, and before that, etc which still exist within the image to some degree until eventually those areas that have not been written over again become black.

It just occured to me that one could get an interesting effect if one were to adjust the hue of the quad being used to darken the previous passes. Then the background would have psychadelic shifts in hue.

If I'm not mistaken, the colors we're seeing here are just a result of the particles themselves being colored, thus the white areas. I think the effect I describe above would work best if the particles moved about rather than simply appearing in one location one frame. Otherwise you wouldn't get color trails with shifting hues.

Hm... just looked at the demo... Yhe particles you have are moving... in odd ways! What's going on there? Are the particles being affected by the gravity of nearby particles, or are they following the contours of the gel map, moving to the lowest point? That's something I didn't expect to see!


sswift(Posted 2005) [#9]
I've just been playing with it for a few minutes... That's much cooler than I thought it was gonna be from looking at the screenshot. And looking at it I wonder what it might be useful for.

It seems more like something alive than like something one might use for a particle effect. It forms currents, which over time change and evolve... And if you group all the particles into a clump, they're unstable and will eventually split into a group of two perhaps, then rejoin, then split into a group of 3, then five, and then finally break up into lots of little groups with single particles wandering around in between.


Dubious Drewski(Posted 2005) [#10]
Yeah, isn't it neat?


sswift(Posted 2005) [#11]
[edit]
Ah, I see you have included source, I suppose I could have looked at that to figure out how it works, duh!
[/edit]