How do i set the "create dynamic material instance" to make the new material instance to be a different blend mode?

Hello all, currently I am creating a diablo style game, with similar camera angles, and I am trying to create a system that makes any objects that come between the camera and the player to become a very low opacity (10% maybe). Ideally, I would want only the part of the object that is blocking the view of the player to be transparent and thought I could achieve this by using something like depth fade but that doesn’t seem to be possible (please correct me if i am wrong).

So, my current idea is to run a line trace from the camera to the player to detect if anything is in the way of the camera’s view. That BP info is here: Making an actor invisible to the camera only - Rendering - Unreal Engine Forums

Next, I would create a dynamic material instance of the hit object material and set the opacity to .1 or w/e equals 10%. BP info similar to that part can be seen in Hourences’ video at minute 10:47 here: The Solus Project: Application of Unreal Engine 4 - Part 1- Level And Content - YouTube

What I am having an issue with is that when I set a material blend mode to be translucent, it doesn’t look like it does when the blend mode is opaque, even if the opacity is set to 1. So my question is, how do i set the “create dynamic material instance” to make the new material instance to be a different blend mode.

I am hoping this is possible, because the only other way I could get this to work is to either create a separate material instance for each possible material I might pass in front of, essentially doubling the number of materials my game has, or I would just use an arbitrary ‘see through’ material for all the times I pass behind an object instead of a material specific to that object. An example of that is seen at minute 1:50 here: Unreal Engine 4: Enhancing Top-down game Blueprints - YouTube

1 Like

Hey Knobbynobbes -

No, the Blend mode of a Material is something that can be read by Blueprint but cannot be changed at runtime. You could set up a system of direct material transfers from one material to another as you get closer to camera, but as you say it will be costly.

Eric Ketchum

Hey -

I am going to close this thread for tracking purposes, but if this problem returns feel free to resubmit and we will continue to help you.

Thanks

-Eric Ketchum