jitter OBJ files seperating when drawn to a mesh?

Isaac Martin's icon

I'm trying to do a jitter project with a jit.gl.model object, however when I draw the model to a matrix it separates the render into 3 seperate parts that I have to flip through using the drawgroup attrui. when I want the complete model to do distortions to. any advice? thanks

Herr Markant's icon

Set [drawgroup 0] in gl.model.

Isaac Martin's icon

I tried that but it worked like it was on drawgroup 1

Matteo Marson's icon

Hi Isaac,

When a model has multiple drawgroups, and you're using @matrixoutput > 0, jit.gl.model sends out a separate matrix for each drawgroup. You can verify it by putting a print object after jit.gl.model:

You see just the first drawgroup even with @drawgroup 0 because it's the last sent out by jit.gl.model.

To render them all using a single jit.gl.mesh, you have to merge the drawgroups into a single matrix. You can do it in several ways with JS or standard Max programming. This could be a way to go:

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

Hope it helps, cheers!


Rob Ramirez's icon

You can use the concat.drawgroups abstraction for this:

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


Herr Markant's icon

[concat.drawgroups] ? wow, nice trick, this is new to me.. would be great to mention in the docs.

thx Markus