Distance Blend broken on Blend Material Attributes?

I’m trying to create a material for a landscape by following the UDEMY tutorial that epic promoted a little while back. In the tutorial we’re asked to create two material functions. One for Grass and one for Dirt. In the material function there’s a near distance and far distance set up that is blended together using a BlendMaterialAttributes node.

The Alpha of the BlendMaterialAttributes node has some math nodes with an absolute world position and a camera position. Here’s a pic of that set up.

I’d rather use the Distance Blend function though but when I plug it into the Alpha and save the function, the landscape compiles and shows the grey checkerboard texture but doesn’t call any errors. Is there something I’m missing?

I’ve tried re-applying the materials to the landscape and the issue persists (usually crashes). when I plug the Distance Blend directly into the BaseColor of the SetMaterialAttributes just before the Output I can see the function working properly in the preview window. When applied it to the landscape just sticks on the grey checkerboard still. texture.

Wow, that was a super quick response, haha. Since it’s a part of paid content I don’t feel super comfortable with posting it. I’ll see if I can reach out to the creator of the tutorial series and get their permission first.

Section 3 Lecture 49. Landscapes Material Distance Blending.

When I tested this by setting the blend mode to Translucent it did render the material with the textures correctly.

The documentation for Depth Expressions only lists SceneDepth as Translucent only.The Distance Blend function uses PixelDepth though. Should the documentation be updated or is this a bug?

I don’t see anything else in the expression that ties it to Translucent blend modes to my knowledge. I also created a very simple Material that was opaque using a lerp and two 3V and texture inputs for color and the distance blend node and it works as expected.

You might want to show the whole material, because what I see should work (if you also setup the BlendMaterialAttributes correctly).

(And yeah, I would trust Epic in this case and use the function, I’m not sure, but it I think the PixelDepth is somewhere saved already, so you don’t have to calculate it again.)

You can also post the lecture number for me (if it’s the one with Ben Tristem, I actually have the tutorial :D).

Sorry, that’s actually not the one with Tristem. Can’t help then :3

Distance_Blend material function only works with transparent materials. Use tutorial node setup instead.

I believe it used to work before, but docs might be a bit outdated, yeah