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

Question What is the best way to render Two Point Hospital like data layers?

Discussion in 'Universal Render Pipeline' started by Noxalus, Nov 3, 2022.

  1. Noxalus

    Noxalus

    Joined:
    Jan 9, 2018
    Posts:
    80
    Hello everyone,

    I work on a management game and I would like to do something really similair to the Two Point Hospital data layers:

    upload_2022-11-3_15-3-7.png

    When clicking on the bottom left corner icons, the rendering changes to show some data with color gradients on specific elements (floor, characters, items, etc...).

    I tried to do it myself, but I don't know how to do that without changing the materials of all concerned elements.

    How do you think it's done in Two Point Hospital?
     
  2. Hazzel

    Hazzel

    Joined:
    Feb 26, 2022
    Posts:
    14
    i know codemonkey did something like that with minimap/minimap icons, but his tutorial is not in urp but that still should work for urp, hope that helps you, his tutorials always help me
     
  3. Noxalus

    Noxalus

    Joined:
    Jan 9, 2018
    Posts:
    80
    Thank you for your help @Hazzel!

    I watched the video you posted, but I think it's a little bit different from what I looking for.

    Use a Canvas to update 3D object rendering seems too complicated and probably not really optimized.

    In Two Point Hospital, I pretty sure they use a shader based solution, but I don't really if it's a surface shader, a compute shader or a post processing shader.
     
  4. Matt-Cranktrain

    Matt-Cranktrain

    Joined:
    Sep 10, 2013
    Posts:
    129
    Is there a reason a Material-based solution wouldn't work for your game? Of course, if you're doing a Resources.Load call for every object every time you flip from the usual graphical state of the game to the visualise data/heatmap view, that could end up being slow, but a statically referenced Material that gets populated at the start of the game ought to be just fine?

    If every object (in Two Point Hospital, the patients and doctors, the ) has an 'alternative' heatmap material that just has a white texture, you can use the colour option in the default Lit shader to completely wash it with whichever precise colour you want - green, red, orange, or some specific mix.

    I do this for my management game across hundreds of objects, no performance issues.