mesh into matrix

Dec 6, 2010 at 5:49pm

mesh into matrix

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!!

#53721
Dec 6, 2010 at 6:55pm

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

– Pasted Max Patch, click to expand. –
#193242
Dec 6, 2010 at 7:59pm

perfect, thanks a lot! :)

#193243
Dec 6, 2010 at 8:15pm

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..

#193244
Dec 7, 2010 at 10:46am

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.

Thanks

– Pasted Max Patch, click to expand. –
#193245
Dec 7, 2010 at 6:18pm

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.

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

– Pasted Max Patch, click to expand. –
#193246
Dec 7, 2010 at 10:03pm

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?

#193247
Dec 8, 2010 at 6:28pm

none i can think of. thanks for the report.

#193248

You must be logged in to reply to this topic.