How to use plato vs gridshape objects? - More importantly when.

enki's icon

I was trying to compare plato and gridshape objects, but I got stuck before even creating any variations in the gridshape.

I was curious about the pros and cons of each method. Are there any benefits to using Platonic solids over grid shapes? Pro's cons, circumstances etc. Is there an article about this question?

Often I feel there has been some advancement in the maxmsp landscape and cycling74 provides a "now you can do it this way" announcement, with no analysis of pros and cons of the old way. Which I understand the experts don't need, but the student/dilettante doesn't see the nuance at face value. e.g. jit.bfg vs jit.gl.bfg. (I don't know which circumstances call for one over the other. Ok I know one uses the GPU, but..when am I not using the GPU? I have eyes and I work with a monitor. thus am I not always using the GPU, and cpu for that matter?)

It would be nice if there was a "Here's the old way, and here are its limitation. Now here is the new way and here are its benefits over the old way. though it has these new limitations. But (perhaps) in this particular way the old way is still better, because of a, b, c.

I write all this because we learn not only by demonstration of ability but by comparison.

Personally I would love the help guides to have 4 type of groups. Basics, Intermediate, Advanced, Comparison to legacy, and a link to further discussion. Make that 5 groups..my mistake (aFoD -I'm the mule in this reference.)

Back to the setup problem: why is it that a sphere appears with this patch at first, then disappears as soon as I try to change any parameters of the gridshape?

Is it a layer thing, a name thing, both, something else?

Thanks time and attention,

-Enki

Max Patch
Copy patch and select New From Clipboard in Max.

👽!t W∆s ∆lienz!👽's icon

The main difference between 'plato' and 'gridshape' is that they offer different basic geometry shapes(albeit, both offer the same 'cube').

Are there any benefits to using Platonic solids over grid shapes?

There are no 'benefits' to using one over the other aside from what you want to start from to create whatever visual you want. (I understand, though, that it can be confusing at first for beginners because when i first started out, i thought i could create 'platonic' solids from gridshape by reducing 'dim' attribute to '4,4' and then when you draw 'sphere' or 'circle', you get something akin to triangle-based shapes, but they aren't really the same as the pure tetrahedron that 'plato' can create.)

So, for example, if you were working on the movie, 'Tron'(the original from the 1980s) and needed to create the little character known as a 'bit'(which only answered 'Yes' or 'No'), you could start with 'plato' to create the basic 'icosahedron' and 'octahedron'(not that these are exactly the shape they used, doing a search for what they used, it is described as 'complex polyhedra, with its neutral blue form being a morphing combination of a dodecahedron and an icosahedron (the compound), transforming into a yellow octahedron for "yes," and a spiky red icosahedron (the second stellation) for "no"'... although i'm not sure how you'd create the 'second stellation' but just to give an example of why you might opt for jit.gl.plato over jit.gl.gridshape to start from).

when am I not using the GPU? I have eyes and I work with a monitor. thus am I not always using the GPU, and cpu for that matter?

you are not using the GPU whenever you want to 'effect' regular video matrices. not all computers use the GPU for every visual drawn to your monitor. some people just want to edit and effect video files, or even video streamed from the camera: these don't use the GPU. old-school VJ effects are all available on the regular non-GPU jitter objects. furthermore, there are operations on matrices that people can use for audio or other types of data-flow where they might actually save computing resources by keeping them on the CPU(translating from CPU to GPU and then back again is costly). i suppose that's one of the best examples: if you use 'jit.grab' to capture video from an external source('external' includes your computer's built-in cam), you might only need to keep it on the CPU if you don't need to effect it using GPU-based methods, or you just want to grab visual from your cam to use it as a dataset to inform other processes which don't always involve visuals(i believe it's been described somewhere here on the forums: translating from GPU back to CPU can be most costly).

e.g. jit.bfg vs jit.gl.bfg...

It would be nice if there was a "Here's the old way, and here are its limitation. Now here is the new way and here are its benefits over the old way. though it has these new limitations. But (perhaps) in this particular way the old way is still better, because of a, b, c.

I can agree "it would be nice" but i'm guessing they don't have that for every little thing, because each thing will require a different explanation. in the case of 'bfg', these are procedural noise functions which people find useful for a mutliplicity of use-cases. If you simply think of it like a matrix can be used as a 'dataset'(not just as a visual), you'll start to comprehend how some might need to keep that 'dataset' on the CPU for other CPU-based calculations, and others might want to have that on the GPU for calculations that benefit from the shader-based calculations available there(even when working with pure-visuals, both have a slightly different look, and that makes an explanation even harder to come by, because the 'use-value' over the mere difference of 'look' can simply be a matter of subjective taste).

Back to the setup problem: why is it that a sphere appears with this patch at first, then disappears as soon as I try to change any parameters of the gridshape? Is it a layer thing, a name thing, both, something else?

I don't have this experience with your patch, i'm not sure why, it could be that i'm changing the parameters in smaller increments(say... "+/- 0.01" at a time on the 'pos' attribute, and i can still see both). Try adding the 'scale' attribute, too, this might help you see them both. But i would add, that if you're losing track of one, it might actually be a 'layer' thing, as they both start at the same position, and so one can end up masking the other depending on where you're moving it to, or how small you make it, or whether one is solid while the other is drawn using lines or points, etc. etc. etc.(not to be confused with the term 'layer' as it applies to jit.gl.layer, nor the 'layer' attribute... here i'm simply referring to the fact that 'visually' speaking they are layered on top of each other, so that the position of their objects' vertices might interfere with the drawing of each other in certain positions... then again, this can actually sometimes be discerned using the 'layer' attribute, but often, just visually speaking, you'll want to adjust 'scale' and 'position' to be able to see both at the same time: you can't see two objects at the same time, wherever their vertices occupy the same exact position).

Hope all that helps and makes sense. I am no expert, but as a beginner/intermediate jitter user, i've found some of these differences to be daunting in comprehending at first, as well.

Whenever i get frustrated, there have often been times when i could go to Federico Foderaro's tutorials and get some sort of enlightening answer(even if your exact questions might not be answered by a specific video, you'll find his videos will get you further on your way... i think in the case of CPU vs. GPU, he does actually explain some of that in various videos). Try here to start with:

Matteo Marson, also has stuff to help you get more advanced, although there's more on the subscription part of the Patreon, there's quite a bit in the free section to start with:

and there are others here on the forums who have written good explanations of these differences. It's just a matter of searching around. Hopefully someday, Cycling74 might consolidate all this information into further tutorials available directly from this site, but rest assured the answers are out there, even now, somewhere.

Best of luck.

enki's icon

Alienz, thank you for your wonderfully in depth reply.

I Love the tron idea. I'll play with that.

In the patch attached if you hit the toggle for "Output matrix and draw mesh", it will hide the gridshape and it won't come back till you restart the patch. Not sure why.

Thanks again.

👽!t W∆s ∆lienz!👽's icon

In the patch attached if you hit the toggle for "Output matrix and draw mesh", it will hide the gridshape and it won't come back till you restart the patch. Not sure why.

oh, i see now, this is because anytime you output a matrix, you are passing on the matrix information to be drawn by some other object which will take the data regarding spatial positioning of vertices and draw the geometry using that information. my description here is incomplete, though, because there's many ways this information can be used by certain objects(in addition, 'jit.world' can output a matrix while also drawing at the same time, but this is the only object i know of that does both in that way, probably because it's often used to monitor the final/overall visuals while also passing the matrix on for other purposes) ... you can check out the [jit.gl.mesh] object's helpfile to see more on how it can utilize that information in different ways(the [jit.gl.gridshape] helpfile also shows these two interacting in this way, maybe that's where you copied that particular interaction from, but perhaps that also added to the confusion since [jit.gl.gridshape] doesn't require 'matrixoutput' into [jit.gl.mesh] by default in order to have anything drawn to the drawing-context/viewing-window).

basically, for [jit.gl.gridshape] object to draw to the drawing-context window directly, 'matrixoutput' should be left 'off', otherwise, you would want to attach an object such as [jit.gl.mesh] to its left-most outlet, then [jit.gl.mesh] will draw the geometry to the drawing-context using that matrix information... here's an example:

Max Patch
Copy patch and select New From Clipboard in Max.

^if you turn 'matrixoutput' to 'on' in the patch i posted above(a simple modification of your patch), you'll notice the sphere remains drawn. if you then delete the [jit.gl.mesh] object while 'matrixoutput' is left 'on', you'll see the sphere disappear again because the matrix is no longer being passed to an appropriate object that can draw it.

enki's icon

Aliens, thanks for all your help. I got this far, with a few more tutorials linked in the patch. Not sure what is happening with lighting nor smoothing bfg, nor controlling individual facets.

I had forgotten about Trons bit response. neat.

Max Patch
Copy patch and select New From Clipboard in Max.