Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - MrYogi

Pages: [1]
1
Support / integrating JPCT-ae with QCAR(vuforia)
« on: October 18, 2012, 03:27:11 pm »
Hi All

i know what i am going to ask is already discussed sometimes in this forum but after going through all of them i can't found my complete answer so i am asking it in a new thread.

when i tried integrating JPCT with QCAR all goes well as expected, i got my modelview matrix from renderframe from jni and successfully transferred that in java to jpct model is shown perfectly as expected. but when i tried to pass this matrix to JPCT world camera my model disappear.

my code:in onsurfacechanged:
Code: [Select]
world = new World();
world.setAmbientLight(20, 20, 20);
sun = new Light(world);
sun.setIntensity(250, 250, 250);
cube = Primitives.getCube(1);
cube.calcTextureWrapSpherical();
cube.strip();
cube.build();
world.addObject(cube);
cam = world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 10);
cam.lookAt(cube.getTransformedCenter());
SimpleVector sv = new SimpleVector();
sv.set(cube.getTransformedCenter());
sv.y -= 100;
sv.z -= 100;
sun.setPosition(sv);
MemoryHelper.compact();

and in ondraw:
Code: [Select]
com.threed.jpct.Matrix mResult = new com.threed.jpct.Matrix();
mResult.setDump(modelviewMatrix );  //modelviewMatrix i get from Qcar
cube.setRotationMatrix(mResult);
cam.setBack(mResult);
                         fb.clear(back);
world.renderScene(fb);
world.draw(fb);
fb.display();

after some research i found that QCAR uses a right-handed coordinate system meaning that the X positive goes right, the Y positive goes up and the Z positive comes out of screen but in JPCT coordinate system the X positive goes right, the Y positive goes down and the Z positive goes into the screen.

so please suggest me what i am missing here?

2
Support / proper tutorial for model animation
« on: June 20, 2012, 08:03:08 am »
hi all,
I gone through forum and wiki for finding how can I animate my models specially md2 with in build animation but finally got bit confused.
I used  model.animate() but no result. can anyone simply suggest how to use in build multiple animations of md2.
and another question ,my md2 models are not fully rendering some small portions are transparent ,what could be reason for that?
thanks in advance

3
Support / how to pass modelviewmatrix to get proper rendering
« on: June 19, 2012, 09:26:51 am »
hi friends,
i am trying to attach Jpct on top of Qcar so that after image detection rendering is done by Jpct according to the matrix of Qcar.i'm somewhat successful as the model position is now responsive to the image detected on setting the matrix in cam.setBack() but still somewhat misplaced ,it's look like inverted on z-axis and shifted on x-axis , flattens or something like that.
i'm new to Jpct so it's more or less like try n error to me .
anyone have an idea that which is the best way to do this?after googling i found that someone suggested to pass matrix to rotation matrix of the object but i can't get that.
plz help me out of this,i saw many of you done similar to this.
thanks in advance 

4
Support / problem in combining jpct with Qcar
« on: June 18, 2012, 07:46:53 am »
framebuffer fill error when i tried to combine jpct with Qcar.
i used sample of jpct but following error comes while rendering
Code: [Select]
06-18 11:05:00.578: E/AndroidRuntime(6524): java.lang.ArrayIndexOutOfBoundsException
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:1159)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:145)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.World.compile(World.java:1911)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.World.renderScene(World.java:1035)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.qualcomm.QCARSamples.ImageTargets.jpct.onDrawFrame(Jpct.java:85)

can anyone tell why this is happening ,since i am new to jpct.
Jpct is seemed to be very promising rendering library as far as i known yet,so plz help me out,i'm stuck at this
thanks in advance :-[

Pages: [1]