I’m just working away and every now and then, nodes in my material graphs disappear. I have to manually add them back in. Anyone know why this would be happening? It’s very annoying. It’s only on material graphs and it’s always the same nodes.
Hi Alien,
The first thing that comes to my mind is the ‘Clean Graph’ button. (But that would only apply if they’re not connected)
If it’s “always the same nodes” I’d be curious to know which nodes they are.
Something happening randomly is hard to troubleshoot, try to see if you can get an idea of what it takes to reproduce this!
By the same nodes, I mean specific ones, not types. For example, there’s a material function I got from the Epic Material Lab tutorial. It’s called MF_UI_SDF_Box. In there, there’s a “Length” node that keeps disappearing. Only that node. I put it back. After a while, it’s gone. I’m not even touching that graph. There’s no reason for it to be modified.
Lately, I made my own material graph. This is straight up a material. About 3 nodes disappear. Always those same three specific nodes. I put them back. After a while, they’re gone again.
And yes, I save. I don’t even touch those graphs. They just disappear.
edit:
Note that the MF_UI_SDF_Box graph was copied and it still happened in the copy.
I’m thinking of starting a new project, but since copying didn’t work before, I don’t know that a new project would help.
Bizarre, If it’s happening in a new project at least you’ll know that it’s not project specific.
I’m not sure how a failing SSD would manifest, but moving the project to a different drive (if available) could be a good experiment.
That’s an interesting idea. It’s a brand new SSD. I’ll do some tests on it.
No errors or bad sectors found in the files. Actually now that I think about it, I copied one of the files, fixed it and it happened again in the exact same node. So it’d be an awful coincidence that the exact same node disappeared because of a bad drive. This points to something in the file or something going on with UE that’s making these nodes disappear.
edit: I may as well test the RAM. That would lead the same error if it used the same bad ram.
edit2: Ran a full round of RAM tests and no errors. I’ll run stronger tests overnight. But so far I’m at a loss.
edit3: I’ve rebooted several times. I just got the same thing happening again. No way it’s RAM. There’s something wrong with UE itself.
Ok, here’s something strange I’ve just noticed. When I modify a material, it never shows with the little star next to the material name in the tab. I fixed one of the materials that didn’t work. Then I duplicated it and saved it. I relaunched the editor and the original was not saved while the duplicate was saved and worked correctly.
So there’s something messing with the modification status of materials causing some of my materials to not save even if I hit the save icon.
It is starting to look like your install of the engine is not quite right isn’t it?
I’m building from source. I have probably 20 projects and never had this problem before. This is the only one on this particular git revision. I might update and see what happens.
For now, I think I’ve found a workaround. I fix the material then duplicate it. The duplicate seems to be fine. Then I replace all uses with the dupe. What I’m afraid of is that I won’t be able to modify the copies, but I’ve changed stuff around and it seems to work fine.
So I’ll mark this as resolved I guess.
So I relaunched the editor and my workaround doesn’t work. This time, the original works and the dupe is broken. So there’s something seriously wrong with this build of unreal engine.
All quite strange. Perhaps check if your house is built on a layline or above an Indian burial ground. Also, have you had your Feng Shui checked recently?
LOL
I’ve noticed that the ones that go bad are the ones that are in use. When I made a dupe, I changed it, but it wasn’t used. Now that I’m using it in a widget, it breaks. If it’s not in use, it’s fine. And so far, it’s only UI materials that break.
edit: You know what? This all started after I updated to the latest version of VS 2022. I’m gonna do a completely clean build of the engine and see if that fixes things.
I decided to just upgrade to 5.2. This is a completely new build. I still get the same nodes disappearing.
edit: I’m noticing it’s only Append3 and Length nodes that disappear (so far).
edit2: I found an actual workaround this time. I replaced Append3 with MakeFloat3. That uses a couple Append’s just like Append3 does internally so it’s likely equivalent.
Unfortunately, length is a different story. I replaced it with dot product and square root. But length is actually a built in operation.
Another fun fact. Only if I try to make a UI material instance with the node “Create Dynamic Material Instance”. Here’s where it gets really weird. If I change or remove the material class name and restart the editor. The nodes come back (if it’s a material no longer in use) and the nodes will disappear from the material that is in use.
I tried making a material instance asset. I then set that in the “Create Dynamic Material Instance” node. It will still affect the parent material.
Ends up I can’t use Unreal Engine at all anymore. There’s just too many materials that use Length and Append3. I really need to find a solution to this.
I’m getting more problems. The Interchange pipeline property becomes empty on texture imports.
Looks like there’s a bug in UE 5.1 and 5.2. Ended up being a property on the main character that stores a class. Just setting it breaks my materials. But if I move all the properties to another actor, it works fine. So I created a GameActor where I store all the game related properties and just cache a reference to that actor in other actors.
Anyhow, I’m now trying to refactor and put back together my project. Hopefully, this will be helpful if anyone else encounters this issue.
In case anyone reads this, the empty project template seems to work fine. I’ve tried first person, third person and top down and they all have the issues mentioned here. Others have reproduced it as well. You can create an empty project and move everything over from your old project and it should work fine.
I too had almost this exact thing happen. The gd length node just kept disappearing for what seemed like no reason. I was never able to pin down the actual cause (funny enough, in a different project I use the exact same material function in the EXACT same way in the same UE version 5.2.1 and it doesn’t have the problem).
Regardless, I was able to just do a manual length algo and collapse it into a single node:
BreakOutFloat3Components node → sqrt of (X * X) + (Y * Y) + (Z * Z)
Not sure you understand the problem. Many nodes will disappear in many existing material functions or pre-existing materials. It wasn’t just happening in your own blueprints. It was happening for everything. So a custom replacement is of zero help.