Instant Tracker LookAt function
Development details:
1. SDK Version: 5.0.1
2. Development Environment: (eg. Unity-Android, Unity-iOS, Native Android, Native iOS): Native Android
3. Tracker/Scanner: Instant tracker
4. License Type(Free / Pro-One Time Fee / Pro-Subscription / Enterprise): Free
5. Target Device(Optional): Any
Hi,
When I render objects, the default rotation of the object different from phone to phone. It may because of the rotation of the camera. How can I set rotation of the camera towards the phone screen? or same rotation in every phone?
Thank you!
Thanks for your interest to our MAXST AR SDK.
We can't understand your exact problem with only text.
So, Please explain in more detail.
If you have other questions, feel free to questions us.
Best regards
Francisco
MAXST Support Team
When I render an object its default rotation different from phone to phone. for example, when I run the application on phone A and render this object, it looks like below.
Then I run the same app on phone B its look like this.
Why the default rotation different? What is the solution for this?
Thank you!
Instant Tracker enhances 3D content based on
the only "plane" found on the camera image momentarily without prior learning.
If you illuminate a non-planar location, you'll get the wrong pose and
augment the 3D object in another location.
Therefore, you illuminate a planar location, you'll get the correct pose.
If you have other questions, feel free to questions us.
Best regards
Francisco
MAXST Support Team
Hi,
In my case, it rendered at the correct place. The problem is rotation.
I think(I have no much knowledge in OpenGL, but I just think) it may because of the projection matrix. Usually in OpenGL, for the projection matrix, it uses ratio(height/width) of the phone like below code.
float ratio = (float) width / height; Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
But in your projectionMatrix(projectionMatrix = CameraDevice.getInstance().getProjectionMatrix();) I can't see you are getting device ratio. Therefore rotation is different from phone to phone. I just assume it. But if you use device ratio for projection matrix can you show me where?
Thank You!
Using the Instant Tracker, do you see the same phenomenon
when you come back from another location?
Instant Tracker is get pose using camera and IMU(accelerometers, gyroscopes and magnetometers) sensor.
Therefore, it is not rotated because of the getProjectionMatrix() function,
but it seems to be rotated due to a problem with the phone B IMU sensor.
If you have other questions, feel free to questions us.
Best regards
Francisco
MAXST Support Team