Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - billda

Pages: [1]
Support / Re: Different camera rotation than device rotation
« on: September 16, 2014, 03:51:37 pm »
Okey, its only converting from 3x3 array to 4x4 matrix:

Code: [Select]
private Matrix getRotationMatrix(float[] data) {
            Matrix ret = new Matrix();

            for (int i = 0; i < 3; i++) {
                for (int j = 0; j < 3; j++) {
                    ret.set(i, j, data[i * 3 + j]);
            ret.setRow(3, 0, 0, 0, 1);
            ret.setColumn(3, 0, 0, 0, 1);
            return ret;

Support / Re: Different camera rotation than device rotation
« on: September 15, 2014, 04:27:46 pm »
Here is code for my transformation:
Code: [Select]
            cam = world.getCamera();
            Matrix r = getRotationMatrix(rotationMatrix);

where rotationMatrix is matrix from gyroscope. Method getRotationMatrix is just converting between different data types for matrices. Do you think that I should do some extra transformation? I thought that its not necessary when all three rotations are in the right direction.

Support / Re: Move object by touch in x and y axis
« on: September 09, 2014, 01:44:10 pm »
Well I am basically trying to achieve the same effect as with "picking" but I dont want to actually need to pick object. Just everywhere when i touch screen, object should appear on that position. With that code i posted in first post, i was positioning that model on some plane that was parallel with X axis .. and i dont want that, i want to move it on the plane that is parallel with Y axis in some distance that will be constant.

Support / Different camera rotation than device rotation
« on: September 09, 2014, 01:32:06 pm »
Hi, Ok i have another silly question. I am implementing some kind of augmented reality application. I am displaying camera preview and overlaying it with 3D object. I am getting data from gyroscope and rotating camera of jpct so object is rotated corresponding with device rotation. My problem is that model is moving quicker than "real world" at camera preview. I thought that it has something to do with FOV so i took that "FOV" code from vuforia sample, but it didnt solve that problem, model was streched and problem with rotation was not solved.

Is there any way how I can "normalize" this movements?

Support / Re: Move object by touch in x and y axis
« on: September 09, 2014, 09:17:44 am »
Thanks for reply .. I am not saying that i dont want to set depth, only that i dont want to change it .. I would like to have that z coordinate always the same and change only x and y.

Support / Move object by touch in x and y axis
« on: September 08, 2014, 02:24:14 pm »
Hi, I want to move my finger on the screen and move the object with it. I found here  example that remap 2D coordinates of touch to 3D coordinates in plane .. but it is not what i want .. i dont want to change "depth" of object, just x and y coordinates. Can I use some of that remapping methods that are in Interact2D class? Or is it somehow easy? Thanks for some hint

Support / Remap coordinates from Android rotation vector sensor
« on: August 07, 2014, 03:00:55 pm »
Hi, I am trying to make a simple app when user tilt device and model in screen is rotated .. I've found some demos here in forum but I cannot make it work so i started from scratch. I have sucessfully implemented it, object is rotating but I have problem with coordinate system. I cannot find the right way how to convert between android one and jPCT one .. I am using sensor for Rotation vector and its returning quaternion describing rotation .. Then I am using built-in function to create rotation matrix from this quaternion .. and i am trying this matrix remap and use on my model.

Here is my code: and here is apk demo of my app: (large size is because of models and other stuff in app)

I tried to use only gyroscope data.. I swapped rotation angle around y and z axes and it was working fine with remap from y to z. But if i tried to compute quaternion manually by integrating as here it works but if I shake device or rotate very quickly it made a huge error. Approach with rotation sensor doesnt have this kind of error, but i cant simply swap axes.

If someone of you have any idea how to make it work, I will be very happy. Thanks

Support / Re: Weird texture rendering on OBJ model
« on: July 31, 2014, 11:04:32 am »
Thanks! It was exactly this kind of issue

Support / Weird texture rendering on OBJ model
« on: July 31, 2014, 10:04:30 am »
I am using vuforia with jPCT and i have weird problem with rendering texture on my model. When I try to load model in HelloWorld sample and replace cube with model, everything works fine but when I use exact same code in my app, this problem happened. In the attachment is screen with my problem. My guess is that Vuforia renderer is setting something in openGL but i dont know what because i dont have so much experience with it. If anyone have some idea please share your thoughts.

Attachment -

Support / Re: Vuforia Java API integrated with jPCT
« on: July 31, 2014, 08:52:07 am »
I could send you my Example project with some steps I've made. I was using this project that successfuly integrated your tutorial from wiki about vuforia and jPCT - . Maybe you could add this link to that tutorial either.

Support / Re: Vuforia Java API integrated with jPCT
« on: July 30, 2014, 12:35:32 pm »
Well, I figure it out, I have tried to port renderFrame method from C++ to Java and it works .. here is my ImageTargetRenderer class:

Support / Vuforia Java API integrated with jPCT
« on: July 30, 2014, 11:26:30 am »
Hi, I have seen tutorials and many forum posts about integrating vuforia with jpct but all these posts were about native vufori api based on ImageTargetNative example. Is it possible to use only Vuforia Java API with no need to write C++ code and if it is, is there some kind of example how to do this?


Pages: [1]