Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Unity Reflect Develop - Display 2d drawing and by clicking it, teleport to that space in 3d

Discussion in 'Unity Reflect' started by vinfras, Jul 28, 2022.

  1. vinfras

    vinfras

    Joined:
    Mar 16, 2022
    Posts:
    14
    Hi,

    While inspecting large models, moving to a specific area is very difficult. So I want to show a small window containing 2d drawings of the model. By clicking on it, you will teleport to view that space in 3d. Look at the screenshot attached. You can see a small square window on the right top corner, containing 2d drawings of the model. There you can see my location also(blue round spot with eye view angle). The functionality is like, click a 2d location on the drawings to view that space in 3d.

    Screenshot is taken from Autodesk BIM360 viewer.

    All the info including drawings details are in the REVIT file uploaded. How do I get these drawing and sheet details in Reflect?

    How can I create this functionality in Reflect? Where do I start? I am new to Unity. Please guide me on this.

    2d_map_window.png 2d_map_window_2.png
     
  2. Unity_Derek

    Unity_Derek

    Unity Technologies

    Joined:
    Aug 24, 2021
    Posts:
    48
    Hi, my suggestion to this is you create second camera and place it at the very top of the model. And using RenderTexture to render what the secondary camera see and put it as a UI object in the scene. Then by clicking the UI object, you can find the position of where the location of the player should teleport to. (e.g. using raycast).

    Here is a simple YouTube video can help you to get started:
     
  3. vinfras

    vinfras

    Joined:
    Mar 16, 2022
    Posts:
    14
    Hi @Unity_Derek , Thank you for your reply.

    I tried this but it did not work in dynamic and multilevel environments. In the Reflect viewer the loading content is always changing as different BIM models. The Minimap concept is becoming more complex in this scenario. We don't have any fixed x,y,z position for the above camera. As i said we can't predict the environment, having different floor height, having different levels each BIM model is different.

    The proper solution for this is, use the actual 2d drawing as a map. And all the info we need is in the file uploaded to Reflect(the revit file contains 3d views, 2d views, level information, sheets,documents etc).

    So I need to know how to extract the 2d drawing or sheets and show it in a window. By clicking on it how to get the xyz position of that space in the current 3d view. By using these values I can teleport the current camera view.

    And also I forgot to mention that this particular functionality is available in your showcase application Unity VisualLive. See the video watch from 2.25. Screenshot attached, see the square window top right corner.

    If you can discuss it with your expert team and get me a solution, your help will be more appreciable. I am stuck. Please do the needful.

    2d_map_window_3.png

     
  4. vinfras

    vinfras

    Joined:
    Mar 16, 2022
    Posts:
    14
    Hi @Unity_Derek , Have you got any update on this?.
     
  5. Unity_Derek

    Unity_Derek

    Unity Technologies

    Joined:
    Aug 24, 2021
    Posts:
    48
    Hello @vinfras,

    I am still waiting for the VisualLive team get back to me. But really from my perspective, it is not much different to what I mentioned above. I will let you know once I have update from the VisualLive team.
     
  6. Unity_Derek

    Unity_Derek

    Unity Technologies

    Joined:
    Aug 24, 2021
    Posts:
    48
    Hi @vinfras, I double checked with the team and also checked the VL app itself. I can confirm that that mini-map is captured by a secondary camera that is slightly above the main camera/character. There is no 2D drawing or sheet being uploaded or insert into the model.

    In term of working in multi-level environment, since the secondary camera is slightly above the main camera/character the secondary camera will always render a "2D" view whichever level the main camera is in. So if the main camera/character is in between the level 1 and level 2, the secondary camera will render the level 2 floor.

    Does it make sense?