facing 3D model orientaion problem in N8.plz help!

Dear All,

 

I am using powerVR SDK for my Augmented Reality project for my Nokia N8(Symbian^3). Specially I am implementing 3D studio Max model using PowerVR SDK in my AR enviroment. At this point I am facing one problem of orientaion. As Augmented Reality technology require orientaion of virtual object that means if marker close to camera virtual object(3D model) will bigger and if marker far to camera then virtual image will small. But in my nokia N8 this orientaion not working  that means 3D model draw as fixed size in screen even closer/far from camera. Last time I faced  same problem in my n95 but able to solve just added following Artoolkitplus Modelview/Projection matrix before calling DrawMesh(Node.nIdx,aFrame); :

 


void CSimpleCube::AppCycle( int aFrame)


{ ..........


...........

 

if (tracker.GetLastMarker() != -1)


{


.............

.........

 


glMatrixMode(GL_PROJECTION);


myglLoadMatrix(m_mProjection.f);

...................................................

...........................................

 


if(m_Scene.nNumLight != 0)


{


..........

}

 


for(int i = 0; i < (int)m_Scene.nNumMeshNode; ++i)


{


........

}

 


for(int i = 0; i < (int)m_Scene.nNumMeshNode; ++i)


{


....

}

 

glMatrixMode(GL_PROJECTION);

glPushMatrix();


glLoadMatrixf(tracker.GetPMatrix());


glMatrixMode(GL_MODELVIEW);


glPushMatrix();


glLoadMatrixf(tracker.GetTMatrix());



DrawMesh(Node.nIdx,aFrame);



}



glMatrixMode(GL_MODELVIEW);


glPopMatrix();


glMatrixMode(GL_PROJECTION);


glPopMatrix();

}

 




Here PowerVR has own matrix and artoolkitplus has own matrix for drawing object. So before finally call DrawMesh I changed matrix to artoolkitp matix  so that object can orientaion on marker in the video. this trick is working with N95 (S60_3rd) but Not working(model not oriented such that fixed size in screen) in N8 (sym^3).



 

So Anybody can help me to sort out this problem ..

 

Thanks

 

Regards

Rassall

Hi Rassall,





I’m glad to hear you are benefiting from the SDK. Unfortunately though, the N8 does not contain a POWERVR Graphics core, so we cannot support you directly for specific graphics issues that you are having. That being said, I have no problem discussing general 3D graphics programming to help you find a solution :slight_smile:





I think you should be multiplying your mesh’s Model matrix (to put it into world space) by the Transformation matrix ARToolkit is giving you (to translate the object to the marker’s position). Are you using the same code for your N8 application as you used for the N95? I have very little experience with AR Toolkit, but it sounds like you may be retrieving an invalid transformation matrix from the marker detection (as the returned matrix is not moving your object closer to or further away from the 3D scene’s camera). I would suggest logging transformation matrices returned from AR Toolkit at regular intervals, and then use this data after your application closes to work out if the returned matrices are what they should be.


Thanks Joe for Reply,


Basically I am using Artoolkitplus which has given projection matrix and modelview matrix for drawing opengles stuff. I have used same code for my N95 and its works properly (orientation on marker). I have getting marker position by following P, T matrix


glMatrixMode(GL_PROJECTION);


glPushMatrix();


glLoadMatrixf(tracker.GetPMatrix());


glMatrixMode(GL_MODELVIEW);


glPushMatrix();


glLoadMatrixf(tracker.GetTMatrix());


I also don't understand your these lines:


"I would suggest logging transformation matrices returned from AR Toolkit at regular intervals, and then use this data after your application closes to work out if the returned matrices are what they should be"

I am using PowerVR SDK version : OGLES-1.1_SYMBIAN_S60_3RD_ARMV6_2.06.26.0649.msi for my N95(S60) and N8(Sym^3).


Anyway I am trying hard to solve this problem and looking for more help from you.


Regards


Rassall


 

rassall_jubair2011-02-15 04:55:33