NFTs, Generative Art
The Trouble with Overlapping Traits in Generative NFT Programming
A little advice to keep your NFT project clean and tidy.
One of the challenges I see in generative NFT projects quite commonly is something like this (and you’ll soon see why I’m a programmer and not an NFT artist!)
Okay, you have your BASE CHARACTER layer, like so:

And now you want to give him/her some eyes. Maybe you have all kinds of expressions as traits — angry, sad, happy, etc. For my purposes here, let’s just use some color. Say red or green. So, here is the cat with these two traits:
Cat with RED eyes:

Cat with GREEN eyes:

And so on. Maybe you have 20 different eyes like that. Let’s move on.
So now, you want to give him/her some sunglasses. Maybe you have…
Black sunglasses:

Pink sunglasses:

Visually, that’s all well and good (at the moment). But it’s not without problems — both in terms of potential issues with ensuring uniqueness of your NFT images and also in terms of metadata.
When one trait completely obscures another, what do you do?
In the above examples, you can kida-sorta see through or past the sunglasses. But it’s quite common that you cannot. And that leads you to a potential scenario like this:
- EYES: Red, SUNGLASSES: Black
- EYES: Red, SUNGLASSES: Pink
- EYES: Green, SUNGLASSES: Black
- EYES: Green, SUNGLASSES: Pink
In other words, you’ve got metadata saying the cat has eyes, but you cannot see those eyes!
And what’s worse is that, technically, those 4 cats above are all different and thus unique. But visually, cats 1 and 3, above, are identical (just as cats 2 and 4 are). And so that looks like a dupe in your generative NFT collection, which is obviously undesirable.
What to Do?
First, I should add that the above example is extremely simplified. Drops these days are getting more and more complex. Whereas a 150-trait 10k generative NFT set was pretty common 6 months ago, I’m now seeing 400+ trait sets more frequently. (Have even worked on some many times that size!)
It’s problematic, though. Don’t you think?
Luckily, with billions of combinations possible (or likely many times more), it’s not super-likely that you’ll wind up with two visually identical NFTs because of this (especially if you’ve got a LOT of traits and properties at play). But it’s still possible and, if your community discovered such a case, it’d be a bit of a hassle to explain and difficulty to fix. (Though, I’ve heard of some NFT drops that wound up with some dupes. I think Galaxy Eggs might had an issue like this, and people suggested this was the case for the Mekaverse, as well.)
The first fix to consider would be to code things so that, if the sunglasses come up, you remove the eye trait completely. After all, the eye trait isn’t shown. So, removing it would ensure that all of your cats stay unique because the eyes would not factor into the DNA of that cat.
Ideally, a better fix might be to consider grouping eyes with sunglasses to come up with numerous bespoke “eye scenarios,” some ready-made with glasses, some on their own. After all, many glasses traits that I see include designs that are see-through, which also complicates matters because then some of your glasses actually DO show the eyes and others do not.
But if you keep your shades as a separate layer, you’re opening yourself up to needing a lot of custom logic rules — which is doable code-wise, but those logic rules also can have a material trickle-down effect on your rarity numbers. (I’ve written about this here.)
If it were ME … I’d combine the glasses and eyes into a larger group of readymade bespoke scenarios, and then I’d code the metadata as needed to accurately reflect whatever I came up with.
And, really, this is all just one argument in favor of thoroughly planning out your artwork prior to beginning the project. This is something I’m very happy to do with my generative NFT clients, though I always try to accommodate all artist styles and approaches (which I understand varies widely from artist to artist). I’ll likely do some other art-specific opinion pieces like this, as I’ve encountered just about every situation that can come up in generative NFT artwork by now.
If you’re interested in generative NFTs, check out my main stash of articles on the topic here:
