Search Unity

Model positioning with good precision

Discussion in 'VR' started by Gitravail, Mar 1, 2019.

  1. Gitravail

    Gitravail

    Joined:
    Mar 1, 2019
    Posts:
    4
    Hello world ! (original I know)

    I'm currently working on a Proof of Concept between BIM and Mixed Reality.

    I've done some tutorials on Hololens Academy (100, 101, 210, 211, 212) and I'm okay with the way it work.
    I've also expermiment Vuforia for image targets recognition and I've search some already made apps and I found BIM Holoview and Trimble Connect.

    I think I'm able to go further and I want to overlay a virtual wall on the real one (with at the most a 5 centimeters offset). I've got the model of the real wall with a millimeter measurement precision.

    What I was thinking to do is to place two image targets one for positioning and another one for orientation and scaling. I think world anchors would help me but I really don't know if my way to think is the right one.

    So what do you think about that ? I've you got any advice ?
    Thanks a lot for your light and if you want other details don't hesitate.

    Raphaël.

    Sorry for my English
     
  2. Jarediavionic

    Jarediavionic

    Joined:
    Jan 6, 2017
    Posts:
    71
    From my personal experience your way of thinking is mostly correct. If you are using an image target you only need 1 image target for both positioning and orientation. As long as the image target is in the same spot in both the real world and the unity file.

    You do want world anchor to help stabilize and position it, but make sure you dont apply the world anchor until after the image target is recognized. The world anchors lock the hologram coordinates so once the anchor is applied it has to be removed before the hologram can move.

    You mentioned vuforia, you may want to look into the mixed reality toolkit and their poster calibration sample. That way you dont have to go through vuforia servers for your image targets.

    Also once you get it up and running view the hologram from various angles/ distances to make sure that any offset or drift is within your tolerance threshold.
     
    Gitravail likes this.
  3. Gitravail

    Gitravail

    Joined:
    Mar 1, 2019
    Posts:
    4
    Thanks for your help, unlikely I can't open the PosterCalibrationSample (it seems a little bit old and VS don't like that).
    But it's not a problem at all, your answer guided me very well and I've understand more precisely the way of doing precision alignement.

    I still have a big question with the scaling of my model. I've done the good measurments but Unity seems to have is proper units so I've to scale the model with a second marker to perfectly align it.

    I've seen the video below :



    And it's exactly the same thing I want to do (I've set the good timer so you will see directly the right feature) but I don't know how to place my model with two markers (what about the hierarchy ?).

    I've you got any idea about how they done it ?

    For me I've to make a positioning part and once the model is positioned on the marker I've to scan the "Rotation & Scale target" to overlap (Rotate and Scale) perfectly. I'm good ?
     
  4. Jarediavionic

    Jarediavionic

    Joined:
    Jan 6, 2017
    Posts:
    71
    I am afraid I am not quite sure how they did it in that video. But personally, to me, it seems redundant to have 2 markers. If I am not mistaken I thought vuforia could only maintain 1 image target at a time unless you were using their model target which requires something else completely and has a much higher price tag once the trial ends.

    One marker should cover everything you need to do, position, rotation, scale or at the very least position and rotation.
    If scale of model is the issue then there are a couple of things that can be done.

    1. Make sure your model is to scale. ( i know unity can import its units properly but for the life of me, I don't know how off the top of my head. (If i am not mistaken unity unit of measure is in meters, I am in the states so I am commonly using google metric conversion cause i am a dunce lol)

    2. Also having to register two targets is just a lot more work and a lot more to keep track of. Would you not have an easier time to simply make your holograms pivot point the center of your target and using a slider to adjust your holograms scale. I am implementing a slider which has a range of 0-100% for my objects scale.

    3. You can also set voice commands to change the scale of the hologram. (example scale object 23%).
     
    Gitravail likes this.
  5. Jarediavionic

    Jarediavionic

    Joined:
    Jan 6, 2017
    Posts:
    71
     
  6. Gitravail

    Gitravail

    Joined:
    Mar 1, 2019
    Posts:
    4
    Okay thank you for your help I've done some researches and experiments. Vuforia is capable of maintain 2 targets at time cause I'm able to drawing a line between them. I will try to work with only one and domes sliders as you mentionned but it seems more fun to use if it's automatic (just with gaze on targets). I've got the time to experiment and there is so many possibilities offered by this device (spatial anchors as you said before) so I think I will just improve my project (sometimes it's fun to do 'bottom-up' instead of 'top-down'). In this case (a proof of concept) it's more based on experimentation and see where are the technical limitations moslty with HoloLens because they seems a little bit blurry.

    Thanks for your light and I hope it will help others peoples.
     
  7. Jarediavionic

    Jarediavionic

    Joined:
    Jan 6, 2017
    Posts:
    71
    @Gitravail No problem, glad to be of any help that I can! please let me know how your test turns out cause I am always interested in new information/results.

    I do agree that automatization is more fun and I had some luck with it however I could never get the drift threshold below 1cm which is too high of a margin for my use.
     
  8. Gitravail

    Gitravail

    Joined:
    Mar 1, 2019
    Posts:
    4
    @Jarediavionic No problem I will host the project on my Github account when it will be operational.
    I think it will be in June.
    I will try to write a ReadMe and somes documentations in English but it will be documented in French at the beginning.

    https://github.com/Gitravail