rdLODtools Tutorial 7 – Fixing broken Materials after re-installing.
Last Updated: 6th February 2022
I had a customer experience a problem where after re-installing UE4.27 and the rdLODtools plugin, the main material for billboards already created previously were broken.
I’ve traced the issue down to a problem with links to material functions being broken – they should be pointing to your local copy of the functions in your project/rdLODtools/ folder but they are somehow getting redirected to the original copies of the functions residing in the actual rdLODtools plugin folder.
Until I can work out a fix for this, here is how to fix up those “missing material functions”.
Step 1. Check all the files are there.
Your project should have a folder called “rdLODtools” in the root, i.e “/Game/rdLODtools/”.
If that folder does not exist, all you will need to do is create a billboard for any mesh – that will copy all the files to that folder, and fix any existing billboards you have previously created.
If it does exist, check that the “MaterialFunctions” folder in there contains the following files:
If any or all of those files are missing, you can copy them from the rdLODtools PlugIn folder. You will need to “Show Engine Content” from the browser, then select all the files and drag into your local “rdLODtools/MaterialFunctions/” folder.
If you’ve had to copy those files, or they were already there, the next step is to fix the main Material that is referencing those Material Functions:
Step 2. Fix missing function calls.
In your project “rdLODtools/Materials” you will find the main Master Material used by the billboards.
When there is a problem, there are 10 missing functions like in the snap below:
So all we need to do is fix those up. Before doing so, turn off the ShowEngineContent option in the content browser, otherwise you will see 2 sets of the material functions, one local and one based in the plugin folder – we only want to see the local ones.
In the “Diffuse and Opacity” section, select the first “Unspecified Function”. In the Details pane to the left you will see an option to select which Material Function it is. Click on the drop-down icon and type “Adjust” into the search box – you should see a Material Function called “MF_DiffuseAdjust2”. Select that.
Next select the second “Unspecified Function”. This time, replace it with “MF_Ramp”.
Now rewire them to look as they do in the snapshot below.
Next there are the Metallic, Specular and Roughness – they just use the MF_Ramp function so update their MaterialFunctions from the Details Pane and wire as the snap below.
Next comes the Frame calc routines and normal rotation. Replace the 3 highlighted functions and wire as in the snap below.
That just leaves the WorldPosition Offset and the AO, just hook up the last three missing functions as below:
And that should be it. Just save the material and all errors should be gone.