Forums > Jitter

Sharing is fun – Psychedelic Depth Artifacts

September 5, 2007 | 10:27 pm

In trying to help out someone with their patch just now I accidentally
created some psychedlic effects from depth buffer artifacts. It’s
quite fun to muck with the gshape generating the positions and see
what patterns develop by navigating through the internals of the
shapes.

wes

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 556 240 80 196617 rotate $1 0 1 1;
#N counter 0 0 360;
#X flags 0 0;
#P newobj 556 214 83 196617 counter 0 0 360;
#P newex 556 189 41 196617 r draw;
#P newex 320 366 71 196617 prepend shape;
#P user ubumenu 320 341 72 196617 0 1 1 0;
#X add sphere;
#X add torus;
#X add cylinder;
#X add opencylinder;
#X add cube;
#X add opencube;
#X add plane;
#X add circle;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 378 169 33 196617 r rez;
#P newex 378 196 130 196617 jit.matrix 3 float32 20 20;
#P message 23 116 34 196617 reset;
#P newex 336 98 41 196617 r draw;
#P newex 141 118 41 196617 s draw;
#P window linecount 2;
#P newex 325 287 261 196617 jit.gl.multiple foo 2 @glparams position
color @targetname sphere @scale 0.1 0.1 0.1 @targetmode 1;
#P window linecount 1;
#P newex 292 36 66 196617 loadmess 25;
#P newex 81 143 182 196617 jit.gl.handle foo @inherit_transform 1;
#P comment 332 56 41 196617 DIM;
#P newex 295 98 33 196617 s rez;
#P newex 389 98 71 196617 prepend shape;
#P user ubumenu 389 72 72 196617 0 1 1 0;
#X add sphere;
#X add torus;
#X add cylinder;
#X add opencylinder;
#X add cube;
#X add opencube;
#X add plane;
#X add circle;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 292 57 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 292 77 56 196617 dim $1 $1;
#P newex 81 169 168 196617 jit.gl.render foo @camera 0 0 0.12;
#P toggle 117 222 15 0;
#P message 117 243 66 196617 floating $1;
#P message 45 247 68 196617 fullscreen $1;
#P toggle 28 247 15 0;
#P newex 70 222 35 196617 sel 27;
#P newex 28 222 40 196617 key;
#P toggle 81 53 18 0;
#P newex 81 71 57 196617 qmetro 80;
#P newex 81 118 58 196617 t erase b b;
#P window linecount 2;
#P newex 292 396 330 196617 jit.gl.gridshape foo @lighting_enable 1
@depth_enable 1 @scale 0.5 0.5 0.5 @automatic 0 @blend_enable 0
@smooth_shading 1 @name sphere;
#P window linecount 1;
#P newex 45 265 227 196617 jit.window foo @depthbuffer 1 @fsaa 1 @sync 1;
#P newex 321 138 307 196617 jit.gl.gridshape foo @automatic 0
@matrixoutput 1 @shape sphere;
#P fasten 7 0 8 0 75 244 33 244;
#P fasten 8 0 9 0 44 262 44 247;
#P connect 9 0 1 0;
#P connect 10 0 1 0;
#P fasten 6 0 7 0 69 239 69 224;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P connect 24 0 19 0;
#P connect 19 0 12 0;
#P connect 3 0 12 0;
#P connect 3 1 12 0;
#P connect 11 0 10 0;
#P connect 3 2 22 0;
#P connect 20 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 2 0;
#P connect 28 0 2 0;
#P connect 13 0 17 0;
#P fasten 27 1 28 0 356 360 325 360;
#P connect 13 0 0 0;
#P connect 23 0 0 0;
#P connect 16 0 0 0;
#P connect 25 0 21 0;
#P connect 31 0 21 0;
#P connect 0 0 25 0;
#P connect 26 0 25 0;
#P fasten 15 1 16 0 425 91 394 91;
#P connect 29 0 30 0;
#P connect 30 0 31 0;
#P connect 25 0 21 1;
#P window clipboard copycount 32;



Dan
September 6, 2007 | 4:09 pm

I can feel it. My mind is going. Wes, stop.

Oooo…colors. Thanks for sharing, Wes. :)

d


September 6, 2007 | 6:33 pm

Nice patch Wes!

It’s also cool when one zooms out of sphere, and then slowly zooms in
again. When the camera is very close to the sphere, interesting
artifacts start to emerge on ints surface.

Polytopal regards,
nesa

> In trying to help out someone with their patch just now I accidentally
> created some psychedlic effects from depth buffer artifacts. It’s


September 9, 2007 | 5:00 pm

really cool!!


September 9, 2007 | 5:04 pm

When I put it on full screen on my G5 with 2×2.5 Ghz it kind of stutters! How much processing does it want?


