Matrix output from jit.gl.mesh (2015 update?)

lightspeed.johnny's icon

This thread here from back in 2012 seems to indicate that matrixoutput doesn't work from jit.gl.mesh:

Is this still the case? (I am assuming so, as I can't get a matrix out from jit.gl.mesh - boo).

If this is the case (that we can't use matrixoutput) from jit.gl.mesh, what are the alternatives for processing an arbitrary set of 3D coords with rotational matrices and getting the resulting output matrix?

I don't have a patch to share at the moment - but here is a general block diagram of what I am trying to do:

Which doesn't seem like an option... so maybe I have to do something like this:

Do I have to use manual 3D rotation jit.expr equations?

Update: Code blocks changed to wireframe images

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

you can use jit.gen to perform your rotation, like so:

lightspeed.johnny's icon

You rock! I think there is enough info in that example to keep me quiet for a long time! :)

One small question about performance before I go... does jit.gen code compile to native, or is it running in some kind of VM? i.e. will the performance be the same doing the matrix math in jit.gen as it would expanding out the matrix equations and using jit.expr? The jit.gen route looks a lot cleaner as long as the performance is good.

Update: After digging around a bit, it looks like jit.gen code is natively compiled - that's some fine work you guys have done there. I guess I need to dive into jit.gen a bit as it seems like that is where I am going to be spending a lot of my time. There is a bullet point in the docs that states "gen is a replacement for jit.expr with performance and interface improvements" - but doesn't go much into detail about how jit.gen gives better performance than jit.expr... More diving is needed...