Loading multiple .OBJs into Jitter?

Valentin's icon

Hi All,

I'm using jit.gl.model to read an .OBJ file into a Max "scene" This works nicely, but I'm wondering now, how can I load many .OBJ files in without having numerous jit.gl.model objects in the patch?

i.e. is it possible to load a model into a matrix, and if so, could I load some number of models into a jit.matrixset, and just call them up by index from the matrixset as I need them? (I only need to display one model at a time, but I may use 20 or 30 during the course of running the patch)

Thanks!

Valentin

Rob Ramirez's icon

you could possibly use a jit.matrixset to store the matrixoutput of multiple jit.gl.model's, but the dimensions of the model matrices have to be identical, and you could only store a single drawgroup from the each jit.gl.model at a time.

i think a better solution would be creating a poly~ abstraction or a javascript to manage your multiple models.

alternatively, you could create 3D scene, in your 3D editor of choice and export the entire scene to collada.
you could then enable and disable the different models using the @drawgroup attr, and position them by binding them to jit.anim.node objects using the "copynodestoclipboard" feature.