How to change the default 'Distance Field Resolution' at a Project level?

In 4.27, I’m using mesh distance fields but only on a small handful of assets. For obvious performance reasons, I don’t want the static meshes that will never need them to use up memory unnecessarily. After some digging, it seems the correct way to do this is to enable ‘generate mesh distance fields’ in the project settings and then adjust ‘distance field resolution’ to 0 in the asset level.

Okay, but I have 5k static meshes and that field isn’t exposed to ‘bulk edit via property matrix’. Is there a config setting somewhere, so I could just set the default to 0 then increase for the handful of meshes that need it?

Isnt there a switch on the meshes that takes them out of the distance field equation entierly?
There should/used to be.

0 is still getting processed even if the math for it makes it take less performance.

(Edit its possible what i remeber is the two sided option, but realistically, the building of the field should be avoided alltogether / I’d possibly change the engine source to do so if it werent already a vanilla option - there is no point in not building from source on real projects anyway given the amount of issues you need to address)

So… admittedly, I’m new to mesh distance fields but I haven’t been able to get the asset level “generate mesh distance fields” boolean to have any effect, despite what the documentation says. The project setting (of the same name) seems to have full authority - either all meshes in the project get fields or none of them do. Setting the distance field resolution = 0 is the only way I’ve been able to ‘remove’ them. According to this post from 2018 that actually removes the object’s field from memory (though I haven’t tested that yet).

The official doc says that you can enable a single mesh without enabling the entire project (ideally, what I’d like to do!) but that has not been my experience and I’m so stumped by it, I’m starting to think the documentation is wrong.

Very probable. They make changes and don’t really let the doc side know to make updates.

For whatever is worth, the way the the fields used to work was that when you import or change the mesh the fields get generated by the editor and then stored.
So it is possible that setting it to 0 prevents the generation alltogether (but you dont have an option to blulk set that setting - maybe because of this).

Instead of loosing your mind with the engine, I’d suggest setting up a 30m AHK script to step through the clicks needed to automate the process as if you were doing it by hand…

1 Like