The selected static mesh become invisible in UE5.6
It happened to me three or four times today.
Sometimes when doing CTRL+Z
Does this happen to anyone else?
Is there any solution?
Thank you so much!!
The selected static mesh become invisible in UE5.6
It happened to me three or four times today.
Sometimes when doing CTRL+Z
Does this happen to anyone else?
Is there any solution?
Thank you so much!!
Hey there @Ivan3z! I need a bit more information! What were the steps leading up to this? Does it change randomly repeatedly or just remain invisible once it changes? Does this only apply in editor or also in PIE? Do other rendering modes pick it up? Are there any GPU memory or texture pool warnings?
I was designing a level yesterday.
I was generating static meshes with geometry script.
So I spent like several hours doing this yesterday.
This was basically my entire workflow yesterday.
1-Generate Mesh
2-Remplace Actor
3-Duplicate Mesh
4-Move Mesh
5-Change Materials
On several occasions the static mesh became invisible. Not always, it only happened four or five times. But enough times it happens to know something isn’t right.
Basically, I was all the time selecting and duplicating meshes.
Alt+Left Click+Gizmo moving.
I remember at least two occasions where the mesh disappeared when doing “UNDO”
CTRL+Z (Just the mesh that was selected).
The mesh becomes invisible and there is no way to make it visible again.
The only thing that remains visible is the gizmo. It can be found in Outliner. If you click on it, the camera takes you to where the mesh is.
I don’t know about PIE. I only worked with the editor yesterday.
I only tried it in LIT mode… I didn’t think about putting any other rendering mode.
But the mesh definitely exists and has collisions.
The navigation mesh is also generated on top of the mesh. So the mesh is actually there. Just it’s not visible.
Not as far as I know.
If that happens, should I get a popup? Or a message in the log?
I’m not using any textures anyway… All the materials are pure colors.
Anyway, the next time this happens, I’ll record a video and post it here. And I’ll check the log for any warnings and I will see other rendering modes.
I will let you know.
Thank you so much @SupportiveEntity
I was working on trying to recreate this issue but couldn’t get it to occur reliably. I got them to disappear for a couple frames but when moving the camera they returned.
In my case, it didn’t reappear. Even moving the mesh gizmo.
I’m using version 5.6 compiled from source.
Maybe there is some difference?
I haven’t worked with levels today. I’ve been trying to optimize a little today.
But I have to do more levels soon.
I actually want to make 10 levels and I only have one that is more or less decent.
So I’m sure I’ll have this problem again in the next few days.
I know it is difficult to reproduce. Yesterday I tried to do it on purpose to record a video and show it to you. But I didn’t get it, I spent an hour trying.
So when I make the next level I’ll be working on it for a bunch of hours and when the problem happens again I’ll record a video and show it to you.
And I will try to pay attention to all those things you have told me.
Thank you so much @SupportiveEntity
Thanks, I await more information! From what I can tell it sounds like it’s probably related to geometry modification. Does this only occur to meshes that are still being used by geometry editing or can it occur to any static mesh in the level?
Now I have doubts… but I think in both.
I’ll keep an eye on that next time this happens and confirm it to you.
For the moment the meshses has not disappeared again.
But I think it’s a problem with the materials.
I get these messages in the log every time I work with dynamic meshes.
LogGeometry: Warning: RemapToNewMaterialIDsByMaterial: Material in FromMaterialList not found in ToMaterialList, skipping
LogTemp: Error: Spectral Conformal UV Solver failed to converge. Resulting parametarization might be invalid. You alternatively can try the default Conformal solve instead.
So if the materials don’t load well, the mesh may appear invisible (I think).
Anyway, I’m continuing to create levels. If the problem occurs again, I’ll let you know.
Best Regards!!
Oh those errors definitely shed some light on what likely happened! The material remapping and UV solver failing could absolutely make an object invisible when being unable to map a material to it. This can happen to complex shapes that the UV solver can’t handle, but usually only some faces are invisible until it tries again and succeeds.
I have the material with index zero empty on purpose in all my dynamic meshes.
I’m not sure if the error message is related to that.
But definitely the material with zero index is very problematic.
I keep it empty and then delete it when converting the dynamic mesh to a static mesh.
It’s the only way I found to correctly assign materials to the mesh.
Ahhh that’s good information to have. Going to try recreating the issue myself again keeping the material index blank to see if I can get it to occur. Trying to gather what I can for a bug report but without being able to replicate it, it’s hard to pin down.
Use my code to generate static mesh if you want
GeneratedMesh.cpp (11.9 KB)
GeneratedMesh.h (2.6 KB)
Just clck on GenerateNewStaticMesh
I have an array to assing materials
The material in the actor look like this
To remove material ID (Index Zero)
void FMaterials::Apply(UDynamicMesh* &TargetMesh, const TObjectPtr<UDynamicMeshComponent> &DynamicMeshComponent)
{
if (!IsValid(DynamicMeshComponent))
{
Message::Error("FMaterials::Apply -> DynamicMeshComponent is NULL");
return;
}
TArray<UMaterialInterface*> CompactedMaterialList;
if (MaterialsList.Num()>0)
{
CompactedMaterialList = MaterialsList;
CompactedMaterialList.RemoveAt(0);
UGeometryScriptDebug* Debug = nullptr;
int MissingMaterialID = -1;
TargetMesh = UGeometryScriptLibrary_MeshMaterialFunctions::RemapToNewMaterialIDsByMaterial
(
TargetMesh,
MaterialsList,
CompactedMaterialList,
MissingMaterialID,
Debug
);
}
DynamicMeshComponent->ConfigureMaterialSet(CompactedMaterialList,true);
}