Forums > Jitter

matrix output from jit.gl.sketch or js jsglsurface.js


t
January 11, 2011 | 1:33 am

Hi,

I am interested in morphing between various 3D geometry objects by simply crossfading between them using jit.xfade. You can try this by changing the values in the yellow numberbox in the patch below. In this patch I am crosafading between two matrices from jit.gl.gridshape objects. Is it possible to output the matrix from jit.gl.sketch to do the same? jit.gl.sketch has a matrix output but I don’t know how to enable it? What about getting a matrix from jsglsurface.js?

Thank you!

– Pasted Max Patch, click to expand. –

January 11, 2011 | 6:08 am

awesome with the jit.xfade!


February 5, 2013 | 11:13 pm

Also would be interested if "jit.gl.sketch" can output matrix data!

Anybody know if it’s possible?



slo
February 6, 2013 | 7:11 pm

Can the render context not be a jit.matrix?


February 6, 2013 | 8:22 pm

jit.gl.sketch does not support matrixoutput.


February 7, 2013 | 3:41 am

So I am still interested in morphing between various 3D geometry objects. How would one do that in Max?


February 7, 2013 | 11:31 am

@Rob: Thanx!
@Anthony: check out the green area of this patch and try to play with the red numbox…

– Pasted Max Patch, click to expand. –

February 7, 2013 | 5:23 pm

Ahhh I see, pretty cool. Originally I had envisioned using jit.gl.model instead of jit.gl.gridshape. Not sure if there is a way to convert the vertex data of the model into some thing "morphable". But this is very useful!

There is one question I still have… is there any way I can convert the output of this new jit.gl.renderer shape morpher to a matrix. I want to be able to send the video out a syphon connection to an external application.


February 7, 2013 | 5:35 pm

didn’t try but what’s the problem setting "@matrixoutput 1" with the jit.gl.model object? i guess it will send out it’s matrix like gridshape…. isn’t it?


February 7, 2013 | 7:12 pm

Hey folks, for some reason I am getting some strange results form the last patch that was posted. It looks like the color of the mesh lines are getting messed up. The color also seem to change when I go from fullscreen to mini window. I have attached a screenshot. I have also confirmed that the same result happens when I paste the original patch. Any ideas?

[attachment=214252,5006]

Attachments:
  1. ScreenShot20130207at12.59.18PM.png

February 7, 2013 | 8:37 pm

jit.gl.model does support matrixoutput, but it outputs triangle vertices, unlike jit.gl.gridshape which outputs tri_grid vertices.
so you can’t mix the two, and if you want to draw with jit.gl.mesh, you must set the @draw_mode to triangles.

this has been posted about many times in the forum, and a search will reveal many patches and info.

no idea what the color problems you’re seeing are about. if you can post a patch and steps to reproduce, and relevant system info, i can take a look.


February 7, 2013 | 8:38 pm

if you want to send to syphon, use a jit.gl.node to capture the output to a texture.


February 7, 2013 | 9:02 pm

Here is the patch that is exhibiting the issue, it really should not be any different than the one that was previously posted. I changed the formatting a bit. I get the same result if I use the original pasted patch.

– Pasted Max Patch, click to expand. –

February 8, 2013 | 11:13 am

Anthony: Sorry, i can’t get that color problem you say… even with the patch you’ve posted all seems ok for me…


February 8, 2013 | 2:51 pm

Hmmm that is odd. Maybe it is a graphics chipset issue. I am running OSX 10.7 on a MBP (late 2011), Max 6.08

Chipset Model: AMD Radeon HD 6770M
Type: GPU
Bus: PCIe
PCIe Lane Width: x8
VRAM (Total): 1024 MB


February 8, 2013 | 8:17 pm

It appears that the problem as something to do with jit.gl.mesh render mode.

The original line was…
jit.gl.mesh Kevin @lighting_enable 1 @scale 4. 4. 4. @poly_mode 1 2
which specifies line and point rendering.

This seems to fix things…
jit.gl.mesh Kevin @lighting_enable 1 @scale 4. 4. 4. @poly_mode 1 1

I also had to change the gl renderer erase color to something other than black.


February 12, 2013 | 5:20 pm

@Rob,
"jit.gl.model does support matrixoutput, but it outputs triangle vertices, unlike jit.gl.gridshape which outputs tri_grid vertices.
so you can’t mix the two"

Is there an easy way I can convert triangle vertices to tri_grid vertices?


February 13, 2013 | 2:52 pm

*bump*


February 13, 2013 | 6:11 pm

probably much easier to go the other way.
search google for "convert triangle strip to triangles" (tri_grid is actually GL_TRIANGLE_STRIP)


Viewing 19 posts - 1 through 19 (of 19 total)