How do I import 3D models with jit.gl.model with colouring and control them with a Leap Motion Controller
Hi All,
I'm trying to import a lightsaber 3D model in my max patch with jit.gl.model but there is no colouring on the lightsaber and I want to be able to control the the motion of the 3D model with the Leap Motion Controller. Does anyone have any suggestions where to start?
Thanks!
What type of file is it? Does it have a material?
Hi QAT, it's .obj file
Cheers
jit.gl.model supports obj but you have to tell it where the texture file is. Just use jit.gl.texture to load the texture file and give it a name (@name texturename). Then reference that name in jit.gl.model (@texture texturename). As far as motion , the jit.gl.model help file has some good stuff in it. And I think there is 3rd party external for the LeapMotion.
Hi CC,
Thanks for the response. I have a few issues if you could further assist me with them.
So I created a message object with "importmovie initialShadingGroup_albedo.jpeg, bang" in it cause that's my texture file and then connected that to the jit.matrix object. Then I connected the jit.pwindow object below to display the texture file and lastly connected it to the jit.gl.texture object with @name texturename as the argument.
Questions (issues)
1) The issue is when I click the message object nothing displays in jit.pwindow? The only way I can get the jpg file to display is by creating another importmovie message box and opening the jpg file manually.
2) My second question is how do I import multiple textures rather than just one? Do I have to duplicate the message box, jit.matrix, jit.pwindow and jit.gl.texture @name texturename for loading in another texture? And of course change the texturename argument and use different jpg files.
3) Also within my max patch how do I read the file path of my 3D model object? As you can see under "3D Weapon Models" title I have in the first message box "read Desktop/Interaction Design and The Sonic Arts 2/Major Project/Max Patches/Lightsaber1.dae" which when I click the message box it doesn't display the object in the big jit.pwindow display. The message is being sent straight to jit.gl.model but nothing happens unless I use another message box with "read" and open up the 3D model manually.
Thanks for you time,
Cheers,
Hi again,
Sorry I sorted out question 1) and 3) the files just needed to be in the exact same folder as my max patch. But adding to my question 2) Also multiple textures need to be applied to different weapon models as well and so they don't collide with each other as there anyway to group them?
Cheers,