"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

Replace 3D model with different 3D model

Hi guys!

I ve browsed the forum but havent found any satisfying solution on how to replace 3D model with another 3D model in ImageTargets project. A lot of you managed to do this somehow, so could you pls tell me (or show a sample) which exact steps are needed to do it ? 

Thanks a lot.

AlessandroB

Wed, 10/17/2012 - 17:08

Hi again hoaxman,
so I tried to replicate your issue, creating a mesh in Blender (a simple cube in my case), then exporting the mesh to OBJ,
and finally converting the OBJ to an OpenGL header file (.h) using the obj2opengl.pl script, same procedure you did, if I understand right.

Hi, if you are fine with some "flat" solid colouring, you can achieve this by doing the following:

- open the CubeShader.h file

- replace this line:

   gl_FragColor = texture2D(texSampler2D, texCoord);

   with this:

hi AL, actually there is no reason why i use OPENGL 1, just for try and error.

and now i figure out the problem is, my object won't appear if far from the light

and when i try to light place the object appear clearly, could you give a reason why ?

 

thanks

Dear  Al,

When i try to convert 3D objek (obj) to .h file it's look fine, and i tried for once.

and now i'm trying to replace with another objek (ex: book.obj) i convert to .h file with opengl,

i put it into imagetarget.cpp

#include "book.h"