4045 - Layer node not work with materials?

So i have material created as composite data
But after connecting to Layer node - on output i receive no actual data
Is that new feature or bug?



It looks like your materials’ mask channel is set to zero…

1 Like

ye, exactly that
but if we will start speak about that - why material dissapears only on connection to layer node?

layer node in build 4044 did work fine under such conditions
so i’m asking about that changing of behavior because it is not mentioned in 45 release notes

The Layer device’s handling of masked materials was changed to remove some really surprising edge cases and make the typical cases just work.

But before I explain the reasons why, maybe I should back up. I might be missing some important uses.

Generally speaking, what are your expectations for the following questions:

  1. What do you expect to have displayed in a viewport for:

    • A material with a mask of zero
    • Compared to a bitmap or heightfield with a mask of zero?
  2. For any given input (heightfield, rgb, material), if I “mask it with an all black mask”, what are your expectations of the resulting data?

  3. How would you expect those fully-masked-away material areas to interact with other materials when combined together in a Layer?

And then lastly

  1. What are you using the previous behavior for? What does the new behavior break?
1 Like

I want to see in viewport material state, like it was in 44 build - it did suite my needs well. I did have ability to combine two materials with zero masks and receive good results. But generally i have no need to look on material in viewport, if we speak about use-case mentioned on screenshots above. So even if it will be empty scene - i will be okey with that. For me is important only to convert material to separate channels in the end. Layers node in 45 release did break this idea. So material with zero mask can not be converted into separate datatypes. It is just empty channels.

I hope here you mean HeightField, Bitmap inside Material datatype, if it is so - as mentioned in point #1 - i want to unconvert material with zero mask into separate heightmaps, bitmaps and etc

My use case require me to only use 1 material input connected to Layer node. I need it to simple and quick cutting of all channels in Material datatype due to mask, provided for Layer node in second input under first one. Currently i use 5 or 7 Combiners in Multiply mode instead of 1 Layer node, to work in 45 release. But in release 4044 it did work just with one Layer node - it did save performance of my macro, because i did use only 1 Layer node, and not 5-7 Combiners.

As mentioned above - i did use single input Layer node to quickly cut all channels of Material datatype by usage of one single mask. All channels in Material datatype filled with my own heightmaps (i did use bitmap channel for transfer of additonal 6 heighmaps, lol) - (ye, even mask channel of Material datatype used by me to store some important heightfield data, so i did not use Mask channel to cut my material, because i need that data channel to be filled with important info) After that change of behavior in 4045 i lost ability to quickly cut all channels of Material datatype by using one Layer node. Now i need to cut each channel indivudually by using 5-7 Combiners - but it is not such fast as usage of 1 Layer node. I dont want to use Mask channel of Material datatype because it store additional heightmap, that not is actual mask of Material.

Sorry for bad english :sparkling_heart:
:point_right::point_left:

If I understand what you’re doing, that’s a very unconventional use case. You essentially are using the Material datatype as a packing bin to throw a bunch of data in and have the same operation performed on all of it, is that correct?

If so, you should be able to do the same thing in 4045 just without using the mask channel. If your material is not masked, nothing has changed about its behavior. I had actually tested (and it still exists in code) a toggle to turn on or off internal mask behavior, but I couldn’t think of any reason why you’d possibly want to turn it off :stuck_out_tongue:

Also though… I can’t really advise packing arbitrary data into the material datatype. I agree that for “batch application” of a mask or what have you there’s not really a better way to do things, and that should be rectified. But there are several problems with it:

  • At a minimum, packing heightfields into a bitmap will reduce their precision - the bitmap channels are 16bit floats vs 32bit floats. That may not matter for your use case, but that loss of precision can be significant if what is being stored is meant to be terrain geometry.
  • The channels generally have special meaning, and there are numerous special cases where they aren’t just blended the same. For an example: The Layer device right now actually handles normals wrong. It DOES just do a linear blend, but that actually is not correct, and it is likely to be fixed to do a proper re-normalization after blending the vector, as simply one example. That will be another break of the packed data situation.
1 Like

aaa, yee - it works, tested it today
but in that condidions you say me to not use mask channel at all
so i can not put my information into it, i should to keep it empty forever, lol

i can not say you to back behavior of 4044 because i did allow me to use mask port for own needs
but will wait day when you will create new way to process +10, +20 heightmaps at ones on 4046+ releases as you said here: