Forums > Jitter

Basic Question

January 30, 2008 | 10:09 pm

I have a few basic questions relating to drawing basic shapes (and maybe a few not so basic ones) using sketch/openGL. First and for most I need to know the basic principles on how to draw circles and arcs. I have looked at the jitter tutorial concerning sketch, and I see how to draw triangles and squares, and the derivatives there of, but how about basic circles and arcs? Also, I need to be able to draw basic representations of wave shapes as lines, such as a sine wave from one point to another based off the frequency of A cycle~ object. This line needs to reflect realtime change also… quick response would be awesome, as I am on a school deadline.


January 31, 2008 | 2:25 pm

I see a lot of views but no answers yet… :( I thought this would be an easy question…

If it makes it any easier, This is the project that we are doing..

http://www.youtube.com/watch?v=0h-RhyopUmc

I have finished most all the synth part, but now I need some guidance on the visuals.

I own Max/MSP/Jitter full versions, am a great Max/MSP coder (did the synth part all by my self) just need some direction on the shapes and lines…

I managed to draw a circle using gridshape, but I still need some guidance on the lines that connect to the "output" I’m sure it would have some thing to do with bessel functions, just not sure on how to implement them, or how the to translate openGL scripting into jitter objects as I noticed it’s not the same…

even some points to web sites that give some direction would be awesome….


January 31, 2008 | 4:18 pm

for circles check the jit.gl.sketch helpfile, all availble shapes are there.
its a bit hidden but look into [P cmdlist_commands] for how to manage your
drawing of shapes. you might find ti easier to use js,java or lua to manage
those lists.

you can convert audio waves to graphics in several ways. i use jit.gl.graph.
then capture that to a texture and slap on a plane.

run a search on any o f the objects i mentioned and you will get further
help. goodluck and hope you get something nice to show./

On Jan 31, 2008 4:25 PM, Eric Wafford

wrote:

>
> I see a lot of views but no answers yet… :( I thought this would be an
> easy question…
>
> If it makes it any easier, This is the project that we are doing..
>
> http://www.youtube.com/watch?v=0h-RhyopUmc
>
> I have finished most all the synth part, but now I need some guidance on
> the visuals.
>
> I own Max/MSP/Jitter full versions, am a great Max/MSP coder (did the
> synth part all by my self) just need some direction on the shapes and
> lines…
>
> I managed to draw a circle using gridshape, but I still need some guidance
> on the lines that connect to the "output" I’m sure it would have some thing
> to do with bessel functions, just not sure on how to implement them, or how
> the to translate openGL scripting into jitter objects as I noticed it’s not
> the same…
>
> even some points to web sites that give some direction would be
> awesome….
>


January 31, 2008 | 4:55 pm

exactly what I was needing, thanks a million! will let you know how it goes.


January 31, 2008 | 10:02 pm

ok, so now I have a basic understanding of rendering audio into the jit.gl.graph, but now how can I map this to a texture of a plane? I have tried to a couple of ways, but to no success… here is my basic start for the graph part.

max v2;
#N vpatcher 261 230 1281 823;
#P origin 0 -30;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 164 179 62 196617 jit.unpack 2;
#P newex 164 235 314 196617 jit.gl.graph blabla @depth_enable 1 @color 1. 1. 1. 1. @circpoints 1;
#B color 5;
#P newex 149 356 194 196617 jit.gl.handle blabla @inherit_transform 1;
#P newex 190 475 193 196617 jit.window blabla @fsaa 1 @pos 650 100;
#P newex 145 278 55 196617 t b erase b;
#P newex 148 335 172 196617 jit.gl.render blabla @depth_enable 1;
#P user jit.fpsgui 89 162 48 196617 3;
#P user jit.fpsgui 23 162 60 196617 0;
#P newex 473 177 30 196617 dac~;
#P message 426 156 27 196617 stop;
#P number 185 63 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 473 154 65 196617 startwindow;
#P toggle 145 63 15 0;
#P newex 145 86 50 196617 qmetro 2;
#P newex 145 135 106 196617 jit.catch~ 1 @mode 3;
#N vpatcher 255 120 678 490;
#P window setfont "Sans Serif" 9.;
#P number 153 46 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P hidden newex 452 402 105 196617 bgcolor 255 230 230;
#P newex 153 121 40 196617 *~ 0.2;
#P newex 153 81 56 196617 rect~ 555;
#P outlet 198 205 15 0;
#P outlet 69 205 15 0;
#P connect 3 0 0 0;
#P connect 5 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 1 0;
#P pop 1;
#P newobj 473 99 51 196617 p cycle;
#N vpatcher 86 108 243 289;
#P origin 0 397;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 347 321 105 196617 bgcolor 255 230 230;
#P outlet 27 118 15 0;
#P window linecount 0;
#P message 27 98 69 196617 fullscreen $1;
#P newex 27 37 40 196617 key;
#P newex 27 58 54 196617 select 27;
#P toggle 27 79 15 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 3 0;
#P connect 3 0 4 0;
#P pop;
#P newobj 190 457 82 196617 p esc-fullscreen;
#N vpatcher 309 53 657 324;
#P window setfont "Sans Serif" 9.;
#P newex 158 158 20 196617 t b;
#P newex 158 134 55 196617 route read;
#P hidden newex 14 29 105 196617 bgcolor 255 230 230;
#P newex 45 109 99 196617 jit.qt.movie @vol 0.;
#P newex 45 134 111 196617 prepend texture movie;
#P outlet 234 169 15 0;
#P outlet 45 187 15 0;
#P inlet 45 80 15 0;
#N vpatcher 78 104 279 266;
#P window setfont "Sans Serif" 9.;
#P hidden newex 452 402 105 196617 bgcolor 255 230 230;
#P newex 30 9 45 196617 loadbang;
#P outlet 30 127 15 0;
#P newex 30 82 128 196617 jit.matrix 4 float32 10 10;
#P message 30 34 111 196617 setall 1. 0.2 0.7 1.;
#P newex 30 105 101 196617 prepend texture blue;
#P newex 30 58 50 196617 t b l;
#P connect 5 0 2 0;
#P connect 2 0 0 0;
#P connect 0 0 3 0;
#P fasten 0 1 3 0 75 78 35 78;
#P connect 3 0 1 0;
#P connect 1 0 4 0;
#P pop;
#P newobj 57 158 72 196617 p blue texture;
#P message 75 75 29 196617 read;
#P message 234 135 73 196617 texture movie;
#P comment 76 60 188 196617 • click here to use a movie as a tetxure;
#P connect 2 0 8 0;
#P connect 4 0 8 0;
#P connect 8 0 7 0;
#P connect 3 0 5 0;
#P connect 7 0 5 0;
#P connect 8 1 10 0;
#P connect 10 0 11 0;
#P fasten 11 0 1 0 163 184 221 184 221 123 239 123;
#P connect 1 0 6 0;
#P pop;
#P newobj 189 303 55 196617 p textures;
#P user panel 184 298 65 29;
#X brgb 255 255 255;
#X frgb 100 202 30;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 4 0 11 0 150 157 28 157;
#P fasten 4 0 12 0 150 157 94 157;
#P connect 6 0 5 0;
#P fasten 3 0 4 0 478 123 150 123;
#P connect 5 0 4 0;
#P connect 4 0 14 0;
#P connect 1 0 13 0;
#P connect 14 0 13 0;
#P fasten 16 0 13 0 154 375 128 375 128 330 153 330;
#P connect 14 1 13 0;
#P fasten 4 0 18 0 150 157 169 157;
#P fasten 1 1 17 0 239 330 250 330 250 272 158 272 158 236 169 236;
#P connect 18 0 17 0;
#P connect 8 0 5 1;
#P connect 14 2 1 0;
#P connect 2 0 15 0;
#P hidden connect 7 0 10 0;
#P hidden connect 9 0 10 0;
#P pop;

Any help would be awesome, just basic guidance of getting it onto the plane would rock, I know how to move them around and stuff..


February 1, 2008 | 2:27 am

Is there any other way of capturing to texture without having the
various individual gl objects capturing to each of their own
jit.gl.texture? This can be cumbersome if the goal is to amalgamate
them all eventually…

My hope was to capture multiple gl objects (IE: say as a dumb example,
jit.gl.model, jit.gl.nurb, jit.gl.mesh) all to one texture? I get
error messages, which is probably the answer. ..

Any thoughts? Robbie


February 1, 2008 | 2:35 am

yeah, use them all in a jit.gl.sketch and capture them then.

On Jan 31, 2008, at 9:27 PM, Robert Griffin Byron wrote:

> Is there any other way of capturing to texture without having the
> various individual gl objects capturing to each of their own
> jit.gl.texture? This can be cumbersome if the goal is to amalgamate
> them all eventually…
>
> My hope was to capture multiple gl objects (IE: say as a dumb
> example, jit.gl.model, jit.gl.nurb, jit.gl.mesh) all to one texture?
> I get error messages, which is probably the answer. ..
>
> Any thoughts? Robbie


February 1, 2008 | 10:49 am

you map something to texture using the @capture attribute.

do a search for "sketch cmd_list inherent blend" in the archives.

On Feb 1, 2008 12:02 AM, Eric Wafford

wrote:
>
> ok, so now I have a basic understanding of rendering audio into the
jit.gl.graph, but now how can I map this to a texture of a plane? I have
tried to a couple of ways, but to no success… here is my basic start for
the graph part.
>
> max v2;
> #N vpatcher 261 230 1281 823;
> #P origin 0 -30;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 164 179 62 196617 jit.unpack 2;
> #P newex 164 235 314 196617 jit.gl.graph blabla @depth_enable 1 @color 1.
1. 1. 1. @circpoints 1;
> #B color 5;
> #P newex 149 356 194 196617 jit.gl.handle blabla @inherit_transform 1;
> #P newex 190 475 193 196617 jit.window blabla @fsaa 1 @pos 650 100;
> #P newex 145 278 55 196617 t b erase b;
> #P newex 148 335 172 196617 jit.gl.render blabla @depth_enable 1;
> #P user jit.fpsgui 89 162 48 196617 3;
> #P user jit.fpsgui 23 162 60 196617 0;
> #P newex 473 177 30 196617 dac~;
> #P message 426 156 27 196617 stop;
> #P number 185 63 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 473 154 65 196617 startwindow;
> #P toggle 145 63 15 0;
> #P newex 145 86 50 196617 qmetro 2;
> #P newex 145 135 106 196617 jit.catch~ 1 @mode 3;
> #N vpatcher 255 120 678 490;
> #P window setfont "Sans Serif" 9.;
> #P number 153 46 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P hidden newex 452 402 105 196617 bgcolor 255 230 230;
> #P newex 153 121 40 196617 *~ 0.2;
> #P newex 153 81 56 196617 rect~ 555;
> #P outlet 198 205 15 0;
> #P outlet 69 205 15 0;
> #P connect 3 0 0 0;
> #P connect 5 0 2 0;
> #P connect 2 0 3 0;
> #P connect 3 0 1 0;
> #P pop 1;
> #P newobj 473 99 51 196617 p cycle;
> #N vpatcher 86 108 243 289;
> #P origin 0 397;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P hidden newex 347 321 105 196617 bgcolor 255 230 230;
> #P outlet 27 118 15 0;
> #P window linecount 0;
> #P message 27 98 69 196617 fullscreen $1;
> #P newex 27 37 40 196617 key;
> #P newex 27 58 54 196617 select 27;
> #P toggle 27 79 15 0;
> #P connect 2 0 1 0;
> #P connect 1 0 0 0;
> #P connect 0 0 3 0;
> #P connect 3 0 4 0;
> #P pop;
> #P newobj 190 457 82 196617 p esc-fullscreen;
> #N vpatcher 309 53 657 324;
> #P window setfont "Sans Serif" 9.;
> #P newex 158 158 20 196617 t b;
> #P newex 158 134 55 196617 route read;
> #P hidden newex 14 29 105 196617 bgcolor 255 230 230;
> #P newex 45 109 99 196617 jit.qt.movie @vol 0.;
> #P newex 45 134 111 196617 prepend texture movie;
> #P outlet 234 169 15 0;
> #P outlet 45 187 15 0;
> #P inlet 45 80 15 0;
> #N vpatcher 78 104 279 266;
> #P window setfont "Sans Serif" 9.;
> #P hidden newex 452 402 105 196617 bgcolor 255 230 230;
> #P newex 30 9 45 196617 loadbang;
> #P outlet 30 127 15 0;
> #P newex 30 82 128 196617 jit.matrix 4 float32 10 10;
> #P message 30 34 111 196617 setall 1. 0.2 0.7 1.;
> #P newex 30 105 101 196617 prepend texture blue;
> #P newex 30 58 50 196617 t b l;
> #P connect 5 0 2 0;
> #P connect 2 0 0 0;
> #P connect 0 0 3 0;
> #P fasten 0 1 3 0 75 78 35 78;
> #P connect 3 0 1 0;
> #P connect 1 0 4 0;
> #P pop;
> #P newobj 57 158 72 196617 p blue texture;
> #P message 75 75 29 196617 read;
> #P message 234 135 73 196617 texture movie;
> #P comment 76 60 188 196617 • click here to use a movie as a
tetxure;
> #P connect 2 0 8 0;
> #P connect 4 0 8 0;
> #P connect 8 0 7 0;
> #P connect 3 0 5 0;
> #P connect 7 0 5 0;
> #P connect 8 1 10 0;
> #P connect 10 0 11 0;
> #P fasten 11 0 1 0 163 184 221 184 221 123 239 123;
> #P connect 1 0 6 0;
> #P pop;
> #P newobj 189 303 55 196617 p textures;
> #P user panel 184 298 65 29;
> #X brgb 255 255 255;
> #X frgb 100 202 30;
> #X border 2;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P fasten 4 0 11 0 150 157 28 157;
> #P fasten 4 0 12 0 150 157 94 157;
> #P connect 6 0 5 0;
> #P fasten 3 0 4 0 478 123 150 123;
> #P connect 5 0 4 0;
> #P connect 4 0 14 0;
> #P connect 1 0 13 0;
> #P connect 14 0 13 0;
> #P fasten 16 0 13 0 154 375 128 375 128 330 153 330;
> #P connect 14 1 13 0;
> #P fasten 4 0 18 0 150 157 169 157;
> #P fasten 1 1 17 0 239 330 250 330 250 272 158 272 158 236 169 236;
> #P connect 18 0 17 0;
> #P connect 8 0 5 1;
> #P connect 14 2 1 0;
> #P connect 2 0 15 0;
> #P hidden connect 7 0 10 0;
> #P hidden connect 9 0 10 0;
> #P pop;
>
>
> Any help would be awesome, just basic guidance of getting it onto the
plane would rock, I know how to move them around and stuff..
>
>
>
>


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