Search Unity

Changing special regions on a texture

Discussion in 'Image Effects' started by Held0fTheWelt, Jan 13, 2019.

  1. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    I don't know yet, where i have to put this here, because i don't get a starting point, on how to do this.
    I don't know, if i would write a shader for this (what i from now have never done before, but hopefully will recently learn), or if i would approach it another way.
    I, for now, know, how to use the emissive map, that i can turn on and off the systems visually, as you can see here:

    Now - this is a complete mesh - the console - i have separated buttons and switches, so i can use them in VR, but i also want to have visual feedback from that small little lamps.
    They have at least three states (Off, Green, Red), maybe more.
    The emission map is made of a psd file with 4 layers in it, one for the lights.
    I would love to learn, on how to manipulate special circle sized regions in this layer, or find a solution, that can do, what i want to do.

    Any advices in here, on how to do this ?
     

    Attached Files:

  2. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    If i am wrong here and should ask somewhere else, please advice!
     
  3. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
  4. mr_madcake

    mr_madcake

    Joined:
    Jul 17, 2017
    Posts:
    94
    You could apply a different material to lamps and control it's color separately from everything else. No texture editing required.
     
  5. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    Thank you for answering !

    The easiest and efficient way to do this obviously not is to write onto the texture.
    It is a little bit of work, but i just put some planes with a white bulb presentation texture on top of the positions of these lights.
    Next i also erased the lights out of the objects emission map, to get rid of the original lighting of that button.
    Having that set up, i return to just playing with the materials emissive color, which is obviously way faster than accessing the texture and painting on it.

    I just thought it the wrong way up ...

    Here's the current result !