Single mesh with more than one physical material

Is that even possible? How would you approach this situation where you want to have some puddles or water on a rock mesh and you want to switch the sound? I thought of having 2 materials so it would allow me to have 2 different physical material but I haven’t found any info about that so I guess it is not possible unless I paint the parts on any 3D application. That way you can have two materials. Any way to get something working without having to get out and do that so it is a little bit more versatile in case you want to change things real-time?

Each material has a phys material slot.
If your mesh is made to have multiple materials each material will therefore have a different slot.
Each material is a draw call.

“How would you approach this situation where you want to have some puddles or water on a rock mesh and you want to switch the sound?”

Well, I have been using a custom reactive water derived from the regular render target tutorials. Literally just lay the sheet onto the area I want the puddle to be. The surrounding mesh is usually crafted to allow for the sheet.
So it’s 2 meshes that make the effect. and 2 draw calls just like it would be painting the object with 2 materials.

Maybe with the new mesh sculpting stuff that was previewed the water sheet is your best bet. if the engine tools work and let you change the geometry of the surrounding area, then it’s pretty easy to cause a depression in the mesh to get the water sheet to play nice.

The second material I was referring to was meant for the sound only so no visual changes. I wonder why we can’t have vertex painting blending 2 material functions. From what I have seen you can only do that creating 2 sets of textures inside one material. And that does not allow me to have 2 physical materials.

I am also using a water plane so I need to stop the rock or concrete footsteps and make water sounds instead. I was thinking in using a trigger box in order to switch the sound but I struggled to access the sound cue switch from my AnimBP. I haven’t spent a lot on it and I will try again today to see if I can get that somehow.

As far as I understand it, the way that physx is implemented requires a completely different material.
unfortunately there is no way to go from the material to BP with something like a variable, or you could try to override it in many ways.

with the trigger you may be better off muting the foot sounds and playing a different one altogether.
im not sure you can change surface type on the run during the trace process. You could prevent the trace altogether if you are within the trigger though, and just use a different trace for the sound to happen…

Well the thing is that I could have 2 different sound sets in one cue and use the switch but I have to access that switch somehow from there. I don’t need another material as it is going to trigger the same one but when overlapping that trigger box it will switch and play the other sounds instead. In theory this works as I have seen someone doing it but the way he does everything is quite different so I am trying to figure out how to get inside the cue file and manage the switch. I got all my footsteps within the AnimBP and he uses the CharacterBP for some reason.

Well, if the sound cue can take in a boolean from somewhere else, like the character, to check. Then yes. the same sound cue can alter the sound played based off that boolean being true or false.
I used something similar before, but accessing the boolean from the cue was a bit more complex then I cared for.

The switch takes an integer but I just got it working in a much easier way. I created an integer variable in my Character that changes when he Begins or Ends overlap. I then used a Switch on Int in my AnimBP where I had the footsteps system.