As I was developing the Cordoba Unreal Engine plugin, I ran into a daunting and complicated error that really pushed me to my limits. Probably spent 120 hours or more on this issue, as there was no good documentation available on how to properly generate landscape actors from height maps in UE5.
To help out the community and ensure others don’t need to suffer through the same challenges I faced, I’m open-sourcing this part of the Cordoba plugin. Hopefully this guidance can save you a lot of time and headaches.
I spent so much time trying to find any good examples on how to programmatically generate landscape actors based on height maps, but I could find nothing! It was such a pain.
Since I’m using this in a paid plugin I’m developing, I don’t want to share all the details. But because this was such a horrible experience for me, I thought I’d share a bit to help others who might be struggling with the same problem.
The main inputs you’ll need are:
- The file path to your height map image
- The “numblocks” parameter, which represents the real-world scale equivalent. For example, if you set this to 1, each block will be x by x size.
I’m sure ChatGPT can help you get the rest of the way with the actual code implementation. Hopefully this at least points you in the right direction and saves you from going through the same frustrating process I had to deal with. Good luck!
Check out the Github for how to programmatically generate landscape actors.