By ullash.podder
on Tue, 01/22/2013 - 08:01
Ok guys i went through a lot of ontopic posts,but none fix me,I'm working on the ImageTarget sample project
i replaced the image target,was trying to replace the 3D model with some free collected 3D model
i did choose the famous banana.h, and its texture,the texture loaded easily
const char* textureFilenames[] = { "banana.png" // "TextureTeapotBrass.png", };
I did change the cordinates of model inside setup3dObjects method,with banana's.
for (int i=0; i < [textures count]; i++) { Object3D *obj3D = [[Object3D alloc] init]; obj3D.numVertices = bananaNumVerts; obj3D.vertices = bananaVerts; obj3D.normals = bananaNormals; obj3D.texCoords = bananaTexCoords; // obj3D.numIndices = NUM_TEAPOT_OBJECT_INDEX; // obj3D.indices = teapotIndices; obj3D.texture = [textures objectAtIndex:i]; NSLog(@"obj width:%d",obj3D.texture.width); [objects3D addObject:obj3D]; [obj3D release]; }
The dataset loaded successfully,the target was identifyed and also the frame rendered, i printed the obj3D's(the rendering 3D model) properties inside renderFrameQCAR,it's printing.
The problem is,there's no banana is on screen...! i think i'm missing something silly, anyone point me please, i'm going mad
different 3D model not shown
HI ullash,
different 3D model not shown
@ ullash.podder:
one thing you may want to check is the scale factor applied to your mesh; sometimes a model does not show up just because it is too small compared to the scale of your image target;
different 3D model not shown
Hi P.Uthaman i got some responses with your suggestion, they texture appears but structure gone,i'm gonna fix this tell me o
different 3D model not shown
Hi ullash,
the code
different 3D model not shown
Hi AlessandroB,
yes i'm using openGL 2,but the matter of worry is,when i use
different 3D model not shown
Hi, can you check what "arrays" are defined in your Banana.h header?
(verts array, normals array ?, tex coords array ?)
different 3D model not shown
hi AlessandroB
sorry as it was not working i switched to different project lately,i had to come back to this
the banana.h file got
unsigned int bananaNumVerts, float bananaVerts [ ], float bananaNormals [ ], float bananaTexCoords [ ]
different 3D model not shown
Hi, thanks for the update:
to make it work you should then use those arrays in your OpenGL code, something like this:
different 3D model not shown
Hi i tried it this doesn't show the model,doesn't error as well,and the renderFrameQCAR method prints this log , NSLog(@"text%d",obj3D.texture.width);
so its getting right texture. do i have problems with cordinates?
different 3D model not shown
Hi, first, a little question about your code:
different 3D model not shown
i was very frustrated,i don't know how to thank you... it worked...u kinda saved me man...! thanks a lotttt
different 3D model not shown
Oh, great! You're welcome.
I am finding difficulty in
I am finding difficulty in java code of the same can you please help me out.i cant see the banana model .And not getting how to change kobjectscale.