Moving Axis of Rotation with openGL in Jitter?

May 20, 2013 at 3:15pm

Moving Axis of Rotation with openGL in Jitter?

Hey all,

I’m fairly new to Max/Msp, and I’m trying to do some simple 3D animation work with Jitter.
I’ve loaded some 3D Models with some jit.gl objects, and I think I have a pretty good idea of what’s going on with my patch. However, despite searching through tutorials and online, I can’t seem to figure out how to move the origin of my model. I want it to spin on its center, and it’s axis of rotation is stuck in the corner. How do I move the origin point/axis of rotation/ center pivot? It should be simple but I really can’t find anything on it…

Bonus question: I rendered out a .obj file that works nicely in jitter. However, the .mtl file, the textures that go with it, aren’t loading. How do I load them with the model?

Thanks all, I appreciate your time!!

-Alex

#249994
May 20, 2013 at 5:14pm

look at the @anchor attribute of most jit.gl objects.

post your model files, and i’ll see if i can figure out why the textures aren’t loading.

#250013
May 21, 2013 at 5:03am

Hey Rob,

Thanks for your reply. The @anchor attribute is behaving..not as I’d expect. If I add it to the jit.gl.handle object, I can move the anchor but it has no effect on the actual origin of the model, simply the origin of the handle. And if I apply the same @anchor attribute to jit.gl.model, my model disappears. Not really sure why.

Also, I’m using a simple “turn” argument with a jit.anim.drive object. This works, but the axes in which the object turns doesn’t ascribe to the axes defined by jit.gl.model or jit.gl.handle. When I moved the object in the view with the mouse, that doesn’t change the axes of rotation. So I suppose jit.anim.drive moves it on a world axis. Is it possible to make jit.anim.drive rotate the object on it’s own axis?

I’d post the model here but the .obj file is 46 MB

Thanks again for your time

#250037
May 21, 2013 at 7:18am

Alright so I figured out that I can attach an “attrui” object to my jit.gl.model object to select from a list of possible attributes, one of which is the “animmode” attribute which lets me switch the world mode to local, fixing my axes problem.

There are still other problems to solve but I’ll try to do that on my own.

Thanks!!

#250057

You must be logged in to reply to this topic.