-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Custom pattern is not being recognized #164
Comments
See #127
|
@mrmookie i did try that as well, for |
I'm facing the same issue.
|
I look at the aframe-ar.js it seems like its in the backlog the a-marker and a-marker-camera is tagged as FIXME. Ive resorted to the threejs version, which is working with custom markers. |
i have a similar issue. i am training custom markers with the online tool but none of them is recognized. I have created a gist with on of the pattern files. Is anything wrong with it? I don't think that i am doing anything wrong in the code, but please have a look . @shapetraceAdmin you seem to have it working with three.js. perhaps you could have a look? |
i was able to solve this. The online marker generator tool used 0 instead of 255 for the white areas (you can see this in the linked gist above), so i colored it in a very light grey (240) and generated a new .patt file. now the marker is recognized correctly. I am not sure if this is a bug with the online tool? |
So I am getting a custom pattern to be recognized but the asset I am trying to display does not appear on the custom marker, however when I show the hiro marker and my custom marker the asset will be displayed on the hiro marker. Not sure what is going on here As soon as I take away either marker the asset is no longer displayed |
@LoganArnett I've solve this problem by the following steps:
then it will work. |
This worked for me. I had to make one change: |
I am getting this issue as well: added this:
Generated my pattern with the online tool and got my .patt file. Here is my code:
For some reason, it still catches the hiro pattern, and not my pattern, even when i look at the Network tab in dev tools on load, it gets the hiro pattern and my pattern is not to be seen. |
@WaveF Awesome. I've been searching for a solution for 2 hours. This worked! Thanks a lot! |
Hi There is a fixed code for custom marker?
but it don't work |
Does anyone know if the custom marker issue is resolved? I've been trying for a few weeks with the many solutions offered across the web, but have found some comments that say custom markers still don't work as of Feb 2018. I see this guy ( https://github.com/u4bi-git/simple-ar.js ) got it to work, but that was Sept '17 and the problem seems to be more recent. Every video on youtube uses just the Hiro marker. Shouldn't it work if I just add the custom marker code below to Jerome's codepen: https://codepen.io/jeromeetienne/pen/mRqqzb
|
Any Luck ? |
Hi @syamishere, according to @rdub80 it looks like @jeromeetienne merged and ran the latest build but did not run a release, so we are still on 1.5.1 from August 2017 which doesn't contain the updated code. Read more on this thread: #236 (comment) |
I've solved the issue I had with custom markers so in case this helps anyone else: the custom marker doesn't work for me unless it is on a server (in my case my github repository), it didn't work when referenced locally on my computer. Once I had uploaded the custom marker to github and changed the 'url' accordingly it worked fine. |
i uploaded the marker to my github repository, but seems it's not working. @mattGraphics can you share your code to see if it's my code or my marker the problem here? |
Hi @vettorazi You posted in this thread #216 that you have now resolved the issue, but you're welcome to take a look at my code: https://github.com/mattGraphics/mattGraphics.github.io |
Hi, I'm having similar issue with custom marker. I have made sure to use gray instead of white, I referenced v1.5.5, I link to .patt on github server, and it was working up until yesterday.
|
It is suddenly working now. I have no idea what is different. |
I've been reading through a number of these - trying to solve my own version of the same problem. I've gotten to everything happy in the console, but no custom pattern is seen and recognized for the interactions. Having to guess it's something with my pattern, but at a loss to figure out what or understand why. Seems like several people above "got it working", but what is the magic step was that I'm missing. My test (no change other than the custom market on example files: If anyone has insight... please do! |
@befungle try this for the custom marker: |
@rdub80 Changed to the tag you recommended and updated the marker with the grey scale. Still not recognized as a marker and not generating AR overlay. Struggled with a similar marker challenge with an Android based AR last year, though one advantage is the marker generation system "graded" the marker quality and helped narrow down what images worked and what did not. |
@rdub80 - the hacker in me wanted to remove questions.... so I literally downloaded the Hiro marker (that works as a preset), ran it through the Custom Marker Maker, downloaded and loaded it.... Nothing. Yet, if I return it to "preset" and "hiro", that same image works. |
@befungle make sure you use aframe 0.8.0 and this build: |
One more update - If I take the code from the patt.hiro default pattern and copy it into the custom pattern I made from the Hiro image, it works calling the pattern file. The pattern file generated by the Custom Marker trainer (https://jeromeetienne.github.io/AR.js/three.js/examples/marker-training/examples/generator.html) is VERY different than the one found in the default library. So, the problem seems to be in the pattern file generated by the marker-trainer. Image attached shows the default HIRO pattern against the marker generated online from the same image: |
Interesting.... My efforts were to run the online upload, clicked the download, copy file to directory. I really want to give this project a run for it's possibilities in ideation and proof of concepts. However, I'm starting to feel like I'm going down a rabbit hole. I reviewed the code for pattern generation though that's much deeper into a review than I can see continuing on. |
Everyone who gets this far in the thread.... there's one more thing that is pretty important. The image posted for recognition's size must be pretty small. I found a post (https://medium.com/chialab-open-source/ar-js-the-simpliest-way-to-get-cross-browser-ar-on-the-web-8f670dd45462) that got past my issue by indicating the marker image should only be 16x16px. That's a pretty small image, but when I used that to build a marker it worked. So, such a small image marker creates limits, but at least I have been able to make it work. |
The custom marker can be any photo or I need a simple figure? I’m trying to achieve what is shown in this video: https://m.youtube.com/watch?feature=youtu.be&v=lj3SsXs9Qgc That is video overlay on printed paper |
@befungle I wrote that article, I'm glad it helped you :) If you need other informations just ask. @marcomarsala It HAS to be a very simple figure. In general you can either use pattern marker or barcode marker, but in this thread we are talking about pattern ones. I invite you to read my article on Medium https://medium.com/chialab-open-source/ar-js-the-simpliest-way-to-get-cross-browser-ar-on-the-web-8f670dd45462 in which I collected all constraints for the input image for generating a pattern marker. Let me know if it helps. |
Update on this: I got it working with aframe-v0.6.1-three-r86.min.js |
I consider this solved. Feel free to re-open if not. |
I can't get my marker to work, have followed the instructions here but still no luck. My code is in this repo and can be seen below:
|
I think your issue may be related to the issue I posted yesterday (#424 ). It looks like the pattern generator is creating invalid patterns. Color values are off and the values change between the views/section of the pattern code. |
Thanks, it fixed my problem. |
Did anyone get this to work with a white background like Hiro? If not, does anyone know how to generate the pattern file without the Marker Trainer? |
please follow https://github.com/artoolkit/jsartoolkit5 |
Hi @WaveF quick question. On your solution, you link to a source that's not live anymore, do you happen to have alternate or more information on that? |
FYI, I've also "solved" my problem. Like everyone else, I created my I wish the |
@kkaung please open a specific issue for this problem about marker generator, we will look forward to it: if you can identify the bug / problem specifically I can even make a PR by myself when i got time |
@nicolocarpignoli i had an issue and question: Right now, im trying to read, multiple different Markers. Each one show a different content. This pattern are Images, some ones works, and other doesn't. Exist some documentation about what kind of images or specs for images on patterns?. Thanks |
@juansho01 Hi, in this article I collected all the informations I have found and tested about pattern and barcode markers for AR.js : https://medium.com/chialab-open-source/ar-js-the-simpliest-way-to-get-cross-browser-ar-on-the-web-8f670dd45462. Let me know if it helps. Again, @kkaung or anybody who has experienced problems with the online marker generator, please open an Issue with the specific problem. I will try to look to it |
I was able to get it to work by hosting the image remotely (like digital ocean or github) and setting that path as the url. |
Hello, can one of you help me? This is my code (without the right url):
|
And i have another issue. Here my code:
|
I'm trying to get a custom marker work but still can't. I considered using a gray background and type = "pattern" preset = "custom" but still not work. I'm using Glitch to host the code online. I would appreciate some help! thanks. |
the link is broke :( => https://github.com/wimvdc/AR.js/commit/950e82db6d0c3851647d429282c5ade52ee95891 |
It's 2024 and I started playing with AR.js, but frustrated the custom markers is not working. I just can't make it work. I tried everything posted here. Is this project still supported? What is other people looking at as alternatives to ar.js (if any)? |
I am frustrated too, webxr solve problem to me but its not possible to open on Iphone.... |
OMG USE PATTERN RATIO 0.50.... |
Hi I am following your tutorial here I have made a custom marker pattern and uploaded it, and using the
<a-marker-camera type='pattern' patternUrl='[path_to_mypattern]'></a-marker-camera>
But it is not working, I cannot debug this. It console i see no errors. The marker is not loading, and it for reason just defaults to the Hiro marker.
These are the libraries im loading `<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/examples/vendor/aframe/build/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.5.0/aframe/build/aframe-ar.js"></script>`The text was updated successfully, but these errors were encountered: