Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Multiple emission colors for one material or object in URP (or HDRP if not possible in URP)

Discussion in 'Shaders' started by Verual, Dec 3, 2023.

  1. Verual

    Verual

    Joined:
    Oct 3, 2023
    Posts:
    4
    I want to make a flower/mushroom/tree, which can emit different lights.
    For example a tree with 4 branches and at every end of a branch is a blossom. Every one of those four should have a different color and emit a different color. For example red, green, blue, pink.
    The different color itself is of course not the problem, but the emission of the light.

    The problem is, that I can only select one emission map for a material. I know I could make every blossom a child and add a material to it and an emission map, but that takes so much resources.
    Is there a way, to have one material and add 4 different emission maps to it?
    Basically a regular lit shader, but with 4 emission map slots.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,876
    Use different materials or unwrap the flowers into different UVs, so you can color them like that
     
  3. Verual

    Verual

    Joined:
    Oct 3, 2023
    Posts:
    4
    But I can only use one material in combination with a emission map per object and if I want to let the blossoms emit 4 colors, I would need 5 objects and 5 materials.
    Tree and Material
    Blossomset 1 with 1 emission map and color
    Blossomset 2 with 1 emission map and color
    Blossomset 3,4 the same.

    I thought there might be a way to have 4 emission maps+colors in one material to safe recources.