So I’m trying to have 1 material that has multiple Physical Materials associated to it. The only thing is when doing with with a worldmachine landscape there’s only 1 Index ID.
So i wanted to do a noise… now using the mask image assign as physical material let’s say ICE + Lava to each one (and the player would see the color difference). That way in blueprints i can indicate what happens on the material, plus the friction would already be working.
apparently there’s a request in their system (UE-22749) but once/if they make it, I’m not sure it will be usable for landscapes (if you see the AnswerHub post, mr. Andrew Hurley seems to completely disregard the need for this in landscapes).
since you’re interested in this and the Epic staff seem to value requests based on the amount of community interest, I would kindly ask you to upvote the AnswerHub post and express your need for this feature there as well
We don’t currently have a way to generate multiple physical materials for landscape except by having it choose the most weight-painted layer. Obviously that doesn’t work for material-generated texturing. As Deathrey mentions we have a ticket for this currently slated for 4.14, to use something similar to the landscape grass density to output the physical material from the material.
I have multiple physics materials working on my landscape. As far as I can tell it’s irrelevant to what kind of material you are using for the visual part. As long as you add multiple paint layers to the landscape itself you can assign physics material to each of them.
From WM you need to export one or two mask, then add two or more paint layers on landscape and load masks into them. When you add layer, editor will ask you to same LayerInfo (or something like that) asset. That’s the asset which you can open and set physics material in it.
If you need an example, check my MMT Content project (GitHub - BoredEngineer/MMT_Content: Machinery Modelling Toolkit is a plugin for UE4), landscape on Land Vehicles map should have multiple physics materials assigned.
the idea is to be able to use different PhysicalMats without any layer painting at all. Some us have materials that control the visuals of the landscape procedurally (much like the Stylized Example from Epic) so this feature is still needed
Sure, I understand that, but that’s not what OP is asking for as far as I understand. I myself would prefer as many options in this respect as possible. I don’t think we need to mislead OP in this respect, as long as he can export separate maps from WM, current approach will work for him just fine.
Thanks BoredEngineer!! Yeah i was about to look into that. I’ll have to test what you’re saying tonight! Thanks. What I dont fully understand is is the layer info using the makes from WM or I have to ‘paint’ these weights/masks in the landscape painter.
You don’t have to paint them manually. What I did just to get some fast result is export for example ‘flow’ map from WM. You need to use .raw format for such masks, maybe some other work too but this is what I was using.
Then you can do like this:
Create a landscape material with a couple of LandscapeLayerWeightNodes:
Don’t forget to give them some names
Add landscape and give it material made in step 1
Now if you go to paint you will see your layers:
Click on the “+” sign next to the layer name and choose Weight Blend Layer (normal). Editor will ask you to choose name and folder where to save Landscape Layer Info Object:
Just save it somewhere in your Content structure
Repeat the same for 2-nd material
Now if you right click on the layer name in “Target Layers” section, you will have options to Export and Import from file. This is where you can import your mask made in WM. You can import the same mask for both materials, what will happen is that for a second material mask will be re-calculated and they should blend. Sometime you get black area without any material, to fix this either manually paint whole landscape with a single material first and then import mask or import a tiny 16x16 white texture first. This is necessary to “fill” layer with data (known bug)
To add physics materials open Landscape Layer Info Object assets that you saved earlier and assign physics material in them:
Just don’t forget that your heightmap and material layer mask need to have a proper size matching size of the landscape.
this totally works. Thanks BoredEngineer!
Like you said the only that that kind of sucks is i have to work with a mask outside of UE4, it’s too bad it doesn’t work with my noise shader that i could tweak
We don’t currently have a way to generate multiple physical materials for landscape other than by having it choose the most weight-painted layer. Obviously that doesn’t work for material-generated texturing. As Deathrey mentions we have a ticket for this currently slated for 4.14, to use something similar to the landscape grass density to output the physical material from the material.
Haven’t used them for anything besides color yet. Not sure if it would work out of the box for normals for example but in principal it should. If I’m not mistaken there were other blend nodes that should work with layers too.
Thank you for addressing these concerns Jack! As far as I understand one could build something like this in c++ by populating Layer Info Object programmatically. What concerns me is how data is split between different landscape components.