Home Unreal Engine

ColorID maps, 16 texture limits, and what's the deal man?

polycounter lvl 3
Offline / Send Message
robinlloydmiller polycounter lvl 3
Hi Polycount!

intro: I've been a longtime lurker on Polycount, but haven't ever posted my stuff. I'd like to change that, as I've got a topic i'd love to discuss with the broader game artist community:

Color ID maps (#colorID maps)- why they're possible in other programs such as substance Painter, but not feasible in UE4 (to my knowledge)

What I've tried: 
I essentially made three scripts which I'll post here:
the first: the Color ID mask:

This gets the texture and the colorID and masks out the area where the color matches (within a threshold)
the second: the texture merger:


the third:  the Master material itself- a conglomerate of all materials masked and merged


The Meat:
still with me? Essentially the master material uses the texture merger to merge all 5 textures to one based on their masking. it does this for albedo, metalness, etc. 
however, It wasn't until i started separating the input names (m1_albedoInput) that i got a fateful warning: "error X4510: maximum ps_5_0 sampler register index (16) exceeded- AKA: HLSL shaders have a maximum of 16 textures usable per material. "UGH"- This renders my entire (albeit HEAVY, still functional) useless since 5 materials would require 25 textures, etc: it's not scalable.

which makes me wonder how it's possible in other applications like substance, and why they're useful if you can't really bring them into engine anyways.

Further thinking: How would you do a mixed material setup without different instance IDs? (without having to model for material painting) - how do programs like substance handle it without being limited?

//Robin Lloyd-Miller AKA ARCADELY 

Replies

Sign In or Register to comment.