Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Support / Re: JPCT + Vuforia in stereo rendering mode
« Last post by thejauffre on April 23, 2018, 11:19:37 am »
I changed both. X and Y FOV are set to PI/8.5 and PI/17 respectively. However, I'm noticing that changing them does not affect the rendering - which is strange. Maybe I messed up with something, gonna check it.


Edit: Ok, changing the values of the FOVs the rendering is not stretched anymore (i put fov=1, fovY = 0.55). Still, I need to decrease fovx to a smaller value (basing on some calculations, I need it to be around 20 degrees); setting it to values lower than the unit causes the deformation, no matter the value of fovY.

Edit2: "accidentally", i found the setFOVLimits method. Well, now I can set the FOVs as I like :D
42
Support / Re: JPCT + Vuforia in stereo rendering mode
« Last post by EgonOlsen on April 23, 2018, 10:35:53 am »
If you've played around with the fov settings...have you just changed fov or yfov as well?
43
Support / Re: JPCT + Vuforia in stereo rendering mode
« Last post by thejauffre on April 23, 2018, 09:52:28 am »
Sure.
In the archive there are two screenshots (their names are self-explanatory).
I got the "correct" one by scaling the modelview matrix along the x direction, but this is like cheating (in fact, if I rotate the marker, the object will be stretched)
44
Support / Re: JPCT + Vuforia in stereo rendering mode
« Last post by EgonOlsen on April 23, 2018, 07:53:57 am »
Do you have a screen shot?
45
Support / Re: JPCT + Vuforia in stereo rendering mode
« Last post by thejauffre on April 20, 2018, 05:09:22 pm »
Ok, i managed to solve part of the problem by tuning the FOV and near/far plane of JPCT camera (as i read here in the forum, applying Vuforia/OpenGL matrices is not recommended).
Now I can see the object (a square) almost on the marker, but it is stretched: it's like the horizontal side is larger than it should be.
I checked the framebuffer size, tried to change the FOV values and the planes, but nothing changed.
What could be the problem?
46
Support / Re: Documentation Error
« Last post by AGP on April 20, 2018, 11:59:31 am »
I've already solved it by re-working the format. The bones thing is getting really close (except for the mysterious weights thing).
47
Support / Re: JPCT + Vuforia in stereo rendering mode
« Last post by thejauffre on April 19, 2018, 10:11:02 am »
Hi! i'm sorry to bother, but i still have some problems.
Using just the modelview matrix works fine when the video background is active. In fact, when using the smartglasses in see-through mode, Vuforia applies a projection matrix (retrieved after a per-user calibration process) to correctly display a virtual object on the scene, so that the viewer sees it on the marker, like if it was real.
So, i'm trying to use the same projection matrix on JPCT, and, by forcing it touse the same near and far planes as Vuforia, i am able to see the object right over the marker.
However, the rotations of the object are messed up: it's like I'm seeing it from an arbitrary direction, and (for example) when I rotate the marker clockwise, the object rotates counterclockwise. Maybe it is related to the different reference frame used by OpenGL and JPCT. I tried performing a rotation of the final modelviewprojection matrix (namely the product of modelview and projection mats) about 90 deg about x-axis and a negative scaling on the z-axis, but it has the same problem.
Any ideas?
48
Support / Re: 3D objects offset
« Last post by deqleos on April 18, 2018, 11:08:07 am »
Yes that is exactly the issue, I've decided to keep the z at a fixed index and simulate object coming closer and further by scaling the 3d object. It has a decent visual experience.
Thanks a lot for helping!
49
Support / Re: 3D objects offset
« Last post by EgonOlsen on April 17, 2018, 08:24:40 pm »
Your code looks fine. It might have something to do with the depth value that you are assuming for the reprojection call....in this case 20. This implies that the "depth" of the 2D image is 20 as well, or in other words, if the 2D object would be a 3D object managed by jPCT instead, it has to have a depth of 20 to match your object's depth. If you roughly know the size of the 2D object in real world an on screen, you should be able to calculate a more or less accurate depth for your object...either that, or just guess something that looks reasonable...
50
Support / Re: 3D objects offset
« Last post by deqleos on April 17, 2018, 03:16:01 pm »
Hmm, it doesn't seem to change anything.
Don't think there is something wrong with the code I used, just to be sure:

model.build();
SimpleVector center = model.getCenter();
model.translate(-center.x, -center.y, -center.z);
model.translateMesh();
model.clearTranslation();
world.addObject(model);

I'll look a little more into the theory behind 3d. Very new to this.
I can manage to get unnoticeable offset by using a huge model and a very far z index, which is okay for now I guess.
Pages: 1 ... 3 4 [5] 6 7 ... 10