Problems with 10-inch tablet

Started by andvazva, June 28, 2016, 10:54:06 PM

Previous topic - Next topic

andvazva


Hello,
I made an application that draws several 3d models following a marker ARToolKit .
My problem is that in a 4.5-inch smartphone works perfectly, but the same code in a 10-inch tablet does not draw 3D objects on the screen.
Notes:
- The 3D objects are compiled well .
- Once it worked by chance on the tablet.
-The Marker detects Well, that's not a problem.

Smartphone 4.5 inch:


Tablet 10 inch: t shows nothing


What do you think?

EgonOlsen

You are you creating the GL setup/context? Is that done by the ARToolKit or in your app?

EgonOlsen


andvazva

The tablet is Samsung Galaxy Tab 3 GT-P5210 10.1"

My code extends a library https://github.com/plattysoft/ArToolKitJpctBaseLib

The library integrates jpct with ARToolKit .

My main class extends ArJpctActivity:

public class MainClass extends ArJpctActivity

https://github.com/plattysoft/ArToolKitJpctBaseLib/blob/master/ArJpctBaseLib/src/main/java/org/artoolkit/ar/jpct/ArJpctActivity.java

The ArJpctActivity extends ArActivity and creates the render
https://github.com/plattysoft/ArToolKitJpctBaseLib/blob/master/ArJpctBaseLib/src/main/java/org/artoolkit/ar/base/ARActivity.java

ArJpctRender extends ArRender
https://github.com/plattysoft/ArToolKitJpctBaseLib/blob/master/ArJpctBaseLib/src/main/java/org/artoolkit/ar/jpct/ArJcptRenderer.java

ARRender
https://github.com/plattysoft/ArToolKitJpctBaseLib/blob/master/ArJpctBaseLib/src/main/java/org/artoolkit/ar/base/rendering/ARRenderer.java



The main problem is that the code works perfectly on the smartphone but not on the tablet.

Objects are created correctly ( I think).

Android Monitor:

...
06-28 23:32:38.173 I/jPCT-AE: Subobject of object 25/caja9 compiled to flat fixed point data using 546/546 vertices in 4ms!
06-28 23:32:38.173 I/jPCT-AE: Object 25/caja9 compiled to 1 subobjects in 6ms!
06-28 23:32:38.183 I/jPCT-AE: Subobject of object 28/caja10 compiled to flat fixed point data using 546/546 vertices in 4ms!
06-28 23:32:38.183  I/jPCT-AE: Object 28/caja10 compiled to 1 subobjects in 9ms!
06-28 23:32:38.193  I/jPCT-AE: Subobject of object 31/caja11 compiled to flat fixed point data using 546/546 vertices in 4ms!
06-28 23:32:38.193 I/jPCT-AE: Object 31/caja11 compiled to 1 subobjects in 8ms!
06-28 23:32:38.203  I/jPCT-AE: Subobject of object 34/caja12 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.203 I/jPCT-AE: Object 34/caja12 compiled to 1 subobjects in 14ms!
06-28 23:32:38.213 I/jPCT-AE: Subobject of object 37/caja13 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.213 I/jPCT-AE: Object 37/caja13 compiled to 1 subobjects in 5ms!
06-28 23:32:38.223 I/jPCT-AE: Subobject of object 40/caja14 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.223 I/jPCT-AE: Object 40/caja14 compiled to 1 subobjects in 8ms!
06-28 23:32:38.223  I/jPCT-AE: Subobject of object 43/caja15 compiled to flat fixed point data using 546/546 vertices in 4ms!
06-28 23:32:38.223  I/jPCT-AE: Object 43/caja15 compiled to 1 subobjects in 7ms!
06-28 23:32:38.233  I/jPCT-AE: Subobject of object 46/caja16 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.233  I/jPCT-AE: Object 46/caja16 compiled to 1 subobjects in 8ms!
06-28 23:32:38.243  I/jPCT-AE: Subobject of object 49/caja17 compiled to flat fixed point data using 546/546 vertices in 4ms!
06-28 23:32:38.243  I/jPCT-AE: Object 49/caja17 compiled to 1 subobjects in 7ms!
06-28 23:32:38.253 I/jPCT-AE: Subobject of object 52/caja18 compiled to flat fixed point data using 546/546 vertices in 8ms!
06-28 23:32:38.253 I/jPCT-AE: Object 52/caja18 compiled to 1 subobjects in 11ms!
06-28 23:32:38.263  I/jPCT-AE: Subobject of object 55/caja19 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.263  I/jPCT-AE: Object 55/caja19 compiled to 1 subobjects in 8ms!
06-28 23:32:38.273  I/jPCT-AE: Subobject of object 58/caja20 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.273 I/jPCT-AE: Object 58/caja20 compiled to 1 subobjects in 9ms!
06-28 23:32:38.273 I/jPCT-AE: Subobject of object 61/caja21 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.273 I/jPCT-AE: Object 61/caja21 compiled to 1 subobjects in 6ms!
06-28 23:32:38.283 I/jPCT-AE: Subobject of object 64/caja22 compiled to flat fixed point data using 546/546 vertices in 6ms!
06-28 23:32:38.283  I/jPCT-AE: Object 64/caja22 compiled to 1 subobjects in 12ms!
06-28 23:32:38.293 I/jPCT-AE: Subobject of object 67/caja23 compiled to flat fixed point data using 546/546 vertices in 3ms!
06-28 23:32:38.293  I/jPCT-AE: Object 67/caja23 compiled to 1 subobjects in 6ms!
06-28 23:32:38.303  I/jPCT-AE: Subobject of object 70/caja24 compiled to flat fixed point data using 546/546 vertices in 2ms!
06-28 23:32:38.303 I/jPCT-AE: Object 70/caja24 compiled to 1 subobjects in 5ms!
...

EgonOlsen

Have you checked if your objects are physically there where you expect them to be? Object3D.getTransformedCenter() might help here. Are the results similar to those on the phone?

andvazva

#5
I think yes, they are physically on the screen.
I've done it from getTransformedCenter ().
Approximately:
Tablet : ( 8f , -7F , -37f )
Smartphone ( 28f 12f -450f )
The values ​​change when I move the camera.

the value of z is suspicious right?

EgonOlsen

It might be...it depends on the location and view direction of the camera. Can you post Camera.getPosition() and Camera.getDirection() as well?

andvazva

smartphone: getPosition = (0.0, 0.0 , -20.02002) getDirection = (0.0021968328,-0.004591274,-0.9999871)

tablet:  getPosition = (0.0, 0.0, -20.02002) getDirection = (0.0.-1.1897111E-7,-1.0)

EgonOlsen

Looks reasonable. On both devices, the camera points into the direction of the negative z-axis, which is where your objects are located as well. The -470 seems strange when comparing it to the phone's values, but it shouldn't prevent the objects from being visible...unless you've adjusted the far clipping plane. It would try to place some object in front of the camera by hand to see if it's a rendering issue (which I doubt) or an issue with object placement.

andvazva

I could see an object. I drew in the z -400 point . In the smartphone it is drawn at the point 0 ...
But it is very strange because the 3D object is a child of trackableObject but follows the camera , not the trackableObject ... In the smartphone works well .

EgonOlsen

It has to have something to do with the AR code. jPCT-AE by itself doesn't distinguish between different devices.

andvazva

I fixed the error.
Not sure why it failed, but the solution has been deleted from the cache the cparam_cache.db file.

Thanks for the help