Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Arcolib - Augmented Reality Components

Discussion in 'Assets and Asset Store' started by yezaldivar, Jan 20, 2017.

  1. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Hi
    You will need only one binding. (One model and one gameobject) The gameobject will be used as parent of multiple objects (as many as you need). Then you will place this simple script that I wrote for you in the parent game object and set the objects you want to control sequentially. With this approach you can place the objects relative to its parent in the proper position, rotation and scale, when the parent changes relative to the marker they will also change relative to its parent. See the picture attached and the script. The script uses arrow keys to change the objects activation but you can use your own strategy. The tracker inspector may look different because I use the new version (available pretty soon) but is tha same idea.
     

    Attached Files:

    arvrappps and marcipw like this.
  2. arvrappps

    arvrappps

    Joined:
    Feb 12, 2017
    Posts:
    24
    Thanks a Ton !
     
    yezaldivar and marcipw like this.
  3. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    You can actually integrate NatCam, I already did it and I got a better performance on mobiles and also native camera function like tap to focus, zoom and flash light.
     
  4. arvrappps

    arvrappps

    Joined:
    Feb 12, 2017
    Posts:
    24
    Hi All ,
    Anyone here please tell me how to do this ... I'm not able to do.
    And one more thing when scene starts game objects/models are active and not displayed on game view and once detected after that they disabled.. why they are not disabled when we start the game ..And if they are enabled why we are not able to see them.
    Please tell me how to detect when tracker is found as I want to pause background music.
    And I am waiting for update to to make things easier...
    Thanks !
     
  5. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Hi
    For events listening please see this quick implementation (attached files). You just have to adapt it to your code. (implement ISymbol interface in Symbol struct).

    When you attach a gameobject to bindings you must set its initial state enable or not as you need, when symbols are found the binding will try to enable the gameobject, when symbols are lost it will disable the object. The parent gameobject contains multiple components inside (like renderers, colliders) and other objects, please verify that those components are enabled. Those components are not handled by the library, allowing you to perform your custom actions.
     

    Attached Files:

    Gustavo-Quiroz likes this.
  6. The-Real-Zap

    The-Real-Zap

    Joined:
    Jan 23, 2015
    Posts:
    7
    Hello Yoan,

    I bought your plugin a few days ago and it does work, indeed :) What I don't like is the pretty sparse documentation (mostly looking at the code inside the samples) and the quality (stability) of the tracking, as mentioned a few times here. You were talking about the upcoming update, which, amongst other things, should feature improved tracking. When is the new version expected to be released?

    Also, keep up the good work :)
     
    marcipw, lucasbenders and jGate99 like this.
  7. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    Hello yezaldivar,

    I tried to use ImageUtils.LoadImage(FilePath) in order to load textures that previously I saved on disk using Persistent Data Path, it works great in Editor and Android but I can't make it work in iOS, is there any specific way to use it?

    Also if i try to load directly those textures as markers using FeaturesModel.Create(FilePath) but it never works, I have to use FeaturesModel.Create(Texture2D), do you have any recommendation?
     
  8. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    Some more info about ImageUtils.LoadImae(FilePath), this is the code I use:

    Code (CSharp):
    1. filePath = Path.Combine (Application.persistentDataPath, fileName);
    2.  
    3. if (File.Exists (filePath)) {
    4.                         Debug.Log("Trying to load from:\n" + filePath );
    5.                         m_AR [i].feature = ImageUtils.LoadImage (filePath);
    6.                     }
    And this is the Log I get in Xcode:

    Code (CSharp):
    1. Trying to load from:
    2. /var/mobile/Containers/Data/Application/C60EAEE4-9E74-4A19-A64D-0C63C6C27371/Documents/event video.jpg
    3. <_LoadData>c__Iterator0:MoveNext()
    4. MovementEffects.Timing:Update()
    5.  
    6. OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /Volumes/build-storage/build/master_iOS-mac/opencv/modules/imgproc/src/color.cpp, line 9716
    7. libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Volumes/build-storage/build/master_iOS-mac/opencv/modules/imgproc/src/color.cpp:9716: error: (-215) scn == 3 || scn == 4 in function cvtColor
    8.  
    9. (lldb)
     
  9. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Hi
    There are two things that would produce this error on iOS. The first when the file path is not valid but you validate this, the second one is when the image has more than 3 channels (example a .png file). For some reason the image is being loaded with 4 channels and that’s the problem when trying to convert the image data to Unity texture. I will add a workaround for this situation in the new version, for now I think the image is being loaded in ARGB on iOS and that’s the problem. Please check that the image file path is valid this could be the reason because FeaturesModel.Create is not working.
     
  10. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    Images are actually jpg and RGB24 (Tested on Xcode and Editor).
    I'm sorry I didn't explain it correctly, FeaturesModel.Create does work, but feature quality is 0 in all images (Only in iOS, Editor and Android were fine).

    I found a workaround for this problem, instead of saving textures on disk in order to create dynamic feature models, I create the features directly after downloading each image and then save the feature models on disk:

    Then whenever I need the features I just load it

    This seems to be actually faster than trying to load textures from disk to Unity, but it would be great to use ImageUtils.LoadImae(FilePath) and FeaturesModel.Create(FilePath) on iOS.
     
    yezaldivar likes this.
  11. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Gustavo-Quiroz likes this.
  12. Sakeus

    Sakeus

    Joined:
    Sep 29, 2016
    Posts:
    2
    Hey, I'm working on a program using this AR plugin as well as a QR code plugin found here. The problem is that if I turn the QR code plugin on, the arolib stops rendering the webcamtexture, I'm assuming it has something to do with the QR code reader overwriting the webcamtexture for arcolib with its own or something.
    Is there some way to re-initialize the webcamtexture for arcolib?
    Thanks for any replies.
     
  13. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Hi
    You are probably facing some racing condition between the two plugins in the capture phase. One powerful feature in Arcolib is the ability to implement your own custom input (for scenarios like this) and for this particular case I think you will need to implement a custom InputSource, where you get the feed from the camera, execute the QR detection and then propagate the image data to the Arcolib trackers, this will synchronize your app. Arcolib will have built-in QR detection/generation in the coming version (in about 10 days), this will make the things easy but anyway if you synchronize your app it should work too. Please see the SimpleImageInput or WebcamTextureInput script in the demo scenes, this will give you the idea on how to implement your input.
     
    marcipw likes this.
  14. lucasbenders

    lucasbenders

    Joined:
    Jun 12, 2015
    Posts:
    3
    Arcolib works with Unity's native VR "Cardboard"? It did not work on Android.
     

    Attached Files:

  15. Gunhi

    Gunhi

    Joined:
    Apr 18, 2012
    Posts:
    300
    Does this work with some images that have very little details. For example: printed single Alphabet letter (A, B, C, D). Like the below image?
     
  16. Sakeus

    Sakeus

    Joined:
    Sep 29, 2016
    Posts:
    2
    Nice, that works perfectly, thanks for the quick reply. Your plugin may have somewhat saved our short term project.
     
    yezaldivar likes this.
  17. lnguy1948

    lnguy1948

    Joined:
    Apr 15, 2017
    Posts:
    6
    Would this work along side Apple ARKit? I was thinking of scanning an image using this asset to determine initial position for 3D models for Apple ARKit. Thanks!
     
    JoeStrout, yezaldivar and marcipw like this.
  18. marcipw

    marcipw

    Joined:
    Apr 18, 2013
    Posts:
    239
    I have been wondering this too. @yezaldivar said he has built Arcolib so that it plays nice with other tools so I think it could be adapted to work... He is the expert though.
     
    yezaldivar likes this.
  19. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Yes it works but you have to implement your custom camera rig (Arcolib provides all tools for this), the current camera controller is not designed for stereo display. In future versions I will add an example, but current scenes has to be modified to be used in VR.
     
  20. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    It probably works for detection. Those images will have some good features to detect. The tracking may not be accurate due the rating for this image is just good (3 stars) (can be very good (4) or excelent (5))
     

    Attached Files:

  21. lnguy1948

    lnguy1948

    Joined:
    Apr 15, 2017
    Posts:
    6
    Does this actually work? Which smooth follow camera would you recommend?
     
  22. codeopensource

    codeopensource

    Joined:
    Apr 16, 2017
    Posts:
    1
    Hi,

    I saw in your example "How to use" the moment when you transform a normal image... I want ask you:
    In what format it is this final transformation? I can make this trasnformation in php, do you have knowlange about this?
    I want creat this target images dinamically with web request...
    Thank you!
     
  23. Chihippo

    Chihippo

    Joined:
    May 31, 2014
    Posts:
    3
    Quick questions: Is there a limit to how many targets you can add to the Features Tracker Inspector script as our current project may in the end require around 3-4000 total (I know!)? And as you can guess the second question is if there is a way to bulk add Data to the Feature Bindings portion of the script rather than have to click "plus" and add them one by one.

    Thanks for your time!
     
  24. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    498
    Just a guess here, but for each thing it's looking for it probably runs a search pattern over the (webcam/whatever) image.

    I've tried tests with both the features AND the number (those colored squares) and it seemed OK, but I was only looking for a handful, and I'm running a quad core at 4Ghz and have a 1070, all crunching a potato quality webcam image (the webcam only updates at ~30Hz too...).

    So, doubtful it'd be happy natively handling 3,000 different targets. could be wrong though.
     
  25. Kingtem

    Kingtem

    Joined:
    Jun 19, 2011
    Posts:
    18
    Hi, any news about the NEW Version?
     
  26. Wuchi3d

    Wuchi3d

    Joined:
    Apr 2, 2015
    Posts:
    2
    Hello,

    Does it work for VR Cardboard? I need image recognition for 360 VR view.

    Best regards,
    Goran
     
  27. CarbonConcept

    CarbonConcept

    Joined:
    Sep 2, 2014
    Posts:
    11
    Bump for the new version. Is it pending review?
     
  28. detomato

    detomato

    Joined:
    Aug 16, 2013
    Posts:
    54
    Can anyone who have this plugin, please make a performance comparison with Vuforia. Its great if it can be in video form.

    Appreciate it.
     
  29. marcipw

    marcipw

    Joined:
    Apr 18, 2013
    Posts:
    239
    Hey everyone,
    I just wanted to quickly stop by and post. I am really looking forward to the new version just like all of you.

    @yezaldivar has been really (really) busy with a few developments in his personal and professional life at the moment. I know he really wants to get the new version out there but he does have a lot on his plate....

    I am sure he will reveal all as soon as he is ready and I hope he doesn't mind me weighing in here. He is a really helpful and considerate guy and I didn't want anyone thinking he was just MIA.
     
    yezaldivar and JoeStrout like this.
  30. Deleted User

    Deleted User

    Guest

    Hi,
    there seems to be a compatibility issue between 2017.1 and native camera, as it is crashing on any Android device I have built it on (Honor 7, Lenovo Tab2) without producing any logcat errors.
     
    Gustavo-Quiroz likes this.
  31. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Hello. I bought your plugin yesterday and trying to get it working with Google Tango.

    The WebcamTexture option doesn't seem to work, because Google Tango SDK wants camera access too. (creates conflicts)
    So I'm currently trying to use a RenderTexture and reading it into a Texture2D to send it to the Arcolib code (without success).
    Another option is to convert to YUV texture from the Google Camera texture (Only a shader was provided in the SDK for the conversion).

    What format does it expect?
    I guess the pixel data needs to go into Apply() method in InputSource.

    Any ideas how to get this working?
     
  32. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I've been thinking the same thing. Use Arcolib to position a model, and then ARKit to keep that model "live" (and solidly positioned) even when the marker goes out of view.

    I started downloading all the beta bits needed for playing with ARKit today, but then noticed that I'd have to install a beta of iOS 11 on my device... and I'm not terribly eager to do that (especially given how many 32-bit apps I still rely on).

    Has anybody else tried this combination yet? It sounds like a slam-dunk winner to me!
     
    lnguy1948 likes this.
  33. marcipw

    marcipw

    Joined:
    Apr 18, 2013
    Posts:
    239
    I excitedly installed everything. iOS 11, High Sierra, the latest Xcode, Unity etc.. and then realized that my iPhone 6 wouldn't work as it didn't have a qualifying chip. Arrgh! I have been hunting around for cheap deals on on an iPhone 7 but with the next one coming out in September, it seems silly not to wait a few months. I may just get an iPad pro anyway.
     
  34. lnguy1948

    lnguy1948

    Joined:
    Apr 15, 2017
    Posts:
    6
    I would recommend getting the iPad Pro 10.5 I have both the 12.9 and 10.5 iPad as well as the iphone 7. The sweet spot for AR screen size is the 10.5. I'm working on a build that utilizes the arcrolib and ARkit. I can say the performance on the A10X iPad is amazing!
     
  35. devDreamer

    devDreamer

    Joined:
    Apr 20, 2015
    Posts:
    3
    Hi all,
    I'm not sure this is the place to ask but here goes...
    I would really appreciate a word of advice, I searched the entire web for this but couldn't find an answer. Maybe it's just trivial I don't know... So, Should I buy a web camera for the development using this plug in ? currently all I have is the camera that came with my laptop built in to the screen. Not the most convenient thing for testing code. I guess I could redeploy to my smartphone every testing cycle which sounds a little slow to me to be honest.
    Is it best to use 1080p webcam or 720p webcam ( Should I buy one)
    Thanks and all the best,
    Ido
     
  36. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    38
    In my opinion, 720p is more than ok for testing, I know it would be easier to have better quality but thinking on final devices, I think it is better to work with environments similar to the worst devices that you want your app to work.

    The only advance I see by testing and developing with an external webcam is that you could easily move the camera around instead to waving the markers in front of the camera.
     
    JoeStrout likes this.
  37. devDreamer

    devDreamer

    Joined:
    Apr 20, 2015
    Posts:
    3
    Thank you, I guess I prefer it that way.
    All the best,
    Ido
     
  38. Sprarage

    Sprarage

    Joined:
    Aug 1, 2013
    Posts:
    7
    Are you working on 3D object target recognition for Unity SDK?
     
    marcipw likes this.
  39. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
    Hi
    I want to apologize to all the community because for personal problems I had to postpone the release of the new version. I know you guys have waited too much but it will takes two weeks more. Sorry for the inconvenience, thanks for your patience.
     
    Malbers, neuston, Kingtem and 3 others like this.
  40. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    Hi, I wrote here with a few questions last month. I was wanting to buy but a few other assets came between first. Thanks for your reply and helpful answers.

    I have just been blown away from what ARkit can do, sadly I have no mac or apple devices and I actually only want to stay with android unless Apple eventually comes out with their iGlasses. It’s Android because soon we will have the ODG R9 and R8 to play with.

    So I started trying out Wikitude, Hudan, EasyAr, Vuforia and realized that pricing is just mind boggling and not worth it at this point in time.

    I do however think VR has no real future, but AR and MR does.

    The future is SLAM markerless tracking, so here is my question.


    Do you plan to support some kind of SLAM in the future and if yes, then roughly how long into the future?

    Thanks
     
  41. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    147
  42. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I think it's unreasonable to expect a lone developer, in his spare time, to reproduce what an entire team of highly-paid world-class vision experts at Apple were able to do. Apple's ARKit is doing things that a few years ago, reasonable experts in the field claimed was impossible. Arcolib is awesome, but it's not going to reproduce that.

    That said, I'm hoping that we'll have good luck integrating Arcolib with ARKit, so we can (for example) use markers to place things in the AR world, and then ARKit to keep them stable as we look around (even moving the marker itself out of view). But I'm waiting for the next update before I start doing experiments on that myself...
     
    lnguy1948 likes this.
  43. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406

    Yes, I agree. You are obviously Apple, I am Windows and Android.

    This means Apple just tossed Android to the scrap heap at this moment as far as AR is concerned.

    I am just asking, as I don’t know what could be possible from some genius programmer. And maybe here is one making ArcoLib.

    At some point someone will do it and greater things have been achieved in the past from individuals and not just teams. Oculus was also just an Idea, but now look at where it’s all going.
     
  44. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    To prove a point I just bought ArcoLib. I don’t care if the developer can realize SLAM on his own or not. But if everyone would do now what I just did and buy ArcoLib, well!! Who knows?
     
    marcipw and JoeStrout like this.
  45. marcipw

    marcipw

    Joined:
    Apr 18, 2013
    Posts:
    239
    Well done! @yezaldivar will (and has) done great things with Arcolib. I am glad there are more people who feel the same as I do.
     
  46. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406

    And now, a few stupid questions. As I noted I just bought this asset today and will start tomorrow to have a look at it.

    But why should one need to implement ArcoLib into ARkit, when Apple ARkit can do that already that what we would like ArcoLib to do?

    Is it not that we would like ArcoLib to do what ARkit can do?

    Or would mixing both worlds, bring Android back without needing Tango? Or are we doomed to just Apple.

    I do like Apple, but I don’t want to be pushed into having to save up for an Apple device and machine just for Xcode. Why not both?

    “Long live the Android with an apple in its hand”
     
  47. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    Please see above post
     
  48. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    ARKit can find and track markers we've programmed into our app? I wasn't aware of that. Can you provide any details on this feature?

    I am sure that now that Apple's shown what is possible, Google/Microsoft/others will copy it (more or less) within a few years at most.

    But also within a few years, I expect to see true AR glasses burst onto the scene. It makes no sense for Apple to have invested all this into AR just for phones. I am certain they are working on glasses, which will be lightweight, performant and stylish.

    And if not, they will miss the boat, because other products like Hololens, Mira Prism, Meta 2, etc., are getting better. They're all lacking in one way or another now, but if you took the best features of each and combined them, we'd pretty much be there now. Somebody will do it. (And then competitors will swoop in with very similar devices.)

    When that happens, the world changes. This is going to be bigger than smart phones. But I digress.

    I'm not certain, but can't you use Cloud Build?
     
  49. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    No I can't.

    I do hope so.


    Yes, they will most probably be called iGlasses.


    Google is dead, Hololens is too big, Meta is too big....ODG will slave the way to smaller and better and starting with a snap dragon 835, not bad at all.

    Yes, there you are right.



    No
     
    Last edited: Jul 31, 2017
  50. marcipw

    marcipw

    Joined:
    Apr 18, 2013
    Posts:
    239
    I just got a 10.5 iPad Pro on your recommendation. I am really loving the pencil too! It feels way more natural than my Surface Pro.

    After a client meeting on Thursday, I have some more AR work coming up and they are very keen to use ARKIT and an image tracker solution. They were looking at Vuforia because of the extended tracking but Arcolib + ARKIT should do the trick way better for less cash. That way they are only really paying for my fee's.(most of the team have very recent iDevices)
     
    yezaldivar and lnguy1948 like this.