One thing we could do to get much better performance out of these would be to group the texels by location so that we can use LOD on the sampling meshes. The thing preventing this from being possible currently is that the point cloud data is randomly distributed rather than grouped so we would have to LOD entire point clouds at once which is a shame. The example above is 32million triangles, most of which end up in the distance.
Also FWIW I am not using particles, just regular static meshes. I think most other people in this thread are now as well.
I make my mesh using a blueprint. Here is the entire script to make the mesh. Note that the procedural mesh component exists in the component list. You just click the procmesh component in the details panel after placing in the world and a “create static mesh” button will appear and then you can use that. I have made up to 1024x1024 meshes this way and the perf isn’t that bad.
Note that I am encoding the positions into the UVs since there was an engine bug that applied sRGB gamma to vertex colors when I tried.
I did my sampling differently than others. I didn’t use separate MIDs, instead I painted solid vertex color on each instance of the mesh (note that the ‘paint vertices’ node in BP doesn’t have the sRGB bug) and used that to control the multiple meshes looking up into one texture. The math is simple, the only thing that needs to be updated with an MID is the “Tiles” parameter. I made my mesh a 512x512 grid, so if the texture is 4k, it needs to be 8 tiles to use the whole thing.
And here is how I convert each quad into a sprite. The top part is only to remake the UVs since I clobbered them to store the grid positions. There is probably an easier way to do this, especially once that vertex color bug is fixed (I could have just written the UVs to the vertex colors but at this point I didn’t want to redo the mesh).
“Encoded Poly size” just needs to match the size you made the polys using. Technically they don’t match in these images since the BP shows them as 100 size but I didn’t retake the image.
One final note: I also recommend setting the Z position of each poly in the grid BP to use the point index. That way the polys will be stacked like a deck of cards. If you create them all at the same Z height, the editor perf can tank if you happen to fullscreen view it. Shouldn’t affect the material setup at all since it subtracts worldposition at the end to neutralize to 0,0,0 before projecting.