Search Unity

How to change the saturation for a single GameObject?

Discussion in 'High Definition Render Pipeline' started by John_Leorid, Mar 23, 2021.

  1. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    651
    In Games it is important to show the player which objects in the game world are interactable.
    Using certain environmental assets, we can't change every single one of the 1000 materials in the game, but we could easily desaturate everything with a post processing effect - but we need to exclude certain objects.

    In the example below, there are only two important objects, the player can interact with (marked with green "circles")

    upload_2021-3-23_13-31-22.png
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Well, you mentioned not being able to change the 1000 materials in your game... but why would you need to change 1000 materials to do this? I wouldn't expect all 1000 materials are potentially interactable? In which case, only a small number of materials would need to support this?

    In my game, I use a slightly different approach which doesn't require changes to the original object or its materials. At runtime, I make a copy of the renderer and assign a special material to it that gives the objects a "glow". It's pretty simple to implement this sort of thing. Not quite the approach you're describing (visually the opposite, in fact).
     
  3. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    651
    Well, looking at the example picture I attached to OP, I have no idea what level of glow would be needed to make those two objects shine more than their surrounding xD
    In this specific scene, I guess we'll kill all the red tones and make them some brownish color, then remove the emission from all screens and the server-box on the left, then turn down all the lights and put two point lights at the spots that are important. And we will do this in every single area we have so far...
    Because right now, it is colorful visual clutter thats in the way of our gameplay. Players are lost, they don't know where to look and making some objects even more shiny won't help I guess.
     
  4. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    chap-unity likes this.
  5. Sean__R

    Sean__R

    Joined:
    Oct 1, 2014
    Posts:
    106
    Question, Is "Custom Pass" similar to AOV for compositing?
     
  6. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,670
    you can create a "language" to the player before entering that zone, something like a smaller room where there is just those objects, creating a way for the player to remember those objects. Anyway, almost any player will try to interact with the other objects.
    But if you really need a visual change, you can also try making a script that change the brightness from 100 to 150 and then down to 100.
    Or an simple transparent white cube (covering the object) with a fast fade effect. There are too many ways jajaja and i edit this comment like 3 times xD
     
    Sean__R likes this.
  7. Sean__R

    Sean__R

    Joined:
    Oct 1, 2014
    Posts:
    106
    Thank you, for answering my question.
     
  8. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    651
    Using a shader wasn't the solution. In the end, we changed the prefabs and Levels. Using Emission instead of lights to highlight relevant objects and turning down Emission and Colors on everything else. We have a few (~10-20) Interactable Objects (Terminals, Buttons, ..) and we made them stand out as a Prefab, by chaning their Looks and Materials. Also we toned down everything else by changing the Color of the Materials of all Assets.

    Reasons were usability (just placing prefabs into the scene), performance and maintainability (adding new stuff is easy with this design philosophy).