ue4plugins / StreetMap

Import OpenStreetMap data into Unreal Engine
MIT License
2.16k stars 442 forks source link

TriangulatePolygon has issues with some concave shapes #17

Open Hemofektik opened 7 years ago

Hemofektik commented 7 years ago

Some buildings are improperly triangulated. See this s-shaped building in Berlin for example: sberlin

In future support for polygons with holes (e.g. The Pentagon) would also be nice.

Thirdparty libraries like Poly2Tri could help here.

I would like to fix this myself but we should probably agree first on how to tackle this issue (ThirdParty lib yes/no, if yes how to integrate).

MikeFricker commented 7 years ago

I actually wrote a much better version recently for our new geometry editing feature in Unreal Engine recently. If you have linked your GitHub account with your Epic Games account, you can view the code right here. https://github.com/EpicGames/UnrealEngine/blob/dev-geometry/Engine/Source/Runtime/MeshEditingRuntime/EditableMesh.cpp#L1544 This is still in a development branch, but after it is released (in UE 4.17 most likely), we can switch StreetMap over to use the new algorithm.

Hemofektik commented 7 years ago

That would also mean we could manipulate the generated buildings in the editor?!. Waiting for the UE4 release then sounds promising. Looking forward to it.

MikeFricker commented 6 years ago

We just finally merged my triangulation code into 4.20, so hopefully we can use the built in engine code to improve this in the near future.

HeadClot commented 6 years ago

@MikeFricker Does that mean that the new Geo Tools are going to be merged into 4.20?