November 7, 2017 at 10:36 pm #1485
How To Use World Composer and Terrain To Mesh
This is what the world composer tool looks like, it will be located in Window -> World Composer.
Make sure your bing key is entered correctly.
Is our code
Regions are just user defined sets of areas, You can use them or make your own by pressing + to have a region just for this project
Areas are where World Composer will download the bing map data.
To make a new area press the + button.
You can then press E to edit the name of it.
After creating this area you need to place it, press Pick and then left click on the map were your Upper Left corner will be.
Then press the Resize button and left click how big you want that area to be. Keep in mind the bigger the Size is the lower the resolution you can get from Bing.
Hightmap zoom will be how detailed the mesh will be, higher the number the more detailed it will be. 12 to 14 is where you want to be.
Make sure to set the export path before you start by clicking on Change button.
No need to mess with the offset
Name the Hightmap file
Threads will be how many data blocks are downloaded at once.
IF YOU ARE HAVING RANDOM BLOCKS ON YOUR MAP OR MISSING DATA LOWER THIS NUMBER.
After you have downloaded this file press the Normalize button.
Now it is time to import the satellite image.
The Resolution should be DOUBLE what you have as the Hightmap size.
To change the resolution press the + or – button on IMAGE ZOOM not on resolution.
Make sure the export path is the same as the hightmap.
Image file name should also be the same.
Press Export to get the data.
DO NOT PRESS NORMALIZE
Now that you have everything downloaded, it is time to make the terrain file.
This information should of been filled out for you
Make sure to uncheck normalize, I have not had good results from what it provided so leave that be. If things are a bit out of wack you a modify the heightmap curve.
Heightmap resolution should be the one that is in the (x)
Other items should be what I have up here.
You will now have this:
No we have to make the terrain into a mesh
Open up the Mesh Materializer window (ctr+m) or Window -> VacuumShader -> Mesh Materializer.
Now move the terrain gameobject into the prefab section
Material and shader information we will ignore as we will replace it later.
Scroll down and click the box of Terrain to OBJ
25 Vertex is low res, 100 would be highres, you can play around to see what works are gives you the best amount of detail.
You will get this and your obj in the temporary folder (this is using 100 vertex count).
Move the OBJ and Material to another folder where you can easily organize it.
Now you can open up Max/Maya modify this file it will be back up on unity.
You must be logged in to reply to this topic.