www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: imiyar on April 27, 2017, 06:49:38 am

Title: Model is not on the right position when integrating jPCT-AE with Vuforia 6.2
Post by: imiyar on April 27, 2017, 06:49:38 am
Hi friends,

I am trying to integrate jPCT-AE with Vuforia 6.2 sample code and it is not working well.

The problem I have is that I cannot see the model unless I translate it along the Z axis by a negative number. It seems that the model is rendered "beyond the scene". But if I add a line like cylinder.translate(0,0,-100), the model will appear but it doesn't stay on the same position on the marker when I move the phone.

The code I use is from the Vuforia559_jPCT-AE repo on Github. I replace the ImageTarget part in Vuforia 6.2 sample with the code in src/com/vuforia/samples in Vuforia559_jPCT-AE. No other changes beside this.

I have no clue about how to deal with this problem... Anyone has some ideas? Thanks!!
Title: Re: Model is not on the right position when integrating jPCT-AE with Vuforia 6.2
Post by: EgonOlsen on April 27, 2017, 07:52:53 am
Have you checked that the model is actually centered in object space? What does getCenter() on it returns after calling build()?
Title: Re: Model is not on the right position when integrating jPCT-AE with Vuforia 6.2
Post by: imiyar on April 27, 2017, 06:20:15 pm
Thank you for the quick reply! Actually I figured it out myself.

There's nothing wrong with the code. The reason is that the size of the default marker in Vuforia 6.2 sample is set to [0.24, 0.17] in their .xml file (they use meter as default unit scale), and the size of the cylinder in the scene is [20, 40]... That's why things got weird.