Search Unity

Vuforia model target problem?

Discussion in 'Vuforia' started by davejones1, Jan 29, 2018.

  1. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    How can I keep the augmentation visible after the initial target has gone out of sight? I am having this issue with the Vuforia model target. I am trying to keep the model augmented once the initial target is out of sight, however I am unable to do so.
     
  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Hello @hakimelahi

    If you are wanting to keep the model visible beyond the reaches of normal extended tracking, you could un-parent your augmentation from the Model Target game object to keep it around. Be warned though that without the target in sight, the position of the augmentation in the world is not guaranteed to be accurate.

    Thanks
     
  3. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    hello @Vuforia-Strasza
    Your recommendation didn't solve the issue I am having. I want to augment a 3d model upon detecting a target and then keep the 3d model augmented even when moving away from the target. I am unable to do this so far.Your recommendation added my 3d model to the scene upon playing the game.
     
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Are you un-parenting it at run time after you detected the target or did you un-parent it from the scene before running it?
     
  5. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    I un-parent it from the scene before running.
     
  6. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Try doing the un-parenting the augmentation from the target at the point you lose the target and want to keep the model going at run-time. Un-parenting it before running will dis-associate the two from each other.
     
  7. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    Doing it at run-time is not practical, as I need it to work during run-time.
     
  8. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    What part of it is not practical? You can write a small script that un-parents augmentation from the target at the point of the app that you want this behaviour to begin.
     
  9. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    I'm new to unity so I dont understand how to create a script to unparent augmentation.
     
  10. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
  11. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
  12. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    Hello @Vuforia-Strasza
    Your recommendation kept the model augmented, however the desired goal is to augment the model and keep it in the same position without relying on the model target. When I un parent the augmentation from the model target the augmentation stayed in the camera view. Is there a way to transition from marker to marker less augmentation?
     
  13. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    The goal is to try augment a model and keep it in the same position without having to further rely on the target. Is this possible in Vuforia?
     
  14. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    I'd recommend trying to re-parent the augmentation to a Ground Plane for this behaviour. The physical object is what the Model Target is using for tracking and positional data. Removing this will result in positional issues like what you are experiencing. You could at the moment of losing MT tracking, initialize a Ground Plane and move your target to that point to try and maintain the position of your augmentation.
     
  15. davejones1

    davejones1

    Joined:
    Jan 19, 2018
    Posts:
    183
    upload_2018-2-7_11-19-12.png

    Hello @Vuforia-Strasza
    I have added the highlighted code to the "DefaultTrackableEventHandler" script. I have added this code into the OnTrackingLost void. When I play the scene the model target instantly becomes a child of the ground plane. I can't seem to get the model target to move to the ground plane point?