Log in or register to post comments

Vuforia SDK + jPCT

March 6, 2012 - 10:30pm #1

Hi,

I wanted to know if someone here has worked with both jPCT 3d engine and the Vuforia sdk. What I'm trying to do
is an AR application with fiducial markers, using Vuforia to track the markers and jPCT to render objects on top of those markers.

If anyone has had previous experience combining these APIs and could give me a few pointers
to just display a simple model on top of the marker, I'd really appreciate it.
Thanks in advance.

Vuforia SDK + jPCT

November 13, 2013 - 6:03am #8

Hi 365solution

I've shared my code on github: https://github.com/sidneibjunior/vuforia-jpct

I hope it helps you.

Vuforia SDK + jPCT

October 28, 2013 - 1:19am #7

Hi, binspaul

Can you share your renderFrame code here?

This is my code by refering to the tutorial:

JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv *, jobject)
{
	jclass activityClass = javaEnv->GetObjectClass(javaObj); //We get the class of out activity
	jmethodID updateMatrixMethod = javaEnv->GetMethodID(activityClass, "updateModelviewMatrix", "([F)V");

    // Clear color and depth buffer 
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    // Get the state from QCAR and mark the beginning of a rendering section
    QCAR::State state = QCAR::Renderer::getInstance().begin();
    // Explicitly render the Video Background
    QCAR::Renderer::getInstance().drawVideoBackground();
    // Did we find any trackables this frame?
    jfloatArray modelviewArray = javaEnv->NewFloatArray(16);
	for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
	{
		// Get the trackable:
		const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
		const QCAR::Trackable& trackable = result->getTrackable();
		QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(result->getPose());

			SampleUtils::rotatePoseMatrix(180.0f, 1.0f, 0, 0, &modelViewMatrix.data[0]);
			// Passes the model view matrix to java
			javaEnv->SetFloatArrayRegion(modelviewArray, 0, 16, modelViewMatrix.data);
			javaEnv->CallVoidMethod(javaObj, updateMatrixMethod , modelviewArray);
	}
	javaEnv->DeleteLocalRef(modelviewArray);
    QCAR::Renderer::getInstance().end();
}

I have no idea about how to call the cubeto match the target image.

Can you please help?

Thanks.

Vuforia SDK + jPCT

July 19, 2013 - 12:02am #6

Hi,

It works, I was able to load the 3D model from 3ds file successfully. The loading, parsing and rendering is taken care by jPCT. But, there seems some issues in the positioning and placement of the model. I am working on it.

Also, one issue I noticed is that if we load a big model, the system will throw out of memory exception.

I was not able to clearly understand some steps mentioned in the wiki though. :(

Thanks,

Binu Paul

Vuforia SDK + jPCT

July 17, 2013 - 11:14am #5

I think that it does - http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Loader.html

* I'm not too familiar w/ JPCT, so it would be a good idea to confirm this here - http://www.jpct.net/forum2/index.php

Vuforia SDK + jPCT

July 17, 2013 - 10:50am #4

Hello Al,

Does this integration open up the possibility of loading 3D models on the fly (therer by avoiding the ndk-build for supporting a new 3D model) ?

Thanks,

Binu Paul

Vuforia SDK + jPCT

February 21, 2013 - 8:28am #3

Thanks frantxesco for sharing that tutorial. Nice!

Vuforia SDK + jPCT

February 21, 2013 - 3:13am #2

Hi,

following this tutorial is pretty straightforward http://www.jpct.net/wiki/index.php/Integrating_JPCT-AE_with_Vuforia

Log in or register to post comments