Hey, I’m making a game in 5.4 and a few materials use the DistanceToNearestSurface node to calculate their opacity. This works perfectly in most scenarios, but some player’s lower end computers seem to not be creating/using/displaying distance fields for the materials to use.
The materials show as either invisible, or fully opaque, as opposed to only being visible or invisible near surfaces like they should be. Is this a known issue with distance fields? Do I need to set a default setting somewhere to never have distance fields turn off? Or is it an issue with the DistanceToNearestSurface node?
Any help would be great cause I can’t find any real info about this happening anywhere.
Hey thanks! Yeah I saw that same response from AI too. But the only place I see actually mention is the official documentation, but they give literally no other details about that fact.
I’ve been able to figure out that it’s specifically the Global Illumination quality that’s effecting it, but only on low. And within that setting specifically r.DistanceFieldAO is the command that’s turning the distance fields on or off.
I’ve testing it specifically by setting the GI to low, then entering the command r.DistanceFieldAO 1, and it turns distance fields on and makes the materials look how they should even while still on low settings.
BUT I can’t get this to work in the packaged build. I’ve tried using the Execute Console Command BP node in multiple places (level BPs, player BP, and game instance init event) and none of them worked.
I’m also having a separate problem though where anytime I add a line in a .ini file for setting this command, then I package the build, it resets the .ini file back to how it was before I added the line. If I’m able to figure out what’s causing this do you think it could solve the distance field issue?
AND (sorry I know this is a lot) I am testing this on a laptop with integrated graphics, so for all I know this is entirely a waste of time. But if that’s the case, shouldn’t there be SOME more info out there about a very common effect being entirely useless on a ton of hardware? (It’s Intel UHD graphics btw if it might matter)
What unreal engine version are you using? Unreal had all distance field stuff disabled when using an Integrated GPU for many years. I think a few versions ago they changed it to check for SM6 support in iGPU. And in 5.8 they removed the check entirely. So you can try UE 5.8 and see if it will work for you there.
From 5.8 Release Notes : “Allow distance fields to run on GRHIDeviceIsIntegrated. This check was added a decade ago to prevent issues on some outdated drivers, but nowadays it prevents some pretty capable SM5 GPUs to run distance field features.”
I’m using 5.4. I’m pretty late into development so I really need to avoid upgrading versions so I don’t think that’s a great option for me. I did test it though with another project and yep, distance fields absolutely work with 5.8 packaged builds.
For something as simple as a check, do you think there’s any way I can bypass the check in 5.4? Or would it be entirely only baked into the version?
so the only way to make it work without updating would probably require you to delete these checks yourself from the engine code…
as an alternative you can test UE 5.5 too. Maybe SM6 support check will be enough for your use case. Then if it works you only have to update from 5.4 to 5.5 (instead of 5.8).