The material tag could not be registered since the maximum number of material tags (32) has been reached

#1

Is there a way to increase this limit?

0 Likes

#2

Not currently no.
Internally it’s a 32bit bitfield, and I’m currently unsure of the implications of increasing it to 64 bits.

2 Likes

#3

Please consider increasing this up. This is very serious limitation with absolutely no workaround.

1 Like

#4

Added feature request here:

3 Likes

#5

So when? The fourth month and nothing done.

0 Likes

#6

Correct. Nothing done on that specific issue as we have been working on other issues which we have considered more urgent or for other reasons have aligned better with other work we have done. That said, the issue is still on our radar and is kept in the planned tasks these last couple of sprints, in case we have time to spare to pick up more tasks.

6 Likes

#7

Hi @dmitriy!
I’ve finally started this task, and I’d love to know more about your use case.

Looking at our code, increasing to a 64 bit value (it’s a bitmask, corresponding to 64 unique material tags), would be easy.

A more generic solution to support >64 tags is trickier (i.e. moving away from the bitmask solution), and will require some more thought to make the code work efficiently.

So I guess that’s the first question:
How many material tags do you anticipate using?

2 Likes

#8

https://1drv.ms/v/s!ArZny_oQsC2Jqmf3PVnERLYms6up?e=cWkfYt

Use case is simple: to draw things. For example, scene on video above uses 21 tags only to draw lights & shadows (10 light sources). Besides obvious things like text, gui, tiles, etc, I also want use masking for sprites, another kind of water, mirrors on walls, more post effects, and (probably) implement normal mapping.
For that, I need more than 32 tags. 64, I think, is enough for now.

7 Likes

#9

Looks amazing by the way!

4 Likes

#10

Ten different light sources? Do you use individual tag for each?

And I agree, scene looks gorgeous! :heart_eyes:

2 Likes

#11

Sorry for the off topic but this is really awesome. I think I’ve seen this game on twitter (or maybe not) and didn’t know it was using Defold.

Edit: I’m confused.

2 Likes

#12

@dmitriy We have now merged a fix to the alpha branch if you’d like to try it out.
We have removed the limit of max 32 global material tags.
You can now have as many as you want (still max 32 tags per material though).

7 Likes

#13

Wow! Looks (and sounds) gorgeous.

2 Likes

#14

That a good news! Thanks.

3 Likes