3D terrains with satellite imagery

I

iloveusernames

  • iloveusernames

This is a step by step process on how to create external 3d terrains with satellite imagery derived from Digital Elevation Model files to use in btb. For those who are unfamiliar with DEMs start here. http://www.emrl.byu.edu/gsda/data_tips/tip_using_gis_data_depot.html

Required software:
Microdem http://www.usna.edu/Users/oceano/pgu...e/microdem.htm DEM terrain editor viewer
MeshLab http://meshlab.sourceforge.net/ Clean/edit models for exporting to other modeling programs
SasPlanet http://sasgis.com/sasplanet/ Used to retrieve high resolution satellite maps
Anim8or http://www.anim8or.com/main/index.html Single excitable modeler for mapping and exporting.

The first step is to install Microdem. If you’re instructed to install the BDE executable at any stage be sure to do so. There’s been a report that the viewer shortcut causes problems when executed so be advised. It’s non essential for this demonstration.

Begin by launching Microdem and opening a terrain file. Uncompressed files have *.dem *.ddf. or *.asc extensions. Compressed files end either in *.tar *.tgz or *gz. They can all be loaded just the same. If you download a zip with multiple *.ddf files within, click on any one of them to built the dem…it’s in parts.
Once the dem is loaded you’ll see the color topography image. Moving your mouse about the map will indicate your lat/long coordinates visible below. For the most part you’ll only be interested in a small portion of the map.
On top of the map window you’ll see various tabs. To cut the map you want to select ‘Subset/zoom’ which is the 5th tab from the left. Click the tap then left click your mouse stretching over the area you intend to cut then let go. The file will reload again immediately after. If you want to change what you did click on the Undo Subset tab next to it. To be able to export to 3d format you must save the cut area first.
Go to ‘File’ > ‘Save DEM’ > ‘Current subset MD DEM’
When saved, close the file and reopen the cut dem. Now you’re ready to export the terrain image in a 3d format.
Go to ‘File’ > ‘Save DEM’ > ‘3D (OBJ)’. A mesh description will appear asking to proceed. You can generate millions of polygons if you want, although I don’t recommend anything past 4M because I’ve had trouble simplifying 200mb files.
The result is a mesh that needs to be reduced, repositioned and mapped before it can be of any practical use. For this, Meshlab and Anim8tor do the job superbly.

Install Meshlab and import the *.obj either through ‘File’ > ’Open’ or dragging.
Step 1) Prepare the mesh BEFORE reducing the face count by selecting ‘Filters’ > ‘Cleaning and Repairing’ > ‘Remove Duplicated Vertex’.
Step 2) Select ‘Filters’ > ‘Remeshing, Simplifying and Reconstruction’ > ‘Quadric Edge Collapse Decimatior'.
On the ‘Target number of faces’ line enter the desired number of faces you want your model to display then ‘Apply’. You might have to click Apply twice. 65000 faces is the maximum 3ds files can support here so set the value anywhere below that amount.
Now you’re ready to save the file.
Go to File > Save As.. and highlight the name including the extension and enter both manually (not in CAPS). There’s a slight bug when saving file names so enter the file extension of the format manually, in this case *.obj.
The file is ready to be repositioned and mapped in Anim8tor.

Unzip Anim8tor to a suitable directory and execute it.
When the title screen disappears click on 'Object' > 'Import' and load the *.obj file. You might have to pick the obj format from the drop-down list first. Select 'View' and make sure it’s set to Front. DON'T try and move the model around in the viewer to see what's taking place because you can shift its position. If you need to see then click on the Orbit view icon below 'View'(4spheres around a circle)
1)Click 'Settings' > 'Component' > 'Texture UV'. In the popout menu check Z under Axis then OK
2)Go to 'Edit' > 'Rotate' > 'Rotate Custom' and enter -90 for the X-axis then OK
3)Go to' Edit' > 'Locate' > 'Center around Origin'.
4)Go to 'Object' > 'Export' select the 3ds format and name your file
The mesh is now ready to be imported to XPacker or any other modeling app

The final stage is creating a high resolution satellite map for the model.
For this use SasPlanet. Basically it’s a tile stitcher that can retrieve images from a host of online map servers including saved Google Earth images. The Help file is in Russian but most of the menu is in English…It’s fairly easy to navigate.

The first step in creating a matching map is to locate the precise lat/long coordinates from the dem file you cut and saved earlier.
To do this, load the file in Microdem select the ‘Info’ tab from the main tool bar and choose ‘Map window corners’. The internal text editor will produce a file with lat/long for each corner. By default Microdem lat/long units are displayed in Decimal degrees. SASPlant inputs are in decimal seconds so before you generate the text file in Microdem switch to ‘Decimal seconds’ in ‘Options’ > ‘Units’ > Lat/Long.

How to create a high res map texture.
Unzip SasPlanet to a directory and open (no install necessary, I believe it’s portable)
‘Choose source from which program will take maps’ > ‘Internet’ > ‘Choose type of the map’.
This will let you connect to the selected server. Use your pointer and touch the tab icons to see information. Zoom roughly to the position of your dem coordinates and start capturing at the desired scale level until the entire area from corner to corner is filled. The scale range is 20X for Google, Virtual Earth and Yahoo satellite images.
Sasplanet can use Google earth imagery to work with as well by directing it to the Goggle Earth dbCache.dat file stored on your drive.
Location: C:\Documents and Settings\YOUR_USER_ACCOUNT\Local Settings\Application Data\Google\GoogleEarth.
To display GE dbCache images select ‘Parameters’ > Settings’ >‘Cache’.
Search by directory or cut/past your GE dbcache.dat file address on the ‘Path to cache Google Earth’ line then ‘Apply’.

Go to ‘Operations’ > ‘select’ > ‘ On coordinate’ and manually enter the exact Lat/Long degrees for left top and right corners as displayed in the Microdem coordinate text. Be certain to enter the North South East West Lat/longs correctly as well.
When the popup menu appears select ‘Stick’ to adjust image quality/output image file format and finally scale. You’ll be able to see and adjust the actual dimension of the final map before creating it. The map is in projection form so it will position on the mesh accordingly. The result is a geocoded texture of sorts that will fit without any editing. You can make it as large as you want. Clearly a 10000X10000 image on a single mesh isn’t practical for games, but it does speed things during the modeling stages. This is merely a starting point for referencing and placing objects although you can be creative and incorporate the model to.

Now you have a map and 3ds mesh you can place in Xpacker. When you add the *.3ds you’ll get the no texture warning, click ok anyway.
Go to Materials select the terrain object then the material in the tree list.
Load your map from file then save. If you get the invalid image height/width warning you can still use it in btb. If you intend to export to a game then correct it before loading it in Xpacker. Say you made a *jpg @ 5000X3000, load it in an image editor and resize it to 4096X2048.

The only thing left is to create or load a track and drag over the terrain into the scene. Try not to push it off the road and let go. Also uncheck ‘rest on the ground’ for ease of movement. It’s a bit tricky to grab at times but you get the hang of it.

There are bunch of other uses these apps have such as simplifying complex shapes to display in your final production...

Examples..
lake_carmfe2Snap00.jpglake_carmfe2Snap01.jpgtest1.jpgtestw.jpg
pencil.png
pencil.png
pencil.png
 
Do´t understand

If you use Sketchup and import the scnene that you are viewing in Google Earth you can export it in a 3d format.
That 3d model can be imported into BTB Xpacks, with less work.,
I dont know if is really accurate in heighs but the sense of inmersion is the same with less polys.
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top