Search Unity

Question Customizing Object Markings/Colorings

Discussion in 'Getting Started' started by Equination, Mar 15, 2021.

  1. Equination

    Equination

    Joined:
    May 12, 2014
    Posts:
    4
    Hi,
    Not entirely sure where to post this but I'm looking to be pointed in the right direction to accomplish something in Unity. I'm looking to create something where a user could customize a horse's markings but I'm not sure on the approach for this and the great Google hasn't been entirely useful, yet.

    I'm familiar with programmatically changing the material used on the game object and do that already so the user could change the overall coat color of the horse. However, I want to allow users to add various white markings to the horses (facial, leg, etc.) I was thinking it would be ideal if I could somehow create copies of the pre-existing overall body material but have it all transparent except for the white marking and have that layered on top of the existing one. I do something very similarly in a 2D manner in javascript.

    Is this something that I could do this way or is there a better/actually feasible approach that I'm missing?

    Thanks in advance!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, you can do exactly that: combine your 2D textures at runtime.
     
  3. Equination

    Equination

    Joined:
    May 12, 2014
    Posts:
    4
    That's great news. Would you be able to point me in the right direction of how to do that?
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    I don't know if it's exactly what you're looking for, but I wrote a bit about something like this many moons ago. The idea was to use as few materials and separate textures as possible while allowing custom colors to be applied to specific areas (in my case, the colored portions of a character's uniform). For a horse's pattern, this might not work unless your models have UV faces available in all the areas you want to customize. But this might help give you an idea of one potential solution, at any rate.
     
    JoeStrout likes this.