Home Unity

How To Convert Meshes To Unity Terrain [HELP]

polycounter lvl 6
Offline / Send Message
D4N005H polycounter lvl 6
Hello.
I've already converted two meshes to two terrains (by using  a script for Unity3D - which is called Mesh2Terrain.CS) and then I've put them together to make one big island (by using a plugin for Unity3D - which is called "Terrain Composer") and it was okay.

But it was only a scene with 2 meshes, Now I have made the real city for my project and it has more than 961 tiles (31x31 tiles) of  meshes that are 1024x1024 and they are already near each other and everything looks okay.

The problem is converting all of 961 tiles of meshes to terrains takes too much time, I want to know if there is a better fast way available or not? I've tested the "Mesh to Terrain" asset and it didn't work.


Replies

  • Eric Chadwick
    Options
    Online / Send Message
    Have you searched the Asset Store?

    You might also try creating height maps for each tile, then converting those to Unity Terrains. There may be tools to import height maps, instead of meshes.
  • D4N005H
    Options
    Offline / Send Message
    D4N005H polycounter lvl 6
    Have you searched the Asset Store?

    You might also try creating height maps for each tile, then converting those to Unity Terrains. There may be tools to import height maps, instead of meshes.
    Well I've tried Mesh To Terrain, Object2Terrain and also Terrain Composer's stitching tool as well as Stitch Terrain, none of them work well.

    What do you exactly mean by creating height maps? I mean, do you say that I should create 961 terrains in Unity and assign them height maps individually? if yes, the how would I render each height map in 3DS Max?

    By the way, this is how the meshes look like:

  • Eric Chadwick
    Options
    Online / Send Message
    Why do you need Terrains? You might be just fine with using meshes, and creating LODs for them.

    This kind of work, converting many objects, is a good reason to learn scripting.
  • D4N005H
    Options
    Offline / Send Message
    D4N005H polycounter lvl 6
    Well according to the previous threads that we have talked about terrains, I've found out that terrain is more optimized than mesh and also there is ability which is adding tree and billboards  etc... in an optimized way for  terrains. Once I've figured out scripting or find an useful asset for this, I'll post about it here.

    EDIT: Found a way to do so, just modified the Mesh To Terrain plugin's main CS code and then regenerate the terrains without any flat meshes and just with some teaks it is working like a charm.
Sign In or Register to comment.