How to make Phys Materials work on automatic Landscape?

Sorry for the slow reply; life… :smiley:

So I am going to put myself on the hook for this (I guess…). I too need to take an auto-material and build out the logic for this. If/when I get through this, I’ll post my solution.

Otherwise, insofar as a multiplexer, I mean you will have to create some logic that takes into account the various weights of each layer and then decides which one has precedence. The physics node (as I understand it) takes values of 0 to 1 (alpha) for each layer-input. Ideally, you’d have only one input trigger. With automaterials it can be such that since the logic lays down layer on layer, multiple layers are at a value of 1…hence our problem.

So, for example, if your mask is 0->1 where 0 is rock and 1 is grass, wherever the mask is going to be 0.0 → 0.5, we place rock. The same for grass, wherever there is grass it’s going to be where the alpha is 0.5+ → 1.0. Values in the middle are a mix of course, but, for example, 0.75 is more grass than rock so you might want the physics-material to read out grass.

You’d need to look at the alpha for each layer and figure out which one ‘wins’. In the case above, the less something is rock the more it’s grass and vice-versa, so we’d likely try a one-minus node off the alpha (so we can make rock ‘live’ at 1) and then compare it’s value vs grass. If the alpha is 0.3, for example, the rock ought to have an effective weight of 0.7 and the grass 0.3, so rock wins and we should register rock. You’d have some logic to look at the two layers’ alpha’s distinctly, and then pick a winner.

This extends to any additional layer we put on top of all that, so it’s more a rinse/repeat type thing in that once you get two layers working, you should be able to merely extend the logic.

If/Once I have a practical example I’ll come back to this thread and post a solution.