Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Material Variants

Discussion in '2018.3 Beta' started by MA-Rob, Sep 19, 2018.

Thread Status:
Not open for further replies.
  1. MA-Rob

    MA-Rob

    Joined:
    Sep 10, 2014
    Posts:
    85
    Now that we’re getting prefab variants, are material variants in the foreseeable future?
     
    pvloon likes this.
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    What is the benefit of a material variant vs another material?
     
  3. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    354
    Having a different colour/texture for example while keeping mettalicness for example. Say I have ten different road textures and want to make them less metallic then I need to change them all instead of just one.
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Currently changing the material at runtime creates a variation-copy. If you wanted this at a prefab level with variations at editor time, it would potentially destroy performance as each material variation is basically a new set pass. Is it still something that you want to leave up to prefabs rather than controlling that? It's just a dangerous thing left unchecked.

    Just asking your thoughts that's all (moved also to prefabs forum).

    (edit: changing .material not .sharedMaterial creates a copy)
     
    Last edited: Sep 21, 2018
    Prodigga likes this.
  5. MCrafterzz

    MCrafterzz

    Joined:
    Jun 3, 2017
    Posts:
    354
    Personly it isn't something that I really need but can see the usage of. I'm not talking about modifing materials in runtime but in the editor. If you have a lot of similar materials with the only difference being colour or texture it would be great to be able to edit one to change them all like the the prefab variants now allow.
     
    RoxDene, JesOb and hippocoder like this.
  6. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    Not in the foreseeable future, no. Prefab Variants was a natural extension of Prefab overrides, which has always existed in Unity. There is no such override concept for other object types at the moment and it would not be a trivial effort to support it.

    As for whether it could exist in the non-forseeable future, I don't know. It's not something that falls under the Improved Prefab feature that we've been working on, and are still focused on for now.
     
  7. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    I know there was an idea that came up from a unity dev some time ago where they would allow you to create a variant of a material and it would be an embedded material on the object/prefab (like how new models embed imported materials). I believe you could then drag it from the objects/prefabs hierarchy to the project and use it more generally.

    It was a cool idea, I think i would have loved it! I don’t know where it went tho, or what UX problems it ran into

    Edit: oh wait, nvm it wasnt about variants! It was just an idea that would create a new material easily for you on the object, instead of having to go through the motions to create/duplicate a new one in the project. But thats not what you’re asking about :x
     
    Last edited: Sep 21, 2018
  8. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    FYI from our perspective this request does not fall under the Improved Prefabs feature...
     
  9. MA-Rob

    MA-Rob

    Joined:
    Sep 10, 2014
    Posts:
    85
    Ya it essentially would allow materials to inherit common properties from a base material. Let's say you have a properties dialed in for a rubber material, variants could inherit all the base properties but also use a different base color or detail map. It makes managing a large material library in the editor much easier.

    Unreal has this capability and refers to them as instanced materials.
     
    JesOb, MCrafterzz and Deeeds like this.
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Whoops, moved it back then.
     
    runevision likes this.
  11. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    If you mean the HackWeek project from this video, it didn't actually support material overrides but was just a convenient way to create and store a copy of the material. The copy would not receive updates from the original so it didn't work as a Material Variant except in the way any copy of something works as a variant.
     
    Ofx360 likes this.
  12. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Colour derivation is a common means of theming in most design software.

    Colour harmonies are entire (and quite massive) branches of design theories and practices. All are either based on single or multiple (and fundamental) base, derivable colour.

    It''s also how designers consider rotating colours, and their starting point for colour consideration.

    I think the fact that Unity relies almost exclusively on RGB instead of HS variants of colour description and modification has prevented them from grokking this manner of thinking about variation in colouring.

    It's high time the Animation timelines provided native HSB or HSL colour animation rather than only RGBA and subsequent conversion.

    Animating colour changes in a manner that's pleasing is quite difficult within RGB space.
     
Thread Status:
Not open for further replies.