Last year I wanted to learn how to procedurally generate meshes in Unreal, so I put together a few quick tests of my own. This got some interest from people here so I decided to clean it up and release it for free!
I really hope this will be useful to others who also want to play with geometry generation in Unreal.
Download and source code: GitHub - SiggiG/ProceduralMeshDemos: Examples of procedural mesh generation in Unreal 4.
NOTE: All the current code is for Unreal 4.25!
The purpose of this project is to provide examples on how to generate geometry in code, from simple cubes to more complex geometry generated from fractal algorithms.
I would love for this to become a community project, so I will accept pull requests for new samples as well as any corrections to my code. I’m also willing to add contributors directly if anyone is interested!
Please note that I wrote the code to be readable, trying my best to explain each step along the way. There are many ways this code could be optimized to run better, but I wanted to keep things simple in the first few examples.
There is a lot of code duplication between the different examples which I felt was OK for the first few classes, but I will refactor some of the common functions into a utility class soon.
Update: I recently converted the example from using Epic’s ProceduralMeshComponent to Koderz’s excellent RuntimeMeshComponent.
All corrections, contributions etc are of course welcome! I’m still new to rendering in UE4 and ultimately want to convert some of this to using RHI calls myself (UPrimitiveComponent, PrimitiveSceneProxy etc).