mesh into matrix

jirko's icon

Hi,

I' cant find any info about this in the archives and I'm really stuck.
I want to process my mesh with some jit.gl.slab shaders and then pass everything into a videoplane, but I cant find the way to put all the content from my mesh into a matrix. Matrixoutput doesn't work for jit.gl.mesh..

Any help will be much appreciated!!

glBeatriz's icon

try [jit.gl.asyncread.] then feed the output matrix again into a jit.gl.slab

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

jirko's icon

perfect, thanks a lot! :)

jirko's icon

mmm, one little issue.. I'm processing the mesh with slab and then I pass everything inside a videoplane, but the original mesh is still visible and if I turn automatic to 0 (on the mesh) I get a black screen..

jirko's icon

here is a small example patch to show what I mean, if I put the mesh to automatic 0 the output of the videoplane also disappears.
sure I'm missing something.

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

Thanks

Rob Ramirez's icon

while your method does work, you really only want to readback opengl to a matrix if you want to do further matrix processing or recording to disk.

the "proper" way to do what you've described is to capture to texture with the @capture attribute on your gl.mesh.

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

here's your patch modified to demonstrate capturing to texture. it will be much more efficient than using asyncread.

Jesse's icon

Robert - thanks for this example. Any reason why @capture is not documented in the help or reference files for jit.gl.mesh or the generic OB3D?

Rob Ramirez's icon

none i can think of. thanks for the report.