-
Notifications
You must be signed in to change notification settings - Fork 984
[WIP] fix for rotation X bug #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- upgrading artoolkit.min.js to the new version - upgrading some examples
f91ad35 to
a94f8cc
Compare
|
Empirical demonstration with dev.html example, threex.artoolkitcontext.js without dev.html example threex.artoolkitcontext.js with Note the three axes helper is oriented in the same way in both the images. |
|
I did also this gist for proving the theory https://gist.github.com/kalwalt/528e722706847ea523c489947d07bc8c |
- fix examples y instead of z positioning Threejs and aframe) - fix position nft examples
|
I added the rotation X matrix also to the arMarkerControls-nft, because you could use in combination with a Pattern Marker. Soon i will provide a codepen example. |
|
It's possible but i don't reccomend to work with both, test this codepen: https://codepen.io/kalwalt/pen/LYVrQKd test with an Hiro marker and the trex image. When pointing to the hiro marker you will see two blue cube flashing on the lefte and after on the right. I think we should find a solution also for this, not of course in this PR. |
|
We get different Matrix from Camera because this changes in Artoolkit5 arglCameraFrustum was removed in favour to arglCameraFrustumRH in this commit see how i changed the code in ARToolkitJS.cpp |
|
I'm testing if adding back the old arglCameraFrustum method has some effect on the code |
|
For sure is relative to changes in artoolkit.api.js see this commit in the old AR.js repo, there are changes in _copyImageToHeap to the portrait mode. Maybe we should make this changes in Ar.js? |
Add video stop on marker being lost
|
I found that if you print the orientation from arController give wrong result: arToolkitContext.init(function onCompleted(){
console.log(arToolkitContext.arController.orientation);
// other code here
}in portrait mode should give |
|
I think that is better to merge the fix for the bug in the Rotation on the X axis, and after make the upgrade to the new artoolkit lib. This PR need testing anyone want to test is welcome! 🙂 |
Addressing issue AR-js-org#70: Version of gps-camera and gps-entity-place using Spherical Mercator p…
|
Hi @fcor have you tested this PR? |
|
For anyone wants to test this PR try this codepen: https://codepen.io/kalwalt/pen/ZEbYwdq you should see a red cone onto an Hiro marker: the corner pointing outside the marker and placed correctly on it. |
- upgrading artoolkit.min.js to the new version - upgrading some examples
- fix examples y instead of z positioning Threejs and aframe) - fix position nft examples
….js-org into feature-artoolkit-new
|
@kalwalt please write on CHANGELOG file, directly on dev branch, this modify :) thanks! next version will be 3.1 so write under 3.1 |
@nicolocarpignoli i will update the CHANGELOG 🙂 |





What kind of change does this PR introduce?
Fix for issue #59 missed rotation on X axis.
Can it be referenced to an Issue? If so what is the issue # ?
issue #59
How can we test it?
Test the basic and dev exemples (three.js)
Summary
The object 3D is not rotated correctly, we should apply a rotation on the X axis to fix the problem.
Does this PR introduce a breaking change?
Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser
Other information
A said in the issue #59 this bug was introduced while deleting the tango and aruco code, we (me) deleted a relevant part of the code
https://github.com/jeromeetienne/AR.js/blob/024318c67121bd57045186b83b42f10c6560a34a/three.js/src/threex/threex-armarkercontrols.js#L130-L135
Applying again the rotation X will solve the issue.
List of features / to do list:
upgrading artoolkit version for ar.js and aframe-ar.js ( previuosly only for ar-nft.js, aframe-nft-ar.js)This will be done in another PR.removing the multiplication for the modelviewMatrix with ProjectionAxisTransformMatrix see line 258 in threex-artoolkitcontext.jsremoving old artoolkit.min.js libsThis will be done in another PR.