Jump to content

Material "group" option


photo

Recommended Posts

How does the "group" option for materials work? It didn't seem to work as documented, so I tried to find the implementation but couldn't. :( I'm suspicious that there aren't getters and setters for it like there are for "order".

We wouldn't need the group option if the range for "order" wasn't so pitiful - will it work to use orders outside the -8 to 8 range? Looks like I shouldn't use the whole int range because it's serialized as char, but it's unclear whether the entire char range is valid. At the very least, any implementation I can imagine that allows -8 to 8 is also going to deal happily with -15 to 16. So what's the _real_ usable range of "order" and are there any plans to expand it and/or update the Material docs?

Link to comment

Hi Greg!

Seems that there is a bug in documentation - the legacy group attribute of the <options/> element was not removed. The currently used <group/> element as well as the group attribute of the <state/>,<texture/> or <parameter/> elements specifies the group to which states, textures or parameters of the base material belong (it is used to display material states, textures and parameters in the Editor). Rendering order is currently specified by the order attribute only (that's the reason You couldn't find a corresponding setter/getter). The range of the order is limited to the entire char range, so feel free to use it. The range is limited to [-8; 8] only in the Editor (this limitation will be removed in the next release).

We are sorry for the inconvenience caused!

The bug will be fixed right away!

Thanks!

  • Like 1
Link to comment

It's very nice to read about " this limitation will be removed in the next release " - very useful feature, please, implement it. Useful for sorting different types of decals (road markings etc).

Link to comment

We've added it to our task list for the upcoming release! Until then you can set order values in the range from -128 to 127 via code.

Thanks!

Link to comment
×
×
  • Create New...