Re: OpenGL - Another beta.
Hi. Yes.
First, load the object into a display list (Display list->OBJ bla bla)
Then, ALWAYS do this:
* Matrix->Translate 0, 0, -distance
* Matrix->Rotate for your rotation
* Display lists -> Call display list 0
The extension comes with an example on .OBJ files. Open OBJGLSL.mfa, if you need to - Skip the GLSL part, it's for some effects.
http://looki.lo.funpic.de/OpenGL.zip
Re: OpenGL - Another beta.
Ok, il give it ago when i arrive home from work. And using this, i wont get gimbal lock? The roatations are local to the object?
Andy
Re: OpenGL - Another beta.
Yes (If the object is in the center of its local coordinate space.)
Re: OpenGL - Another beta.
Ok, Cheers, ill try and see how i get on.
Andy
Re: OpenGL - Another beta.
Just wondering, as i know all this is hard work, and is appriciated. But.. are you lookingat more file formats for the very near future? wavefront really is a pain. Like i said, im sure you've made it so obj's can only be loaded for now for a perticular reason. But just wondering if theres any plans soon for more file formats.
I have 2 3d modeling software, 1 exports to .obj but doesnt export textures, the other doesnt even export to obj.
Eveytime i come back to use MMF i end up in this sceniro, where 2 obejcts "could be perfect for the job" but arnt! lol. 3D mesh would be spot on... but cant do roll, yaw and pitch.
openGL can, but currently supports only obj, which im finding a pain.
cheers
Andy
Re: OpenGL - Another beta.
Hey, I'm not really working on this anymore :(
I'm not so experienced in OpenGL programming and programming in general, so I abandoned the whole project.
Also, why can't 3d mesh do roll yaw and pitch? Of course it can! Rotate around X,Y and Z.
Re: OpenGL - Another beta.
hmm.. i think this might actually answer the original question above about if opengl can.
Are you aware of Gimbal Lock? try and make your self a quick example in 3d mesh. and try to make a object successfully roll, pitch and yaw without getting Gimbal Lock. (where 1 axis turns into another axis)
Cheers
Andy
Re: OpenGL - Another beta.
Ah, that! Sorry, You can't do that in OpenGL either.
It should not be so hard to avoid this effect using some trigonometry, though. I think there's an OpenGL functions to avoid this, but I'm not sure.
Re: OpenGL - Another beta.
Hmm apparnelty the math to do so is Quaternion. Even sounds tricky! lol.
Andy
Re: OpenGL - Another beta.
I think i found a bug -
Seems as if Y rotation works on X axis, not sure if im right but i would expect it to not rotate on the X axis.
X is set to 0 and Y has timer/20.0 but when running i see the ball rotating on the X axis.
Edit - yeah it seems as if X and Y are swapped for the rotation option.