0
votes

I'm trying to import a terrain model into Unity, but my displacement modifier doesn't appear to import.

I'm trying to put together a terrain for a unity scene. I generated some mountainous terrain from noise, but of course it all is very much in a single "band" of heights:

Terrain - Single height band

I need a single stand out mountain for the scene, so I sourced a height map of a real mountain, generated a second set of UVs and applied a displacement map to blend the two together:

Terrain - Overlaid mountain data

It's a little hard to see in blender in this view mode, but having had a good look about it, I'm quite happy that I can use this resulting model.

My problem is, when I copy this .blend file into my unity assets folder, unity seems to ignore the displacement and I just get the first "flat" object showing.

I'm quite sure it is importing the updated model, as I've made other changes to check they're coming through. I've also brought in a number of other models I've made recently with various blender modifiers on them, and they've all worked fine.

What am I missing?!


Fixed: Thanks @SteakOverflow!

Must remember to move or embed any linked resources when I move the .blend file into the asset folder..

Fixed!

2

2 Answers

1
votes

The only thing I can think of is that you may have a relative path pointing to the image you are using as displacement map. When you import in Unity obviously the image is not found at that path as it's relative to the previous blend file position.

For example if my blend file is on my Desktop and my displacement image is positioned at the same path of my blend file, like "//terrain.png", when I copy it into my Unity project Unity doesn't see the image, unless I copy the image too, and I'll see just the base mesh.

If this is the problem then you can easily solve it by

  • setting the path as absolute (usually not a good idea)
  • or embed the image in the blend file
  • or move the texture manually to a relative path that corresponds to the path you set in the blend file.

Hope it helps.

0
votes

Try exporting it to an .obj or a .fbx file first. Unity may be getting rid of unknown blender modifiers which are incompatible.