Different draw modes in jit.gl.mesh

Walter Corneli's icon

Hi everybody,
I'm new in jitter and I don't know how to set different draw_modes in the jit.gl.mesh object. What I've tried to do is to send two spheres from jit.gl.gridshape to jit.gl.mesh but drawn with different modes, for example, one in tri_grid and one in points, and fade between them with jit.xfade.
Is it possible? I've also tried to create two jit.gl.mesh connected to the same jit.gl.gridshape, each one with different draw_mode, I've set @matrixoutput to 1 and sent all to jit.gen in order to create the fade but it doesn't work. Could anyone help me?

p.s.: sorry for my bad english

daddymax's icon

Dont send two spheres with different draw modes to one mesh, send the sphere to two mesh objects each with different draw modes. You could then mix between them using alpha?

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

Walter Corneli's icon

Hi Daddymax,
thanks for the answer, but I don't want to fade between them using alpha. I'd move gradually from one shape to another by changing the draw mode at the same time. I've attached you a patch that should explain better what I mean with some comments.

Draw_mode_fade.maxpat
Max Patch
daddymax's icon

Ok - the bad news is that you send the matrix to the mesh, and that defines the shape, but is separate from the draw mode. A draw mode cant be xfaded like that - its either one draw mode or another. This is the reason i used two layered objects that you could fade between. You could make it so that whenn your xfade is >0.5, it suddenly switches to one draw mode, and < 0.5 its on another - it an on/off kind of thing.

if you combined both of our patches, it might work - xfade the matrix that defines the shape, and use a second xfade to control the xfade between the two layered shapes (using the same control), it would let you get the same effect.