S'been a while since I have posted anything. Figure I would share what I have been working on~
This all began during my time at Bungie (Environment Artist 2012-2014). I was primarily doing world building & some modeling in max. We had a dedicated material/texture guy, so I mostly pulled from a library of existing tiling materials to use. I made a few materials here & there, but the proprietary material graph was still hard to wrap my head around. In editor, one can append this component thing to a mesh. This component had pre-selected, global colors to help keep consistency. Simply select your color from a drop down & that mesh would tint accordingly. I am still unsure how that worked, but I knew in order for it to show up in editor, the mesh had to be UV'd a certain way. Anything above 0-1 UV space would not get tinted. Anything 0-1 or below would get the tint.
Fast forward to present. Working on personal environments, making trim sheets, when It hit me. I had a few ideas to recreate that that effect in Unreal 4. Version one consisted of a clamped mask (something like 256, mostly white with a black line on the top few pixels). Clamping the texture in UE4 would essentially stretch the last pixel color indefinitely. Plug that into a lerp and profit. Second version consisted of multiplying a linear gradient, ceiling, and dividing by 2 (mult would push the white levels, ceil to round up, divided by two to get stepped gradient).
The global colors were set via
Material Parameter Collections. The blueprint of the droid would pull from the collections & tinted accordingly. (Have to manually type in the name, still trying to figure out how to make a drop-down list).
TLDR; I made a material that can color tint based on the mesh's UV placement.Droid blueprint (I need to convert into a function or BP class so I can drop it on any mesh). Able to tint from global colors from the Material Parameter Collections. Able to tint emissive eye color.
Unlit view.
Current master shader. Various switches to toggle metallic, blend, etc...
The main graph to control the tint masking. This goes into a lerp's alpha. Anything above 0-1 (Red pixel = Black) will not get tint. Anything 0-1 or below (Blue pixels = White) will be tinted.
Spider droid~
Wires~
Second important step. Anything above 0-1 will
not receive tinting.
Cheers!
_cisco