"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

How can i change the 3d object ?

Hi,

i had tested and run the imageTargeted file. I am happy that the teapot is shown when i pointed the camera to the marker.

However, i would like to ask, is it possible to change the 3d object?

Can i change the teapot into my desired object?

What should i do?

Is there any step-to-step guidance for the tutorial? I have no idea at all.

Thanks for your help.

AlessandroB

Tue, 03/05/2013 - 16:39

Hi, yes you can change the teapot;

here is an article explainin how to do that step-by-step:

https://developer.vuforia.com/resources/dev-guide/replacing-teapot

 

[quote=AlessandroB]

Hi, if you read the tutorial throught the end, it will also show you how to change the OpenGL code so not use the indices

(see glDrawArrays() function at the end of the article)

[/quote]

 

Hi Alessandro...

If the texture is mis-positioned it, I would assume the texture coordinates are not fully exact.

Doe the model look much different if you open it with a 3D modeler ?

Another reason could be that the texture is just flipped vertically (i.e. it could be that it is upside-down);

Hi, the Z axis is orthogonal to the trackable plane, while the x and y are aligned with the trackable plane;

if you want to make your model stand, you can try rotating it around X or Y, for instance, a 90 degrees rotation around X would be:

 

[quote=AlessandroB]

Hi, the Z axis is orthogonal to the trackable plane, while the x and y are aligned with the trackable plane;

if you want to make your model stand, you can try rotating it around X or Y, for instance, a 90 degrees rotation around X would be:

 

Hi, you can add as many rotations as you want, this should not cause any crash;

if you get a crash, that might be because of some other reasons; for instance, have you tried adding those rotations to the ImageTargets sample without any other code modifications ? that should work.

Where should I put the code :
 

float angle = 90.0f;
    SampleUtils::rotatePoseMatrix(angle, 1.0f, 0.0f, 0.0f, &modelViewMatrix.data[0]);

 

for rotating the object 90 degrees  in file ImageTarget.cpp?