reconstructing jit.gl.models with jit.gl.mesh from jit.matrix binary files

Dec 14, 2011 at 9:41pm

reconstructing jit.gl.models with jit.gl.mesh from jit.matrix binary files

Basically I’m trying to read models, write to jitter binary, and re-load models from only that jitter binary and texture files.

Looking at an example I found on the forums from just over a year ago, it looks like it’s possible to reconstruct a model but perhaps Max 6 handles this in a better way than before? Does Matrixoutput still only handle 1 drawgroup at a time? Is there a way of querying the total number of drawgroups from a currently loaded model?

If someone can please have a look at the example below and look closely at the Dwarf’s Axe, it seems to have a texture re-applied to the Axe. Is this just a result of how the patch is set up? Or is this an inherent limitation of the process of reconstructing an image with jit.gl.mesh?

Any help is appreciated! Would love to finally master this…

– Pasted Max Patch, click to expand. –
#60674
Dec 14, 2011 at 11:19pm

Does Matrixoutput still only handle 1 drawgroup at a time?

yes, each drawgroup is output as a separate matrix.

Is there a way of querying the total number of drawgroups from a currently loaded model?

yes, the “numgroups” attribute.

If someone can please have a look at the example below and look closely at the Dwarf's Axe, it seems to have a texture re-applied to the Axe. Is this just a result of how the patch is set up?

it looks like your patch is telling the gl.mesh to use a texture, and the axe mesh should not be textured.
you can learn this by sending the message “getmaterial_dict” to the gl.model, followed by the drawgroup index.
the gl.model will output the message “material_dict” followed by a named dictionary, that has all the relevant material information for that particular mesh-group.

i could perhaps offer some advice if you let me know a little more of why you are tying to do this.

#218407

You must be logged in to reply to this topic.