Height map from terrain for use in unreal

So I sculpted a terrain in blender, and from my understanding, just importing it into unreal as an fbx is a no go for all the cool things the terrain package offers, but a height map is acceptable, just not sure how to (I’m thinking bake?) get one out of the mesh in blender. Any help would be appreciated!

Using 2.79

Check the docs: Render Baking

Tutorial: (It’s for normal map but should apply for the other maps as well)

You’ll need a low poly version of your mesh as well. You can use instant meshes for this. There is also an addon to integrate with Blender: Instant Meshes Remesh

Sorry, I’m not understanding. I’m familiar with baking but not sure how to get a height map from it. Displacement would be my best guess but it isn’t available in cycles and I’ve never used blender render unfortunately.

edit: also have substance if that would be of any use.

edit edit: So baking ao onto itself with a plane above the mesh(a test mesh, might not get the same result on the actual terrain), meaning no “selected to active” is similar to what I’m trying to get, but grainy and inaccurate I’m sure.

Can you share your sculpted terrain here?

Yes, you’ll need to bake displacement. Why don’t you just use Blender Render to bake it?

I don’t know about substance softwares.

A terrain heightmap in Unreal 4 needs to be a 16 bit grayscale image. To easily bake a heightmap, you can use the GYAZ Handplane Bridge Addon that uses the free baker Handplane. Just remember that 1 unit in Blender is 1 meter, 1 unit in Handplane is 1 centimeter.

(Since I wrote the addon, I could just automatically convert Blender Units to Hanplane Units, but I haven’t had the time yet to figure out whether it’s a good idea so currently the addon doesn’t do that.)

Alternatively, you can use a terrain heightmap generator like World Machine, L3DT or Scape.

1 Like

Okay, as usual I got lost somewhere. I downloaded both of the addons/programs, and I’m not seeing a handplane.exe anywhere, just the .py stuff from the github, the standalone program doesn’t show up when I try to find it by ‘install from file’. Help?

edit: realized I’m doing that completely wrong but still cant seem to get the addon into blender :neutral_face:

Installing the addon:

  • unpack the zip
  • …-master/…version#/GYAZ_handplane_bridge
    copy this folder into Blender/2.79/scripts/addons

Alright got it into blender and set up the bake settings, now just trying to figure out how to do the path part. Unless I can just type ‘handplane.exe’. Yeah I think that worked but apparently D:\desktop wont suffice lol

  • click on the folder icon at the end of the row
  • navigate to the handplane installation folder, open it
  • click accept

Default path on Windows:
C:\Program Files\Handplane3D LLC\Handplane Baker\

Ahh okay, that worked. However when I hit ‘bake with handplane’ with a folder destination in the Folder box and ‘Height’ in the Name box it opens file explorer like it supposed to, and its added a ‘meshes’ and ‘textures’ folder, and a Height.HPB file, I’ve never dealt with png16 files but is that what I would use in unreal? Oh wait, I did that in RELATIVE, should I have done this in PATH?

Destination:
RELATIVE = relative path: the project folder will be created relative to the folder the current blend file is saved in.
PATH = absolute path: the project folder will be created at the exact location you set.

Using a relative path is totally fine as welll as an absolute path.

Yep, 8 bit is not enough for this.

So to clarify the .HPB file is the height map I’ll be using?

No, .HPB is a Handplane project file, Handplane uses it. The textures you need is surprisingly in the folder called “textures”.

Aww, well in that case it didn’t work. That file is empty…

Edit: just a little check list of the things I’ve altered- I changed both scales to match the height of my mesh, accounting for the cm to m, I’m using PATH and sending it to a folder, and using the name Height below that. I’m clicking ‘Bake with hand plane’, and I’ve set up the path to ‘handplane.exe’ in program files. I also have done the basic setting up an image for the lowpoly even though your program doesn’t need that I assume.

k%C3%A9p

You have to define which textures you want to bake by clicking an their name. How else should the program know what to bake?

Sorry, I’ve done that as well. Let me open a fresh .blend and try again.

Edit: okay it worked in the fresh .blend so I must need to got through and check everything. Also as always thank you helluvamesh, we don’t deserve you. You literally came though with a program you created that fixed my problem lol, thanks again!

I spend a lot of time with error handling and writing error messages with all of my addons, so it’s disturbing that it fails without any warning.

I wouldn’t chalk it up to error on your end just yet, if thats what you mean. Pretty certain it’s on my end, but I’ll let you know if not. Gonna cross reference each .blend and see what the difference was.

Could you open the console (Info Header > Window > Toggle System Console) and see what it says?

export finished in 0.0156 sec.

  • Info - Unable to open project file [D:\Desktop\Blender] for reading.

Hope I did that right… Also pro tip, don’t close that window once you open it unless you have saved haha