Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

World Space Rendering

Discussion in 'UI Toolkit' started by TheTall2338, May 11, 2021.

  1. TheTall2338

    TheTall2338

    Joined:
    Jul 5, 2015
    Posts:
    15
    I'm not sure if posting a thread is the right way to go about this, but I couldn't find a lot of information on World Space rendering with the UIToolkit.
    Is this a feature that will be implemented eventually? If so, is there a rough idea of when it could be available?
     
  2. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,057
    World space rendering will be implemented at some point. But they first want to set a solid base for the overlay UI first. I have asked this same question before:
    https://forum.unity.com/threads/ui-roadmap-q3-2020.980202/#post-6448974

    There's no real estimate when it will be available. Frustrating, but if you really need worldspace UI like I do, you're bound to using UGUI for now. I don't expect it anytime soon as they're still quite busy implementing / improving the core features.
     
    TheTall2338 likes this.
  3. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    322
    In the meantime you can also emulate 3D UI to some extent, by using render textures.
     
  4. simvirgon

    simvirgon

    Joined:
    Sep 4, 2019
    Posts:
    2
    @AlexandreT-unity : Is there a way to register pointer interaction with that render texture?or would you need to mimic the input over ugui buttons? If you have any ressources/documentation on that I would be very grateful
     
  5. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    322
    We have samples available from the package manager. You can add them here (click Import):
    AddSample.png

    Then go in this menu to add them to a scene:
    ImportSample.png

    It should look like this:
    Sample3D.gif
     
    TheTall2338 and TheGabelle like this.
  6. TheTall2338

    TheTall2338

    Joined:
    Jul 5, 2015
    Posts:
    15
    Thanks for the help, I really appreciate all the info. I guess I'll stick with UGUI for now.
     
  7. petersrin

    petersrin

    Joined:
    Mar 20, 2018
    Posts:
    11
    I can't find those samples. I presume that you can't really instance these things seperately in world space? Like using Panel Settings as a template and have the uxml rendered in multiple places, each with it's own instance? In the video above, it's rendering the effect of hovering/clicking in both the cyclinder and the square, while I'm looking for a way to have the multiple instances decoupled from each other. (Health bars in 3d space with 3d rotation, paralax, perspective, etc, instead of the traditional health bar implimentation where all bars are rendered in overlay mode) Sorry if I'm not asking this well!
     
  8. SimonDufour

    SimonDufour

    Unity Technologies

    Joined:
    Jun 30, 2020
    Posts:
    514
    These sample were present in the package for old version of Unity.

    The samples used the UV of the mesh to resolve the location of the click, so if you modify/create your own custom uv you could split the ui in smaller parts to be rendered on each individual objects.


    Yes you can. Yecats did some tutorial on this: https://forum.unity.com/threads/tut...vers-over-the-player-with-ui-toolkit.1100380/

    You can make everything on the same uiDocument, or use multiple UI document using the same panelSettings. Having multiples panelSettings will definetly affect negatively the performance, but as long as you are using the same there is no overhead.

    With this method, you could change the position/scale/2dRotation of the elements, but you are right that we do not support 3d rotation yet.

    Don't hesitate to ask your questions here or to start a new thread with this as there is a lot we could discuss on the topic :)