Vietnam Tangent-Space Normal Bake

  • September 09, 2012
  • 88 Downloads
  • 0 Likes
  • Blender 2.6x
  • Render: Blender Internal
  • Creator: mramshaw
  • License: CC-BY-SA
You must be logged in to download.

Description:

Nothing very new here but should be of interest to Bmf. I have been following his tutorial about using NASA satellite date for elevation maps, thought that Der-On's Tangent-Space Normal Map blend file would be a good match for this stuff, and yes it definitely is a good match. So I am sharing it as a thank-you to Bmf.

SRTM NASA-based Satellite data for Vietnam derived & attributed, so must be CC-BY-SA.

Or at least that's how I interpret their licensing requirements for derived works.

If you have used too many vertices in your modelling, you can try to reclaim a few with a Decimate modifier, but the Displace modifier seems to create non-Manifold problems. These seem to be resistant to Edge Split modifiers, the easy fix is to use a SubSurf modifier. But this doubles (at least) the vert count - I tried a decimate modifier with this quick fix but my attention span is not long enough to know if it will work or not (I went for lunch and when I came back it was still churning away so I killed it).

The easy solution (but not always the best) is always to add more verts so here is another way to get the appearance of more verts so as to have some left for particle systems.

All textures should be packed; there is a use note inside; Blend file is compressed.

Comments:

  • BMF profile picture
    BMF

    Martain, We've been trading comments and ideas on this subject for a while now, and so the technique below is just another page in the playbook.

    I think there is a quicker way to achieve a normal map of SRTM data with higher resolution. My newly discovered technique should give you much higher resolution than in your preview image with less effort and fewer verts.

    Once you have created the heightmap from MicroDEM, then use a software application that can create normal maps. GIMP has a normal map plug-in for 2.8 and if you are using an NVIDIA graphic card, you can download the NVIDIA plug-in for Photoshop that creates normal maps in seconds. Actually, I don't know if you have to have an NVIDIA graphics card, I just assumed there is a link between the filter and the card.

    In my case, I imported the GeoTiff heightmap that MicroDEM created and then imported it directlin into Photoshop. Using the NVIDIA normal map filter, I created a normal map from the heightmap.

    I used the normal map of the heightmap on a plane with about 5 subdivisions and no modifiers. Voila. An excellent detailed terrain map with only a few verts.

    You can get more detail by sharpening the normal map a bit in the image editor and increasing the contrast in Blender's Texture>Color panel.

    Then the question became, how could I texture both the land and the water using just the normal map for generating the terrain? When I used the displacement modifier, I could just add another textured plane for the water, but that obviously doesn't work with normal maps.

    The solution was to use the original heightmaps as three kinds of stencils. I used one copy of the gray scale heightmap as a stencil to texture the mountains, one copy I modified as a stencil to texture the low lands, and then I converted the original heightmap in Photoshop (use GIMP as well) to create a pure black and white stencil with the water white and the land black. It's very easy to do and only takes about a minute to isolate the water with a color selection tool, fill with white and then invert the selection to isolate the land and fill with black.

    The result is a very good detailed terrain model that has only 4 verts and different textures for mountains, lowlands, and water. I'm not sure if this technique will work with very high heightmaps like Mt. St. Helens, but I'll experiment when I have the time.

    The order of the stencils is important and there are some settings for the stencils that are necessary; but all in all, it's easy.

    I downloaded eight 5 degree tiles of SRTM elevation data, stitched the eight heightmaps together in Photoshop, created the nomal map from the heightmap and created the terrain and textures in Blender using procedural textures filtered by the stencils. Render time is 4 seconds.

    One point to remember. I don't know if this applies to GIMP as I use Photoshop, but you have to convert the MicroDEM gray scale GeoTiff to RBG mode before using the filter to create the normal map. I know this just produces RBG layers of equal values, but it works. There is a way to create a more useful RBG mode from a gray scale but I have to look up the technique to refresh my memory. It's something like Green is twice as dark as Red and Blue is twice as dark as Green. this gives you more color data to work with.

    Anyway, if I can figure this out, anyone can. I am a low end of the scale Blender modeler who struggles with each project. It's just a matter of experimenting until the model eventually comes together.

    If there is any interest in creating very low poly terrain maps as described above, I may do another tutorial that steps through the process of creating the normal maps in GIMP and Photoshop as well as how to use the heightmaps as stencils to texture different parts of the terrain.

    Although I basically used only slightly modified heightmaps (different contrast settings), you can use the paint tools in GIMP/PS to paint on the heightmaps to more accurately texture specific areas of the terrain.

    I'll send you the blend file with the normal and heightmaps and/or the jpeg image of the render if you're interested in reverse engineering what I've done.

    BTW, I don't want to go into detail, but you shouldn't need to credit government data unless it has been modified by a third party with residual rights. I've supported the government for over 40 years now, true unclassified government products are not generally copyrighted or restricted. There are documents written by third parties on behalf of the government that are copyrighted and there are proprietary processes that require credits. But the USGS, NASA, National Geospatial Intelligence Agency (NGIA), NOAA, etc. data, images, and other products available to the public need no crediting.

    Written September 10, 2012
  • mramshaw profile picture
    mramshaw

    I cannot find a PM option here at BlendSwap, can you send me your Blend ?

    I can be reached here: mramshaw (no spam please) at Hotmail dot com

    [The brackets may not help much but Hotmail has an okay spam filter]

    Written September 10, 2012
  • mramshaw profile picture
    mramshaw

    Thank you for the great ideas, I will follow up by PM.

    Thanks also for the copyright clarification, I was (sort of) aware that NASA (or any U.S. data) did not need attribution, but the data was processed by the Consortium for Spatial Information (CGIAR-CSI) and it was their request I was following. It is merely a request on their part, I think they some nerve attaching residual rights to a free data source, but I wanted to follow protocal and stay in good standing here at BlendSwap. This is a very confusing area to me, I was merely playing safe.

    Written September 10, 2012