How do I import texture from World Machine to Unity?

I already tried exporting all the depostion, flow, height, bitmap and plug them into Unity but when applying the material to the landscape (with the heightmap imported from world machine) the texture still doesn’t line up right…


image 1. Inside Unity


image 2. Inside World Machine

As you see, mountains and plains aren’t getting the colors they supposed to… how can I import/export that has the Exact same mountains and texture from world machine to Unity?

Many thanks in advanced!

*Edited: Sorry for late reply. It’s a wrong image upload. The correct one is here :'D

Is it just me, or does the terrain in Unity look different from the one in World Machine? It looks to me like the texture from the Unity image would fit correctly on the heightmap shown in World Machine. I would double check that the heightmap is loading in correctly, make sure it’s not upside-down, inverted, or anything like that. Unless I’m wrong about the terrain looking completely different, in which case, feel free to ignore me.

Editing to update:
The terrain shown in Unity is almost definitely the default world that loads in when you open up World Machine.

2 Likes

100% you’re accidentally exporting the heightmap for the default world, that’s why the texture isn’t lining up correctly.

2 Likes

Sorry I’ve uploaded the wrong image!

The true one still doesn’t have the correct texture. I think i’m doing something wrong in the process… Do I have to flip or something?

Thanks for the reply man, appreciate it!

Oh, interesting! I’ve never used Unity before, so I’m not sure exactly how the texture import goes, so take this with a grain of salt!

Working in Terragen, I know sometimes the heightmap will import in centered on the center of the terrain, whereas textures will import in centered on the upper left corner of the image. That doesn’t appear to be happening here (as the texture covers the entire terrain without seams), but if the heightmap is a different filetype than the texture (tiff vs png, for example), it’s possible that it’s importing them differently, so perhaps flipping the texture would solve it.

Failing that, I’d double check the scaling on the texture. At a quick glace, the texture shown in Unity seems like it might be “zoomed in” quite a bit, so maybe check and see if it’s scaling it to much larger than the terrain.

All that being said, it may be a weird perspective issue, but I feel like the terrains are still different from each other. If nothing else, the terrain itself is definitely mirrored in some way.

As I have so beautifully illustrated here

Even if you were to orbit the camera around so that we’re looking from the same angle, the two circled parts wouldn’t match up. In the World Machine view, the little…I don’t know what to call it, high altitude valley? Is located down and to the right of the peak, whereas if you were to orbit around the Unity terrain, it would appear up and to the left of the same peak. So my guess is there’s definitely some flipping going on, possibly some scaling as well. Though I’m also coming off of a 13 hour day at work with far too much caffeine in my system, so if I’m just not rotating things in my head properly, I wouldn’t be surprised.

1 Like

Yes when I rotate them to match up (rotation-wise) they actually are ‘mirrored’ versions of each other, that’s why I thought of flipping normals or something. Imma try it now and see how things go :'D

Okay so the answer is to flip vertically the heightmap before exporting. It’s actually still the same as the guide for world machine 2 to Unity. Anyone having this trouble could find it here:


End result in Unity

Close up

2 Likes