Log in or register to post comments

Is there any specifications for obj file?

April 1, 2012 - 5:27am #1

when i import my own object and increasing the scale i find that my object is rotated and wasn't anchored on the marker (like teapot)
please tell me if there any specifications for obj file to work fine with SDK like teapot example

Thank you,

Re: Is there any specifications for obj file?

April 2, 2012 - 8:08am #2

Vuforia uses a Z-up coordinate system. You may be able choose that as a setting when exporting your model. If not, it should be pretty easy to rotate the model programatically. For instance this would rotate 90 degrees around the X axis:

SampleUtils::rotatePoseMatrix(90.0f, 1, 0, 0,
                              &modelViewMatrix.data[0]);

I also suggest making your objects sit cleanly on the origin in your modeling program. Our samples include a translate because the teapot is centered on the origin, rather than sitting on it:

SampleUtils::translatePoseMatrix(0.0f, 0.0f, kObjectScale,
                                 &modelViewMatrix.data[0]);

If your model is sitting on the origin you can get rid of this translate.

- Kim

Log in or register to post comments