Method to create large procedural meshes

Hello folks,


As background, I am trying to view isosurfaces from a vtk file viewer (e.g., paraview) in UE4 such as that shown in the picture below:

Phase 1

In getting the behavior I want, I first created actors for each cell center. Worked great!.. until I used the whole data set. Apparently UE4 doesn’t much like creating 80,000 actors. Things run a bit slow. See picture below

Phase 2

The next attempt, was to create a single actor for each isosurface. So now I would only have ~10 actors. I figured a procedural mesh would be pretty perfect. I got the workflow tested on a sample script (below) which I got by following this youtube page: Unreal Engine 4 Guide - Mesh generation - YouTube. Note I am using the “Construction” tab but I’ve tested on the “Event Graph” tab as well.

When I move from the small sample to the real problem I get issues. I tried reading .csv files with loops but get >1,000,000 loop errors. I also tried to paste the arrays directly into blueprints like is shown in this video Unreal Engine 4 Guide - Procedural pyramid - YouTube but no dice. UE4 thinks for a while and appears to freeze.

Silver Lining

There does seem to be some promise here. I have tried constructing just one of the isurfaces (~13,000 sets of points- picture below). Again it was pretty slow getting the data in, and only the copy-paste method would work. Loops still gave errors, but once the data was in there wasn’t any lag in the game-play.

Pertinent Info

My dataset currently has around ~125,000 sets of points and data for normals, triangles, and vertex colors. I would like to scale to datasets much smaller to 10-100x larger. Preprocessing is a potential option but I’m trying to limit my data manipulation and number of tools in workflow. Currently I have paraview, python, and UE4.




I was able to test a little more of the >1,000,000 loop errors by increasing the limit to 10,000,000. However, when I run that version nothing is shown on the screen. But when I use copy-paste method things work (green bubble image). Ideas? No errors or warning are thrown.

Edit->Project settings->General Settings Maximum Loop Iteration Count

The solution that I landed on was to avoid creating anything procedurally or with tables in Unreal. The editor just did jive well with more complex procedural meshes… at least the ways I mentioned above. Instead I exported .ply files from paraview to blender (because PV <5.8 does not do glb files), then exported .glb files from blender, then loaded the static mesh for each isosurface using datasmith. Then I was able to create a blueprint which was capable of add the meshes to the scene, control the colors, etc.

Not as fancy or slick as I would like yet. But it is alright. Let me just I would love to have python more fully supported… like tab20. Would have made this alot easier I think.