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

Place holograms at real world positions with Hololens

Discussion in 'VR' started by DrPhilippe, Oct 20, 2017.

  1. DrPhilippe

    DrPhilippe

    Joined:
    Mar 13, 2017
    Posts:
    7
    Hi everyone,

    I have saved the SpatialMapping mesh using the Hololens device portal and imported it as an asset to my project and scene.

    What i would like to acheve is to place hologrames in my scene, based on spatial mapping, so that when i deploy they would overlapp with real world object.
    i.e. i'm trying to augment the real world.

    I tried to create world anchor in the Start method of a script attached to my hololgrams but it seems that the "room" (i.e. the scene) is centered and oriented on the camera at start, and not on the SpatialMapping data.

    When looking for documentation i found that spatial mapping mesh are mostly used in unity by the holotoolkit for debuging / running on the simulator.
    And WorldAnchore are used at runtime in a tap-and-place manner, or with spatial understanding.

    If anyone could point me in the right direction, other thread in forums or has advices on where to start that would be amazing.

    Thanks in advance.
     
  2. unity_andrewc

    unity_andrewc

    Unity Technologies

    Joined:
    Dec 14, 2015
    Posts:
    218
    As you pointed out, yes, the origin (both position and rotation) is based on the device's pose at start-up, not the room. You can't doctor/curate exact experiences for exact rooms because it doesn't really make sense to - your app should work for any user, regardless of the room they're in. The issue you're running into is the jump to AR - namely, not being able to control every piece of scenery.

    I would suggest downloading and playing around with some free apps that are available on the HoloLens to give you more of an understanding of the paradigms that other developers have used to work with/around the inability to control every piece of scenery. RoboRaid, Fragments, and Young Conker are some examples of a good place to start.
     
  3. aesquirell

    aesquirell

    Joined:
    Oct 8, 2018
    Posts:
    1
    If you are saying it is impossible to add world anchors to a specific room before launching the app and placing them with the headset, that's dumb. You can't say that all Hololens applications should be "room ambiguous" per se. Just as in the built in "Holograms" application, holograms placed with the device will be persistent. What if we are designing a very specific application for a client, and want to add these holograms to a room before putting on the headset?