Max&MSP Jitter Learning 1 – 3D
- June 30th, 2011
- Write comment
In this blog, I would introduce some basic points of Max&MSP 3D works and the effects of the project. According to the theme “Fragment”, I would focus on the particle system in Max&MSP.
As for 3D works, firstly, we should know most of the 3D data should be save in “jit.matrix” object, and then showed in “jit.pwindow” or “jit.window”.
To learn matrix, the most two basic concepts are “dim”(dimension) and “panel”. For example, we could make a 2*2 or 2*3*4 matrix which may could describe x*y (2d, 2 dimensions) or x*y*z (3d, 3 dimensions) works. The 3*3 matrix has 9 cells, and each one contains some “panels”. User could define the counts of panels, but for most cases, for graphic works, the panels contain the color data. For instance, four panels could presents alpha, red, green, blue values.
For lots of beautiful artworks, particle system is the key point. In Max&MSP, we could use “jit.p.shiva” and “jit.p.vishnu” to produce particles.
First, jit.p.shiva need a N*2 matrix as input, in each cell, there 5 panels. N means the maximum of particles, I still don’t understand what’s the 2 means, but in the test, when N = 2, the cell [X, 1]’s value equals to the content of the next [X, 0], so I guess the [X, 1] saves the next position of the [X, 0] particle.
As for the five panels, the first one usually indicates the ID of particle, and the second one relates to each particle’s life, the last three one is the position’s X, Y, and Z value. Other attributes would be introduced in the following blog, but not this one.
Then, most of 3D work would be produced by “jit.gl.render” object. The simplest architect could be seen in last patch, using “t”(trigger) to output any input received in order from right to left to output “matrix data”, “bang” and “erase” signals from right to left. The erase signal is used to refresh the background of the painting.
Most shape could use jit.gl.gridshape to create.
Using jit.gradient could make gradient effect.
The jit.gl.nurbs could used to render a Non-Uniform Rational B-Spline (NURBS) surface. In the project, the animation of each particles could be made by this object.
The jit.gl.text3d could draw text in 3d space. In this patch, I use text3d to make the effect that the text was include in the fragments.
Use jit.gl.handle to link with jit.gl.render could make the window’s perspective controlled by mouse.
Using jit.iter could get literate through all the cells of a matrix, sending a max message or list for each cell out the object’s left outlet. The silly method I used to adopt is use getcell to get the content and use setcell to rewrite the content. Before that, there also should be some control architecture to produce a loop to produce the coordinate of the matrix.
Max&MSP could use lots of patches open source to control the personal patches. For example, in this piece, we could use cv.jit to use face tracking or image tracking to control the orient of all the particles.
Finally, the effects of this piece would be:
(some skills could be learnt from http://adsr.jp/2006/12/mai_birds.php)
Besides, as I am used to the traditional oriented object programming method, the visual programming interface is quite hard for me to handle. Beside, even Max&MSP serves message box to realize some debug function, it still not convenient to do some value computing. So as I thought, in the following days, I could try to use processing or C++ to make the value computing and use OSC to send messages to Max&MSP. The advantage of Max&MSP is the strong ability to serve lots of rendering effects, and other functions complex to use programming language to do, such as camera, perspective, light, etc. Also, as the tutorial, Max&MSP is convenient to communicate with Java and JavaScript.

















