Author Topic: metaball video tutorial by daniel shiffman (in processing)  (Read 1461 times)

0 Members and 1 Guest are viewing this topic.

Offline flightcrank

  • C= 64
  • **
  • Posts: 35
  • Karma: 24
    • View Profile
Hey guys heres a cool metaball tutorial by daniel shiffman who also has other cool tutorials relevant to demoscene coding.
As metaballs are popular in the demoscene i thought id post this one. i hope it helps out people (like me) who has trouble
in written tutorials when they throw to much math at you with not enough explanation behind it.

https://www.youtube.com/watch?v=ccYLb7cLB1I
Challenge Trophies Won:

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 260
  • Karma: 18
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Wow and ha ha.  It was really nice,  watching his Video. Thanks for sharing.
 :goodpost:
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1199
  • Karma: 229
    • View Profile
    • Homepage
I found him on youtube yesterday and subscribed (blessed are our all-knowing algorithmic overlords). I followed his reaction diffusion video and wrote it in codea on the ipad (with lua) but it was too slow even with a small bitmap, I need to learn more about GLSL and run it in a shader.

K+ for posting, I was thinking of doing the same thing!  :cheers:
www.kirl.nl
Challenge Trophies Won:

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 260
  • Karma: 18
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
, I need to learn more about GLSL and run it in a shader.
Code: [Select]
#ifdef GL_ES
precision mediump float;
#endif

uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
vec2 position;

float addLight (vec2 pos, float size, vec3 c)
{
float tmp =0.2;

float dist = distance(position, pos);

float clmp=clamp(sin(time*1.2)*1.5,0.9,0.3);

tmp += (size / dist)  * clmp;
tmp = pow(tmp,4.0);

return  tmp;
}

void main( void ) {
position = ( gl_FragCoord.xy / resolution.xy );

float dest_color = 0.0;

dest_color += addLight(vec2(0.5+sin(time*1.2)*0.5,0.5), 0.5, vec3(1.0, 0.0, 0.0));
dest_color += addLight(vec2(0.2,0.7+cos(time)*0.2), 0.3, vec3(0.0, 1.0, 0.0));

gl_FragColor = vec4(dest_color*0.5,dest_color*0.8,dest_color,1.0);

}

2 simple bright blue shining meta blobs :D

have fun
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1199
  • Karma: 229
    • View Profile
    • Homepage
Thanks inc, but I was reffering to another video (https://m.youtube.com/watch?v=BV9ny785UNc).

My only proper experience with shaders was actually a metaball shader which I used for a very nice verlet fluid. Now if only I could get my head around the navies-stokes mumbo-jumbo.  :)
www.kirl.nl
Challenge Trophies Won: