Recipe 37: Shatter

Jun 8, 2007 at 12:00am

Recipe 37: Shatter

#32360
Jun 19, 2007 at 10:49am

hi! great! that was exactly i was looking for. my texcoords were always wrong.

hurra,

dd

#106277
Jun 19, 2007 at 4:43pm

If you want to make the shards rotate, you can add a few more jit.expr
objects into the process:

#P outlet 21 232 15 0;
#P inlet 21 105 15 0;
#P inlet 589 74 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 589 102 63 196617 jit.unpack 3;
#P newex 21 169 570 196617 jit.expr @expr in[0]
“in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])”
“in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])” in[0] in[0];
#P newex 21 144 567 196617 jit.expr @expr
“in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])” in[0]
“in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])” in[0] in[0];
#P newex 21 194 583 196617 jit.expr @expr “in[0].p[0]*cos(in[1]) -
in[0].p[1]*sin(in[1])” “in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])”
in[0] in[0] in[0];
#P comment 606 74 100 196617 xyz rotation matrix;
#P connect 1 0 7 0;
#P connect 6 0 2 0;
#P connect 2 0 3 0;
#P connect 4 0 2 1;
#P connect 4 1 3 1;
#P connect 5 0 4 0;
#P connect 3 0 1 0;
#P connect 4 2 1 1;
#P window clipboard copycount 8;

Enjoy!

#106278
Jun 20, 2007 at 10:14am

hero of the day!

dd

#106279
Jul 4, 2007 at 12:28pm

hi! is this operation so cpu intensive? the rotation slows down my machine drastically. where to integrate the rotation matrix?

in fact this op is very inspiring and leads me to some other problems…

btw. sent you a mail to your flickr account concerning your slurp shader. very nice. reminds me of this quaternion julia shader i once saw in vvvv world. required shader 3.0 and did not work in realtime mode.

allthebest,

dd

#106280
Jul 4, 2007 at 5:55pm

Hi Didi,
Depending on how many quads you are using, there is some pretty heavy
calculation going on in those jit.expr objects. On my G5, it didn’t
seem to slow things down too much, but YMMV.

Those images in flickr are done using a some curvy meshes with a shader
applied that does some interesting things based on Normal calculations.
There really isn’t so much to it, and the math isn’t nearly as difficult
as Julia sets.

AB

#106281

You must be logged in to reply to this topic.