I’m trying to get some DEM’s into my Unity game. Anyone have any tips on how to do this. I was doing it through Bryce 5, but I only have that for Windows and my Windows computer is too slow and out of hard drive space so I’d like another way to it (using only my mac).
If there is no way to do this directly on my mac I am able to convert the DEM to a height map.
Any ideas are appreciated
Blender plus this script should do it:
http://uaraus.altervista.org/index.php?filename=en/content/categories/Blender/DEM_importer.html
Bryce can export to 3ds which Unity can easily import. The good thing about that is that bryce even does lod for you and generates an optimized mesh.
I tried this one already and unfortunately it’s for the wrong type of DEM. Mine are all in CDED (the same as SDTS) format.
As far as Bryce goes I mentioned earlier that it works great except for problems with my (windows) computer. I don’t have the money to buy the mac version so right now I’m looking for free alternatives.
Since I’m not getting many replies…
I’ve tried using Terragen, which will import my DEM’s (as a heightmap) beautifully, but I can’t seem to get them to Unity. Any suggestions?
If I do use Bryce how am I supposed to scale my maps up to a reasonable size?
In the past I’ve used bryce - get a heightmap in and export an optimized mesh to 3DS. If the size in Unity is wrong, use the Import Settings in Unity to get it right. Or just scale the object either in bryce or Unity.
I’ve also done top-down renders of the object for a quick texture for Unity (great as the base layer for a detail shaded material). Bryce can bake diffuse,spec,bump,etc textures, but I always got better results just doing a top-down render and cropping the image in photoshop.
Depending on your coding skills, it should actually be pretty simple to do a script in Unity that builds a mesh from a DEM. AFAICS, a DEM is just a 2D array of height samples.
A bit of googling turned up this page:
http://www.vterrain.org/Elevation/dem.html
Halfway down there’s a converter from DEM to DXF. Blender can read DXF files, so you have a path there.
And now lets all dance the Format Shuffle!
Okay… it should be easy enough to make a script to generate a mesh from the heightmap (looking at the procedural sample project), but then I can only see the mesh when the game is running. I’d like to be able to see the mesh when I’m actually editing the game - is this possible using this method?
Here’s a hack - instead of doing inside Start (or Awake) just do it in a method that appears as a context menu. Then you can execute it from editmode, get your mesh voila.
After genrating it, you could write it out to an OBJ file and then import that. Freyr wrote this script:
d.