By werther
on Fri, 05/23/2014 - 20:28
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.
Replace 3D model with different 3D model
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.
Replace 3D model with different 3D model
thx for reply alesandro :D
and i have followed your instruction..
Replace 3D model with different 3D model
Hi hoaxman, you see triangles and not squares because you did not disable GL_CULL_FACE;
Hi all, thanks to everybody
Hi all,
thanks to everybody for the useful help.
I followed all the suggestions in this thread and I got my simple 3D object on screen.
Hi, if you are fine with some
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:
Replace 3D model with different 3D model
Hi, thanks for your andwer.
Yes, i already tried that solution but I would actually need something a bit nicer (such as lighting, material, diffusion). I know here the problem is that I'm not good at all with OpenGL.
Hi, in order to enable
Hi, in order to enable basic lighting (diffuse) effects, the vertex and fragment shaders must be modified as follows:
static const char* cubeMeshVertexShader = " \
attribute vec4 vertexPosition; \
Replace 3D model with different 3D model
dear Al
Replace 3D model with different 3D model
hi Al, i follow all instrution below, and i changed my objek to banana.
i did this :
Replace 3D model with different 3D model
Hi, have a look here, everything is explained in detail:
https://developer.vuforia.com/forum/faq/android-how-do-i-replace-teapot
Replace 3D model with different 3D model
i've done with the instruction you gave me.
1. i set the USE_OPENGL_ES_1_1 flag to true
Replace 3D model with different 3D model
Dear Al,
Now all of object disapear...(teapot and banana)
i try re-import the project
rebuild with ndk-build
refresh
still nothing show..
please help me..
thanks
Replace 3D model with different 3D model
Is there a reason why you are using OpenGL ES 1.0 ?
You should always use OpenGL ES 2.0, unless your are targeting very old devices that might not support 2.0.
Replace 3D model with different 3D model
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
Replace 3D model with different 3D model
my object won't appear if far from the light
Replace 3D model with different 3D model
hi Al, what i mean with "far from light" is lack of light / dark light
so when i stand in the dark light posistion, the object won't appear.
and could you please tell me the different and function of this two script
Replace 3D model with different 3D model
Hi,
so, if you are referring to the lighting condition of your environment (e.g. the room where you are doing your tests),
Replace 3D model with different 3D model
[quote=AlessandroB]
Concerning the OpenGL code below, the only difference is that the first will render the teapot mesh, and the second will render the banana mesh.
[/quote]
Replace 3D model with different 3D model
ok i got that point, but the big different which i saw is in part "
Replace 3D model with different 3D model
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"
Replace 3D model with different 3D model