September 9, 2007 | 5:08 pm

Lower the poly count to make it run faster. It’s drawing alot of
vertices. You can also enable displaylists in the gridshape which
will really give it a speed boost.

wes

On 9/9/07, Hans Mittendorf wrote:
>
> When I put it on full screen on my G5 with 2×2.5 Ghz it kind of stutters! How much processing does it want?
>


September 9, 2007 | 5:13 pm

It would be nice to be able to navigate through it. It would not turn always in the same direction and maybe one could go inside a bit….
Can you make that interactive Wes?


September 9, 2007 | 5:23 pm

Part of the fun is learning how to do it yourself :) I’ll leave the
navigation to you or someone else. If you get something interesting
share the love and post a modded patch.

wes

On 9/9/07, Hans Mittendorf wrote:
>
> It would be nice to be able to navigate through it. It would not turn always in the same direction and maybe one could go inside a bit….
> Can you make that interactive Wes?
>


September 9, 2007 | 5:26 pm

yes, I just thought about it. It kind of asks for zoom in and out.


September 9, 2007 | 8:16 pm

Holy Crap! Wow, on some settings that gives me a full 200% boost. Nice
tip, Wesley!

Right now I can do 14400 spheres @ dim 6 6, @smooth_shading 1 @fsaa 1 at
~30 fps – even while I am manipulating both position, color and scale
and rotation via individual matrices – VERY good – and looks stunning!
Hehe, also, 40.000 (sic) spinning planes was fun, too!

Thank you for providing probably the most hackable piece of code on here :-D

In honour of this glorious piece of mini-patching I give you my
grrrreatest piece so far:
http://wetterberg.dk/andreas/andreas_files/Explosion%20at%20the%20Skittles%20warehouse.png
- I even did a temporary set on Flickr so that you can see some of the
insane stuff possible with this method:

http://www.flickr.com/photos/andreaswetterberg/sets/72157601936867553/

Cheers,
Andreas.

Wesley Smith skrev:
> Lower the poly count to make it run faster. It’s drawing alot of
> vertices. You can also enable displaylists in the gridshape which
> will really give it a speed boost.
>
> wes
>
> On 9/9/07, Hans Mittendorf wrote:
>
>> When I put it on full screen on my G5 with 2×2.5 Ghz it kind of stutters! How much processing does it want?
>>
>>
>
> .
>
>


September 9, 2007 | 8:21 pm

Hans Mittendorf skrev:
> It would be nice to be able to navigate through it. It would not turn always in the same direction and maybe one could go inside a bit….
>
Just add a toggle to the rotate message and then move about the object
cluster with your mouse, via the jit.gl.handle object. You can really
seek out cool images that way.

Hope this helps,
Andreas.


September 10, 2007 | 7:38 am

just tryed to find a way to apply zooming. Jitter does not seem to provide ‘glPixelZoom’. Inside openGl programming guide 1.4 page328, there is a code example: image.c for zooming.
Did I overlook something in our Jitter box handling zooming?

Does someone know how to put the code into an external?


September 10, 2007 | 7:45 am

When I put it on full screen my card a ATI Radeon 9600XT starts sweating. Do you know which card can handle that on full screen?


September 10, 2007 | 9:43 am

Hans Mittendorf skrev:
> just tryed to find a way to apply zooming. Jitter does not seem to provide ‘glPixelZoom’. Inside openGl programming guide 1.4 page328, there is a code example: image.c for zooming.
> Did I overlook something in our Jitter box handling zooming?
>
> Does someone know how to put the code into an external?
>
Hans,
have you tried the help file for jit.gl.handle ? alt-dragging with the
mouse zooms in or out – or am I missing what you are trying to acheive?

Andreas.


September 10, 2007 | 9:53 am

Thanks, yes it does zoom, but it is not very good. Kind of very rough.
cheers


September 10, 2007 | 10:40 am

Hans Mittendorf skrev:
> Thanks, yes it does zoom, but it is not very good. Kind of very rough.
> cheers
Then check the help-file ;-) It will show you which messages
jit.gl.handle uses to move around – in this case it’s [position f f f] –
in 32-bit precision.

a.


September 11, 2007 | 7:00 am

The problem is my graphics card. It does not zoom smoothly because it is trying already to hard. Which graphics card are you using?


September 11, 2007 | 9:52 pm

Hans Mittendorf skrev:
> The problem is my graphics card. It does not zoom smoothly because it is trying already to hard. Which graphics card are you using?
GeForce 8800 GTS (640 MB) – runs like a freakin’ dream.

Andreas.


September 12, 2007 | 2:03 pm

That’s for PC?


Viewing 19 posts - 1 through 19 (of 19 total)