To get the light vector you make a new blueprint class and create a variable of “Directional Light” reference. Then make that variable editable. Now place the BP in your level and find your variable and use the dropper tool to select your directional light. now the BP has a reference to the actual light.
Then create a “material parameter collection” and add a single vector to it. Call it LightVector or something. Now inside of your BP, drag your directionallight variable into the construction script and then drag off it and do “get forward vector”. Now place a “set vector parameter” node, point it to your MaterialParameterCollection and set the value to be the light’s forward direction.
Then you can drag the MPC into your POM material and get the light vector there. You may opt to actually put the directional light itself into the light vector BP so that whenever you rotate the light, the MPC value updates automatically in sync.
Regarding your second request, to do what you want properly will require a new version of the POM function that actually takes 2 texture objects input, since the tracer will actually have to step through the alpha map at the same time as the heightmap. Unfortunately I cannot yet figure out a way to handle landscape alphas since they cannot be read as texture samples. And any sort of POM function will always require a texture object in order to work, since it has to sample the texture at a different location each step, and that is only possible with a texture object.
I did some experimentation with blending multiple layers with the current POM and while it kind of works, you do not get the correct intersection between multiple layers. You can see that experiment here: