Is there a way to make a material's "Two Sided" checkbox a parameter?

Hey all!
Is there a way to expose the “two sided” checkbox of a material so it can be used by a blueprint and applied to a different material?

Obviously what I have here isn’t going to work, but it’s along the lines of the variable I’m trying to get.

Thanks in advance!

So there’s no way to read if the two sided box in the details panel is checked? I just want to be able to have a blueprint see that value and be able to apply it to the next material. I just dropped the bool node in the graph because I only know how to grab parameters from that side.

Oh yes this is possible, you need that function… IsTwoSided

It is automatically a Parameter in your Constant Material Instances. You can’t change it at runtime.

Create a Material Instance out of your One-sided Material. Under Material Property Override you can override the Two-Sided Property.

You can then create a Dynamic Material Instance out of this Material Instance.
As I mentioned, you can’t set the Two-Sided at runtime! You have to change the Material (/-Instance) if you want to switch between Two and One sided

1 Like

No, it is not possible to make that checkbox a parameter. You should create two different material instances and set two sided enabled for one of them. Then swap them in blueprints as needed.

Thanks guys!
I dug around to see what I could do with your suggestions, and I think I’m close. My blueprint generates a material instance that is a copy of another one and I’ve found a node that can call up material property overrides, but it’s being phased out. I want to be able to make a branch so it makes the copy out of the appropriate fading material, but it keeps running through as false. The base property overrides node is the one I found- I split open the pins to get the warning node above it where two sided is listed. I made sure to activate the override in the base material and set it to true, but I’m under the impression that my condition for the branch isn’t doing much. (The set fade material on top is the two sided master, the bottom is one sided)

Got it! So the easiest way is to just give the material instance a gameplay tag and compare it to get the bool working.

Thanks again for all the help guys, it definitely got me looking in the right places!

Here’s the altered snippet that actually works :slight_smile:

The easiest solution this one.