View Full Version : Photorealistic maps

06-28-2014, 05:52 AM
Hi , so I was testing and experimenting making a photorealistic map possibly...

My Idea is to proceed as follow but I am really open to any correction , sugestion or totally different workflow ...

Here is what I have in mind and I partially used in the Making of the Nirn map posted in the finished maps forum....

1 Get a map made by heightmap works , might it be out of a tool like worldmachine or a real world map edited in photoshop , doesn't matter now but I get a heightmap .

2 I use that to obtain alpha channel and use it to render down out of a white layer a overlayer mask and also an overlayer luminosity projection to create the bumps.

3 I use a gradient map filled with realistic tone colors from oceahn blue to white top of mountains to blend into the map and colorize it with geographic tones.

4 ....

here comes the part I was thinking most of ...

I wanted a gradientlayer made of textures but I haven't been able to find any tutorial on how to do it , so I procede to create use the mask to make pass throught wanted textures .

5 I prepare different layer large textures, like one for ocean , one for trees, one for ice , one for hills , one for plains , one for mountains , deserts , steppes etc ....

I use then the blending masking to make pass only certain parts of the texture according to the heightmap mask .

the issue is I do not know how to relate heightmap whiteness to height level or how to scale it down so to be sure to have a known level for whatershore etc .

The other issue is how according to knowing the levels to make a selective mask filtering so that passes for example only values from 140 to 195 rather than getting the whole range from 0 to 255 ...

8 shorelines, I am not sure how to make good realistic shorelines and not srange kind of detached from sea ones .... personally I would like the shores to show the transition from sea to land and so kind of seem visible underwater for a while with degreeing colors ....

9 Rivers, as you see the map has already lot of good possible river flows, is there a way to be able to automate the drawing of a fluvial system taking advantage of those flows?

here is just a small test done with a crap forest texture .... I think already gives a better result than befoure , but still it is not well filtered and issues 6 and 7 show up .

The image shows a distorted alaska .



06-28-2014, 12:13 PM
Something like Gamasutra: Andrey Mishkinis's Blog - Advanced Terrain Texture Splatting (http://www.gamasutra.com/blogs/AndreyMishkinis/20130716/196339/Advanced_Terrain_Texture_Splatting.php) or Max's Programming Blog» Blog Archive » Blending Terrain Textures (http://www.m4x0r.com/blog/2010/05/blending-terrain-textures/) seem relevant to me.

I'm not sure what toolset you're using to generate the images above, but the simplest solution to the shoreline problem is to use an image format that will yield signed pixels with more than 8 bits of precision (it looks like your heightmap is an 8-bit grayscale image). Virtual Terrain Project (http://vterrain.org/) has many suggestions for height field formats that meet those requirements.

If you're using an image editing tool like Photoshop or the GIMP, then the solution to number 6 is to find out what the original range was in your height maps in real units (say, meters) and then use the delta = (altmax - altmin) / (graymax - graymin + 1) linear relationship to determine how many real-world units are present in each gray value. A given gray value for an altitude would then be located at gray = graymin + (alt - altmin) / delta. As an example, if the original data spanned -2000 meters to +6194 meters for an 8-bit grayscale image (0 to 255 range), then each gray value would represent a range of (6194 - -2000) / (255 - 0 + 1) = 32.0078 meters. That means that the 0 altitude value in your grayscale image would be at 0 + (0 - -2000) / 32.0078 = 62.48 or (rounded) at 62 gray value. That gray value is just about 32 meters or 100 feet wide, though, so your exact costal position will be pretty wide for flat areas. If you were using a 16-bit image format like a 16-bit PNG, then the gray values would go from 0 to 65535 and the delta would be 0.125, meaning that there would be a lot less uncertainty in your image.

knocking out a selective gray range is trivial in a programming language and not much harder in Photoshop. The PS technique is to use Levels to clamp the output range from the low that you want to the height that you want (140) to the high that you want (195). Then use a magic wand or color range selection to select the dark area and bright area and then just cut them. That will give you a mask that has the original values and alpha knockout for the undesired areas. If you want black and white, just fill the undesired selection with black, invert the selection, and fill it with white.

Rivers are a much trickier task. I don't know a tool for an image editing program that will find rivers (unless you count Wilbur at software (http://www.ridgenet.net/~jslayton/software.html) as an image editing program). A basic algorithm is to find the flow direction for each pixel (for each pixel, find the neighbors that's the lowest) and then for each pixel, follow the flow path upstream (direction of steepest ascent) to determine a potential amount of flow for each pixel. Then take that flow, apply a logarithmic operator, and threshold the result to get "rivers".

06-28-2014, 05:49 PM
Those are very interesting infos , thanks , I will have to check if there is a script perhaps that can automatize the process of that texture splatter in photoshop rather than do all by hand ....

anyway reading ...

06-28-2014, 06:18 PM
I am having some problems with Wilbur program .

I have checked the tutorials online but they seem obtain better results than the ones I am .

I have this heightmap above and when I import and apply river flow , I get thousands of small wormlke presumed rivers everywhere , but they do not seem to follow the actual real flows ... why ?

are those just random placed?

06-28-2014, 07:53 PM
That sort of thing happens if your river basins aren't connected ( I mean actually connected, not just appear to be connected ). The Filters>>Fill>>Fill Basins tool will force your terrain to be filled. If your goal was to have endorheoric basins or if the downsampling of your terrain led to valleys getting cut off incorrectly, then basin filling might not give your desired results. Note also that the filling basins, adding noise equal to about 5% of the total altitude range, and then filling basins again will give good results if there are largish areas that get filled (otherwise, rivers will be straight lines).

A final observation is that you can do various processing to the terrain to get cleaner-looking rivers (blur, fill basins, noise, fill basins is a good operation), but only keep the river image and use that as a layer in Photoshop. A lot of folks seem to feel that the terrain that they use has to be the one that the river mask was computed from, but oftentimes, a little abstraction on the river system goes along way to looking more "realistic" than just using the raw heightfield to compute rivers.

06-28-2014, 08:37 PM
Thankyou , I will try that too...

For the texture splattering I am still investigating some tutorial on how to achieve the same results that seems to be described in ur links that are applied in game engines.

Those are the ones I found , but not sure if is the same thing more or less ?

[CG Textures] - (http://www.cgtextures.com/content.php?action=tutorial&name=blendmodes)

[CG Textures] - (http://www.cgtextures.com/content.php?action=tutorial&name=blendif)

[CG Textures] - (http://www.cgtextures.com/content.php?action=tutorial&name=blendifPSP)

Btw I have found a very interesting article on Ronald Bakley and his making of paleo maps , he seems to use mainly photoshop and real earth as source then paint in stuff ...

What Did the Continents Look Like Millions of Years Ago? - Geoff Manaugh & Nicola Twilley - The Atlantic (http://www.theatlantic.com/technology/archive/2013/09/what-did-the-continents-look-like-millions-of-years-ago/279892/)