How to fix artifacts in the mesh? (Geometry Script)

I’m doing boolean operations on a cylinder… basically I’m making holes.
And artifacts are being generated that I don’t know how to eliminate.
I could take the mesh to Blender. But the idea is to do it in Unreal using C++ or Blueprint.

Does anyone know what tool I should use to remove the artifacts?

Thank you so much!!

I feel this a topology issue, can you show wireframe when problems occurs. It is generally when the topology not matching the geometry creating problem.

A workaround the problem would be, getting the corner radius and making sizing (up down ) with delta increments in respect to corner radius: So corners never conflict with big cyclinder edges resultin in a better topology?

Also you recalculating normals? that can maybe a little bit improve but still there would be artifacts in my opinion when it comes to topology.

Hi @RedGrimnir

Thanks for the reply.

Yes, I am recalculating the normals.
Wait a moment while I make another video and show you the topology and how I calculate the normals.

Thank you so much!!

1 Like

In this screenshot you can see the topology (there are many triangles at the corners because it is Round Rectangle)

In this video you can see the calculation of the normals (I can’t get it to flatten any further)

Yeah seems that tiny geometry on the topology causing issues (like generally everytime).

Well with respect to what you are doing since I don’t know all the sandbox of constraints for the tool you are creating.

The most easy way to if the base mesh generally static, is to avoid corner overlaps when a delta change happens. So it increases like 10x 20x units depending on the radius. Ofcourse this is as you see a blunt force solution :slight_smile:

however I would have give a shot to Repair Degen Geometry and Remove Small Components Imo these can solve some of the issues.

Additonally maybe two vertical loops to boolean father can be nice since no 3d application like long edge tiny triangles, its always a problem.

1 Like

Increasing the corner radius creates more artifacts…

I will study the other alternatives you have given me.

Thank you very much for the help @RedGrimnir

Interesting one, i will run some bp experiments too :smiley:

It seems that the documentation is outdated.
The Repair function is not available.

However I tried these two

UGeometryScriptLibrary_MeshRepairFunctions::RepairMeshDegenerateGeometry(...)
UGeometryScriptLibrary_MeshRepairFunctions::RemoveSmallComponents(...)

But it didn’t solve the problem.

All that’s left is to try this…

I have no idea how to do it. XD (I’ll look into it)

If you are going to experiment with this you will probably run into this problem sooner or later.

Let me know if you manage to solve it. :wink:

Thank you so much @RedGrimnir

Yeah that problem is quite common on booleans, on blender too, did a lot of geometry scripting tbh on my game atleast, but never too much booleans. Generations slices, cuts etc. Will run some experiments to work around.

I’m just starting out… I’ve only been using this for about three days. But it seems like a very powerful tool. And I love that you can modify it if you don’t like the result. I think Houdini works this way too… but it’s much better if you can do everything directly in Unreal.

Yes, booleans in Blender are a real pain. I try not to use them at all.

allright so atleast I have some replication on it to share with you. I only was able to replicate this when I use split normals on dynamic mesh generated. If I don’t use it, it doesn’t occurs.

After poking around with the split normals a higher value of angle generally solves issue or using split normals data as new layer.

image

Wanted to share

1 Like

You hit the mark!!
Now it’s much better!!

Thank you very much for sharing the solution and for investing your time in researching.
I really appreciate it very much

1 Like

Do you know any tricks to get “perfect” UVs?
That would be the icing on the cake…

It seems that the mesh has some seams where the squares are incomplete.

Glad to hear that, this worked for me as recalculating a cylinder with a boolean.

Which you have also control on texel density alignment etc.

however without this, atleast on blueprint nodes seems it just patches the uv for the added geometry which keeps the texel desity, seams intact outside. So if you don’t recalculate uv it seems its fine on BP. However a better control for tool can be nice with box projection

1 Like

It’s great!! It looks perfect now!!

Thank you so much @RedGrimnir :heart:

1 Like