-
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
Fix for custom marker problem (issue #164) #168
Conversation
Fix for issue: #164 Added new if statement. Example usage: `<a-marker-camera preset='custom' url='/my/path/mymarker.patt'></a-marker-camera> `
im not sure i understand. Custom markers can be reached with Why doing a preset 'custom' which does the same thing ? |
@jeromeetienne |
If it is so, it May be better to fix the issue rather than working around.
Thanks
…On Wed, 23 Aug 2017 at 06:43, wimvdc ***@***.***> wrote:
@jeromeetienne <https://github.com/jeromeetienne>
Custom markers don't seem to work (see issue #164
<#164> and issue #127
<#127> )
If you check the "old" code there seems to be no way to reach:
arProfile.defaultMarkerParameters.patternUrl =
/value/form/a-marker-camera/components.patt
which seems to be required to recognize the custom pattern. In other cases
it defaults to the Hiro pattern.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#168 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPcIi6fX7uo3jvMp0uVyYCYR72lV763ks5sa7v0gaJpZM4O9oDs>
.
|
Reverted my changes
@jeromeetienne Yes you are right. |
hi @wimvdc following isn't working for me
attached is the patt file (compressed) |
@kumarahir You need build the source code from this PR (and thus my branch) yourself since the PR hasn't accepted yet. |
Hi @wimvdc thanks for the help so far, having the same issue here, using this PR and generating new files from this src, and when I try and run this I get this error Tried with a very simple marker and even had a go at the one posted by Kum, still the same error. [update] OK seems to be that it does not find the .patt at all, tried with relative and absolute url and nothing, but hardcoding it on line 89 instead of using _this.data.patternUrl works fine |
@Noko-Noko Seems like you definied your marker tag incorrect. |
@wimvdc I see, me and @kumarahir did the same "mistake" as we used what Jerome suggested, ie: patternURL="patth/to/.patt", but you are using just url="patth/to/.patt", and because on your amended js you are using _this.data.patternUrl so everything added up, but you are right just changing patternURL to url using your branch did the trick, cheers! |
@wimvdc Thanks a bunch for that branch, my custom patterns also work now 😁 |
@wimvdc many guides refer to the custom pattern attribute as But I too want to thank you for this branch! Helped me along too. |
I too cannot get the custom marker to work. Beyond that, any idea how to create a custom marker that could wouldn't have to be printed out but rather drawn on something? An example would be if I drew the "marker" on my hand and have the image show up there. Perhaps the marker could be like a smiley face... That is the angle I'm trying to go for but the only marker information I'm finding is for creating the "hiro" style markers with the big box etc... and having the physical marker printed out. Any help would be awesome!! Thanks |
@mevanloon Thanks for the feedback. I'm following/respecting Jerome's documentation (see a-frame/README.MD). But I will check if it's possible to support them both. @zspringer You always have to 'train' your markers. What you could do is make your drawing on paper, scan it (or take a decent picture) and train it. That way you have the .patt file to use in your code but you still have your own drawing on paper. |
@zspringer I'm afraid the black box is needed. The black box is the best way of keeping AR content in view as much as possible. |
Yeah, I'm finding that out just now which is a bummer. ar.js doesn't support borderless markers as of now. I've seen apps that use markers that can be hand drawn and the marker is recognized (example: draw a basic smiley face on your hand) but I have no idea what type of tech they are using to do so. Ideas? |
Is there an eta on this being merged? |
@wimvdc @Noko-Noko How did you guys generate new files from this PR without the build process? |
@ronilitman Not. I used the provided build 'tools' |
I created .patt files via this page: Works perfectly. |
Hey @jeromeetienne! Love this tool -- it's been very helpful to me in my new explorations with Web AR. I'm currently working on adapting a custom marker myself, and I've reached the same conclusion that the folks above have reached. Could this PR get merged soon? |
Ah, custom markers have been broken since about the last major rewrite @jeromeetienne this would be great to get merged soon. #236 looks like it also gets to the root of the problem! |
Hi @jeromeetienne, awesome tool! I'm very new to coding in general. I'm trying to get custom markers to work. I tried a lot of things but I had no success. I used this generator to create my .patt file:
Thanks! Any help is welcome :) |
hey you gotta add this
}else if( _this.data.preset === 'custom' ){
arProfile.defaultMarkerParameters.type = 'pattern'
arProfile.defaultMarkerParameters.patternUrl = _this.data.patternUrl;
arProfile.defaultMarkerParameters.markersAreaEnabled = false
}else {
// console.assert( this.data.preset === '', 'illegal preset value
'+this.data.preset)
}
search for "illegal preset value", and add whats above
|
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
|
Hi @mattGraphics, actually issue with the custom marker is not resolved in the main branch, but you could find a working fix in the commits tab above. |
Many thanks @PohlodSlavik - I've tried the solutions offered, but nothing worked for me. it looks like it was merged by Jerome 4 days ago: but still doesn't work for me. I'll wait until I hear if it works for everyone else, then at least I know it's something I'm doing wrong :-) |
A newer PR with the exact same code changes was accepted instead of this one, should work now. |
I don't understand what is the problem with custom markers. Using the example of the attached code it works perfectly, with the native marker. But trying to use a custom markers doesn't work. Please help.
|
Fix for issue: #164
Added new if statement.
Example usage:
<a-marker-camera preset='custom' url='/my/path/mymarker.patt'></a-marker-camera>