Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    146
    Hi
    Yes, in the current version you can do it because you have all the integration source code available and you can modify it as you want. But in the coming version you will be able to do this easier than ever using behaviors to describe the actions to perform when symbols are found, updated or lost. You will encapsulate all your specific actions inside ScriptableObjects (TrackerBehaviors) so you can do whatever you want and edit the behaviors properties in real time preserving the all the changes. This is how the new inspector looks like.(Be aware that you can even set a different behavior per each target.)
    Regards.
     

    Attached Files:

    Last edited: May 26, 2017
  2. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hi community

    Thank you for all your support and comments (and for the patience). The new Arcolib iteration is almost ready I want to share a picture with you guys showing the new tool integrated to the Unity Editor. The model manager, which includes a more flexible interface and provides a better canvas for coming editing tools.
     

    Attached Files:

  3. mrmdesign

    mrmdesign

    Joined:
    Apr 18, 2013
    Posts:
    239
    That looks fantastic! I can't wait.
     
  4. arvrappps

    arvrappps

    Joined:
    Feb 12, 2017
    Posts:
    24
    When new version is coming ? As I'm new in unity current version seems more code oriented ..I'm waiting for new version to come and almost daily check the forum to see updates.
    I appreciate your hard work !!!
    Just one thing do some tutorial after releasing the version. Thanks !
     
    Malbers likes this.
  5. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,166
    @yezaldivar
    Please respond.
     
  6. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hey I really sorry!
    I forgot to answer this one. Yes, you can!. But be aware that this random images must be evaluated before being approved to be used as features models. First you get the images (files or memory stream), then create a FeatureModel object from each one using
    Code (C-Sharp):
    1.  
    2. FeaturesModel image1 = new FeaturesModel();
    3. image1.Load(your-image-file);
    4.  
    or from memory
    Code (C-Sharp):
    1.  
    2. FeaturesModel image1 = new FeaturesModel();
    3. image1.Read(your-image-data);
    4.  
    then evaluate the model quality level using the property
    Code (C-Sharp):
    1.  
    2. image1.qualityLevel;
    3.  
    if the image is good to be a model(target) then you should create a sort of hashmap setting the index position of this model (0 because is the first) and the string name of your desired function to be called. Of course this only one approach, you can do it your own way. Finally add the models to the FeaturesTracker in the same order they were created and start the tracker.
    When images are detected the tracker will return symbols with id (index position) so you can retrieve the proper function to call. You can also use Delegates in the hashmap instead of function names, that way you will be able to use C# lambdas.
    This should work. Due is a custom behavior you have to do all this steps, but is possible.
     
    Last edited: May 28, 2017
    jGate99 likes this.
  7. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    I'm having to manually change the zoom on the matcap rendertexture cameras, does anyone know an automatic way to change to FOV so the object takes up the whole view? I've got the cameras to target the spheres, because they have a 'known' position, and therefore a target for the cameras to aim at them. But I need to automagically make sure the sphere clips the top/sides/bottom of the view (see debug views on the left).

    Also need to find a better way to unwrap the skysphere. And maybe then I can use it to generate light probes, etc so the workflow can go back to normal Unity Standard shader for everything.

    Also the way it picks up the dominant light (can only select one) isn't that good I need to change that.

    arcolib_matcap.png

    Eventually the goal is to create a generic (insert model/mat/animations/etc here) system and it'll render that on your desk or where ever you aim a camera.
     
    pixelsteam and mrmdesign like this.
  8. mrmdesign

    mrmdesign

    Joined:
    Apr 18, 2013
    Posts:
    239
    Sounds like an awesome system.
    This would be great for giving AR objects semi-accurate real world lighting an reflections.

    Was relatively easy to retrieve the video texture and apply it to other objects?
    I am working on an Arcolib app where I also want to add a miniscreen. It works fine in the editor but shows a black screen on mobile.
     
  9. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    the cam output is available in the demos, and once you know where things are you can work out where to aim the 2 other cameras.

    as for applying it, that wasn't too bad because you're using normal space UVs
     
    mrmdesign likes this.
  10. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    Just checking that I haven't missed this in the docs, but it seems that arcolib interprets the markers when found as a 1m x 1m square? That way the default Unity cube (which is 1m) sits nicely on it taking up the whole area?

    This seems to be the case, which means we can then input and output distances between marker points.

    For whoever was asking about scale earlier, this might help? I'm printing the AR markers at 5cmx5cm, so I needed to scale everything by a factor of 20 in Unity so that the 1m cube fits on the 5cm marker.
     
  11. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,166
    Thanks for your reply, looks like Arcolib is ready for dynamic detection like vufuria.
    I intend to use it with AVPro Video Player, Has any one of user tried it with Arcolib (performance wise)?
     
  12. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Hi, everytime tracking is lost, the Gameobject is disabled. Is it possible to not disable the gameobject even when tracking is lost. I'm ok with it floating in the middle of my camera and resnap to the correct position once tracking is found.

    I need this rather urgently.
     
  13. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hi, you can replace the strategy to disable the gameobject in hierarchy with only disable/enable the render component inside it. In the FeaturesTrackerInspector.cs you can do this. The new version will have behaviors that makes this pretty easy to do but with the current version you can also do it.
     
  14. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    In terms of tracking accuracy, it looks like position is much more stable and accurate than rotation. I'm using an A4 piece of paper with four 5cm^2 tracking markers (1 to 4), one on each corner.

    Then in a script, I'm grabbing the number of markers found (usually 3, 4th can be obscured sometimes by the christmas ball light probe), then averaging the position to get the center of the paper, and averaging the rotation to align the paper.
    In the scene view, you can sorta see the paper isn't aligned with the bases of the marker cubes, sometimes it's on a bit of an angle. Amount of markers tracked and averaged doesn't seem to help with rotation (but position is better); the markers seem to lean a little.

    Potato quality webcam probably isn't helping much though, a lot of it's probably that.

    Also, is there some preference for markers? Like do RGB markers perform better than b/w ones? What about more complex shapes - the markers for 1-4 are fairly simple, not many features. Would I be better with 51-55 which seem to be more advanced?
     
  15. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    H
    Hi
    Barcode color markers provides more contrast against environment lighting variations, but detection accuracy is almost the same. For markers Ids the shape complexity will not improve or reduce the tracking quality. Using complex markers helps to keep them less tolerant to be similar to other shapes in the same context. Leaving a white margin after the black surrounding rectangle will actually improve the detection under heterogeneous scenarios (like real life). The tracking will be improved in coming versions mainly the stability when you miss for a few milliseconds the marker.
     
  16. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    Nice, good to know (I'm still a noob here).

    I don't know if you're planning it, and my work on this is certainly too hacky, but have you considered a toggle/tickbox for reversing the position so marker/s stay on the ground plane and the camera in Unity moves around the markers? Instead of the markers floating around in space?
     
  17. fox3192

    fox3192

    Joined:
    Jun 1, 2017
    Posts:
    1
    Hi!
    Is this asset possible to use face tracking like this?
     
  18. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    No yet, there are no face tracking modules integrated in the current version. That is a future update. But if you want to integrate it with third party asset like this it will be easy to do.
     
  19. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    If we use this approach you will need multiple cameras to visualize multiple markers at the same time (which is not very performant). If you need to simulate this you can implement a local gravity (see a previous post in this forum) over objects that will have the same result with better performance.
     
  20. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    I'm already using the tracker to look for 4 markers. It usually finds 3 or 4, and if it can only find 2 then it just doesn't update the view (freezes on the last good known position).

    Is that particularly bad? I also noticed when looking for the 4 markers it was a but more stable is I set it to handle a maximum of 5 or 6 markers. I might be imagining things, though.
     
  21. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    37
    Hi Yezaldivar,

    One feature i'd love to see (and this may even be possible to do already with some automation of the realtime marker capture system), is something akin to vuforia's extended tracking. Essentially what it's doing (I believe) is capturing the environment around the marker once it detects one and using that to extend the number of tracking points to a much larger area. This enables you to do things like pulling back very far from the object, or going far off to the sides without losing tracking. There is an obvious performance cost associated with this, but the payoffs are huge. Have you looked into implementing something like that?
     
    yezaldivar and mrmdesign like this.
  22. cossec

    cossec

    Joined:
    Jun 1, 2017
    Posts:
    1
    Hello,

    I just bought arcolib and I think it's one of the best AR asset! Great job, it's so easy to use it!

    Regards,
     
    mrmdesign likes this.
  23. mrmdesign

    mrmdesign

    Joined:
    Apr 18, 2013
    Posts:
    239
    This is a really great idea. I would be very interested in seeing something like this.

    I guess it would depend on the surrounding environment to a certain extent though. If you are surrounded by flat white space or continuing patterns it might not work so well.
     
    yezaldivar likes this.
  24. Kingtem

    Kingtem

    Joined:
    Jun 19, 2011
    Posts:
    18
    I wonder when will the new version release?
     
  25. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    Now that I've assigned a direction (x, y and z instead of just +y) I think I may have messed up some transforms....

    Also ignore the slight difference in camera direction, I was testing the lookat function, so in the left view it's just using the real camera's position and aimed at the guy's feet.



    AR_HexTest.png
     
  26. VRARAPPS

    VRARAPPS

    Joined:
    May 7, 2017
    Posts:
    4
    today I bought the asset .. its pretty good in tracking .. but
    > one thing when I rotate the image (to be tracked) along x axis the game object/3d model is not at its position ...it moves a little bit...means its not sticking to the image.
    > if my 3d model is in hierarchy then ARCamera looks it in game view (not hiding/disabling) of game objects when game starts.
    and when will you release the updated version ..please tell..I'm waiting...
     
  27. Tubbritt

    Tubbritt

    Joined:
    Nov 30, 2015
    Posts:
    19
    I've been following this thread since the beginning, always holding off from buying this asset waiting for the tracking to improve. Tonight I decided to just buy it and at least support the developer rather than just sitting back watching and waiting for the next release to make up my mind.

    After buying this, I'm happy I did not wait. It's clear to tell that even at this early stage that this could turn out to be the one AR asset for Unity that changes the game forever.

    I look forward to see what improvements come in the next release with regards to tracking. Right now I'd say it's tracking clearly feels like beta software and is probably not usable for an actual client just yet. That being said, for anyone on the fence reading this post trying to decide if you should buy now or wait, I'd still give this a two thumbs up and say go for it right now. Support the developer and get a head start on learning how it all works as this really could indeed be a game changer when it comes to AR.

    Great work and a big thank you to the developer. I have a very good feeling about this project being huge.
     
  28. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    370
    Hi, Probably going to buy this today anyway just to support further development and have a little fun,
    Q: On the pas-through camera to Android can I acces the native zoom of the device like I do in NatCam?
    Q: ETA Archolib Update?
    Q: Do you know about or have already tried out the ODG R7 or the upcoming R8 and R9?
     
  29. lupamac

    lupamac

    Joined:
    Jun 4, 2017
    Posts:
    2
    I've bought this asset three days ago and I'm very satisfied. I had some experience with Vuforia and, while it took some time to make it work, the results were really good. However, after their crazy change in license price I had to find an alternative. I tried various SDKs and this asset is the only one I managed to make it work. The results are good (still not as good as Vuforia, but I think it won't take too long to be on par). I still have some question:

    1- How can I rotate and change the position of the 3D models? When I click on the object I can scale it in the inspector, but the rotation and position is not accessible to me.

    2- Is is possible to use videos as the augmented object? If so, how should I do it?

    3- Has anyone compared Arcolib and Easyar. I think for me Arcolib will probably be the best option, but it would be good tho have a free alternative to use in classes (for the students being able to develop Educational Apps). I never manage to make Easyar work and there is practically no info in English for this SDK.

    Many thanks to the developer and to anyone who could help me with that!
     
  30. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    Hi lupamac

    I'm still somewhat of a noob so take these with a grain of salt.

    1 - it seems arcolib, when detecting a marker, will align a 1x1x1m cube to the marker. If you go into the demos and drag the marker prefab in, you'll see its size and position. If you want something else, the trick is to make the marker an empty gameobject, and make (whatever you want) a child of that. Scale, rotation, position will then be available, and work in localspace.

    2 - see above for having something be parented to the invisible markerobject. Also, in Unity they recently changed the way movie textures work, I think in 5.6 or something. Look up documentation for that, there's probably news and an example somewhere.

    3 - I haven't tried that, o can't say.
     
    yezaldivar likes this.
  31. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    It will be great if this system
    1. has an option to not rely on prefabs but rather gameobject in the scene.
    2. does not disable the gameobject when tracking is lost. So the disabling of the mesh renderers comes in as an option
    3. Has a array of markers option so that any of the markers will be sufficient for the projection of the AR objects.
    I find the using of prefabs makes it hard to troubleshoot very complicated gameobject with networking and fsms etc.
     
  32. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    Like I said to lupamac above, the trick for now is to just use the marker prefabs (I have a different prefab for each marker number, 1, 2, 3, etc...) as pointers in the scene. Then, each update, search for the markers, and copy their transform to an object already in the scene. If the markers are deactivated, the transform doesn't get updated, and the important object doesn't activate/deactivate. It just sits where the marker last was.

    I think, don't treat the marker prefab as the important gameobject, but literally as a marker, that you can grab position and rotation from as required.
     
    yezaldivar and coverpage like this.
  33. oskarBearshift

    oskarBearshift

    Joined:
    Aug 17, 2016
    Posts:
    1
    Hello, it is possible to publish for windows 7 with this library, I have another question I can still use the unity UI to interact with the marker object (rotate, scale it etc.) thanks
     
  34. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hi
    Q1 - The current native camera plugin does not have zoom access, but it will have.
    Q2 - The next version will be public in about two weeks I hope...
    Q3 - Not yet, will be interesting to integrate apps with those glasses.
     
  35. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hi, thanks to you for your purchase and support.
    Here goes my answers:
    1- If you need to perform some custom rotation/translation/scale on your 3D objects representation just use a simple hierarchy in the game object you use in the binding. When symbols are found in the scene Arcolib will controls the rotation and position of the object used but you can add as many children objects as you want in this object and put them in your desired position and rotation, they will be relocated in the space relative to its parent.
    2 - Just use a plane or any other 3D object as child of the parent game object used in the binding and set a VideoTexture to it. You can start with the Checker prefab, unlink the object from prefab, and replace the cube for your desired object with the video texture
    3- I will prefer the community respond to this.
     
  36. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Yes, you can use this in Windows 7. For Unity UI interaction it should work like normally you do using raycast.
     
  37. lupamac

    lupamac

    Joined:
    Jun 4, 2017
    Posts:
    2
    Thank you Jesus and Yezaldivar, I managed to chance the position of the object after creating an Empty Child as you suggested. I'll try later to use a video as augmented.

    I'm very happy with Arcolib. While the models are still not as stable as with Vuforia I already saw some advantages. With Vuforia I could not focus moderately close with most smartphones and had to print big markers. Arcolib does not appear to have this problem, the camera focus as it should.
     
    yezaldivar likes this.
  38. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    486
    Yeah the tracking isn't 100% smooth but I found some ways around it.

    Google for 'smooth follow camera', I think there might even be one in standard assets somewhere. Check out how it smooths and dampens the position of the camera. Except, instead of following a car or whatever, you're following the empty tracker object.
     
    pixelsteam, yezaldivar and mrmdesign like this.
  39. Charles-Colaco

    Charles-Colaco

    Joined:
    May 18, 2015
    Posts:
    4
    Hi Yezaldivar, I have purchased this package and am extremely pleased with Arcolib.
    I am facing a minor issue. I hope someone can point me in the right direction.
    I have 2 Scenes, Scene1 is the main screen and Scene2 has the ArcoCameraRig and the Tracker.
    Scene1 launches first and I have a script
    Code (CSharp):
    1. void Update () {    
    2.   if (Input.GetKeyDown(KeyCode.Space))
    3.             SceneManager.LoadScene("Scene2");
    4. }
    Pressing Space Launches Scene2 , the Webcam Starts and the AR starts working.

    On Scene2 I have another Script
    Code (CSharp):
    1. void Update () {    
    2.   if (Input.GetKeyDown(KeyCode.Space))
    3.             SceneManager.LoadScene("Scene1");
    4. }
    Pressing Space Launches Scene1.
    Pressing Space on Scene 1 again, takes me to Scene2, But this time the camera does not start (no light on the webcam).the full scene is a sold color (#00031A05)

    Edit: My target Platform in Build Settings is Windows x86
    Unity Version: 5.6.1f1
    ArcoCameraRig => InputSource => WebcamTextureInput
     
    Last edited: Jun 11, 2017
  40. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hi
    Thanks for your comments.
    Do you have any DontDestroyOnLoad or additive strategy on your scenes? The InputSourceController don’t allow duplicated instances of ArcoCameraRig and it will start the camera in the Start() message of MonoBehavior. Please verify that this message is being called. Put a Debug.log message in the InputSourceController.Start() function. When you exit from the scene the InputSourceController automatically destroys the camera input so if for some reason the Star() message is not being called the camera never starts again. Try using the NativeCamera instead of WebcamTexture.
    Regards
     
  41. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Thanks @deddygnwn14 for the fix. This is already corrected in the new version. Regards
     
    Gustavo-Quiroz and mrmdesign like this.
  42. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    451
    Hello,

    I am working on a 3D game(not AR) ,I need to track my hands for a game(with a webcam), I would like to use your plugin and to put 2 markers on each hand.
    I think to use Arcolib, could you please confirm it's possible to use Arcolib for my case ?
     
  43. Gustavo-Quiroz

    Gustavo-Quiroz

    Joined:
    Jul 26, 2013
    Posts:
    37
    Arcolib is an awesome product for a lot of reasons, but particularly in this case I would use this plugin also from @yezaldivar: http://u3d.as/yYA
     
    yezaldivar likes this.
  44. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    451
    I created already a color tracker system in some hours, but it's not enough.
    I have to detect rotation in all axles, and the scale.
     
  45. yezaldivar

    yezaldivar

    Joined:
    Aug 24, 2016
    Posts:
    146
    Hi
    It really depends on how fast you are going to move your hands. When you move your hands too fast, the motion blur will kill the image so the markers may be affected. Arcolib detects planar images, for this reason in a very aggressive orientations it may also fail. ColorTracker is more accurate for this purpose, and there is an AR demo included where you can achieve some basic depth estimations (for push and pull), 3D orientations are not possible with color tracker but some 2D orientations can be achieved using two targets in each hand (one in a wrist and other in the middle of forearm). Regards
     
    Gustavo-Quiroz likes this.
  46. shogoki_vnz

    shogoki_vnz

    Joined:
    Nov 5, 2014
    Posts:
    14
    Hi, I was having the same problem, the cause is that the "_webcamTexture" variable is not null the second time that the script try to make the WebCamTexture instance, I solved it editing the Close method on WebcamTextureInput.cs as follow:

    Code (CSharp):
    1. public override void Close()
    2.         {
    3.             if (_webcamTexture)
    4.             {
    5.                 _webcamTexture.Stop();
    6.                 _webcamTexture = null;  // Forcing the var to null
    7.             }
    8.         }
    9.  
     
    Charles-Colaco and yezaldivar like this.
  47. Charles-Colaco

    Charles-Colaco

    Joined:
    May 18, 2015
    Posts:
    4
  48. arvrappps

    arvrappps

    Joined:
    Feb 12, 2017
    Posts:
    24
    Hi Team,
    I'm a newbie and I want this really bad.

    I want 3 models (obj1, obj2, obj3) to be tracked for same ImageTarget(tracker) and I want to activate them for some input like press of a button.(only one at a time) When Image is tracked suppose obj1 will be shown and when I press next button then it will show obj2 and so on... I want to keep only one game object to be active to tracker. How to achieve this.??? I'm not able to figure out as the code is somewhat hard to understand.

    In vuforia I did this by keeping all the objects as setactive to false and setactive true will be done only on specific input button.

    In arcolib I added 3 gameobjects on same Data in Feature Binding on a Tracker. But only I'm able to see only first Gameobject I attached in feature binding. [See image below]. or HERE (https://image.ibb.co/heAp7k/Screen_Shot_2017_06_19_at_1_29_12_PM.png)

    Someone please help me.

    Want to keep only one Gameobject active out of 3 (obj1,obj2,obj3) at runtime for same tracker... OR is there is any other way ??

    Please Help ..
     
  49. mrmdesign

    mrmdesign

    Joined:
    Apr 18, 2013
    Posts:
    239
    Hi @arvrappps
    Hopefully I am understanding you correctly.

    I would create an 'Empty' object and use that as your Features Binding object.
    Make obj1, obj2 and obj3 children of that object.
    Create a UI to show / hide obj1,2 and 3 as required.

    Does this help?
     
    yezaldivar likes this.
  50. arvrappps

    arvrappps

    Joined:
    Feb 12, 2017
    Posts:
    24
    @mrmdesign
    Thanks for reply...
    I attached all there gameobjects as child of empty gameobject Tracker but It doesnot matter that in empty object called "tracker" has any child or not. The first gameobject/prefab which is used in feature binding is showed on Image target. I want to show gameobjet of my choice on runtime and disable other two and change models at runtime ...
    need to know the workflow.
    Thanks!
     
unityunity