Realistic scenes in the terrain viewer (with tutorial)

Boyd

Administrator
Staff member
Site Administrator
Jul 31, 2004
9,981
3,116
Ben's Branch, Stephen Creek
Have been wanting to do this for awhile, finally getting around to it. :)

It's possible to create some fairly realistic scenes using aerial imagery in the terrain viewer, but it takes some understanding of how light reveals three-dimensional objects to get the best results. See the next post for a quick tutorial. But here are some examples for your entertainment. They'll look best if you set your browser to fullscreen mode now. The terrain viewer won't update the image if you change window size after it's open; you need to reload the page. Also, it uses a lot of memory, avoid having multiple terrain viewer tabs/windows open at the same time.

We'll start in the Pines at Batso

https://boydsmaps.com/terra/#39.657...983/0/24/0/986/549/0/46.5/3/3d/ortho/0/-1/z16

batsto.png



But the terrain viewer is more interesting when there's more variety, so we'll head up to Arney's Mount

https://boydsmaps.com/terra/#40.007...62/0/177/0/1014/676/338/43/3/3d/ortho/0/1/z17

arney.png



The hills around Ampersand Lake in New York look mysterious at dusk

https://boydsmaps.com/terra/#44.209...1/238/-1/845/789/845/52.75/2/3d/ortho/0/1/z15

dusk.png



And here's autumn in the Mount Holyoke Range in Massachussets

https://boydsmaps.com/terra/#42.305...9/0/266/0/704/704/704/29.5/2/3d/ortho/0/1/z16

autumn.png



Finally, a winter scene in Montgomery Center, Vermont

https://boydsmaps.com/terra/#44.877...0/131/0/0/690/1014/31.75/2.5/3d/ortho/0/1/z16

winter.png
 
Last edited:

Boyd

Administrator
Staff member
Site Administrator
Jul 31, 2004
9,981
3,116
Ben's Branch, Stephen Creek
Now the brief tutorial. Of course, you can open the viewer with one click and just use the defaults. But tweaking the settings produces more realistic results. I really just chose this location at random, but it shows the basic principles. We'll start with the NAIP imagery, since that's what the terrain viewer uses. Go to this link and click the blue cube in the toolbar to show the terrain viewer preferences and set them as shown. These are pretty large mountains, so I have dialed the exaggeration down to 1.5x. Choosing 6 mile coverage because we want to see several mountains at the same time.

https://boydsmaps.com/#14.00/42.144006/-74.178762/naip2023/0.00/0.00

1.png



When you click the Open button, you'll get the default view with the default lighting and we need to change some of these settings

2.png



For starters, we need to determine the direction of the light in the aerial imagery. To do that, switch to 2d view and set the Sun Control like this. That will give you flat lighting from directly overhead. Now observe the shadows which show the the sun must have been in the Southeast when this image was captured. If that doesn't seem obvious, switch back to 3d mode and view the mountains from different angles, you should be able to tell where the shadows are and the sun will be on the opposite side. In some scenes, there will be cast shadows from buildings, etc. which might make it very obvious where the sun is.


3.png



But we'll set the controls like this for now, setting the directional sliders to put the light source halfway towards East and halfway towards South. You can run the height slider slowly back and forth to lighten/darken the shadows. But compare this to the image with flat lighting above. The shadows are basically in the same place, but darker which indicates our light source is in (more or less) the same place as the sun in the photograph.

4.png



Finally, switch back to 3d view, rotate the map to different positions and play around with the sliders some more until you like the results. Find one of the lightest spots on the map and run the brightness slider back and forth to find a setting that preserves the details without "blowing them out". The height slider also affects this, so experiment with that.

Here's where I ended up setting everything myself, but you may want to experiment further. Try zooming in and changing the tilt of the terrain to create the most realistic effect.

https://boydsmaps.com/terra/#42.144.../0/1042/1000/1014/59.75/1.5/3d/ortho/0/-2/z15

5.png



But the key in all of this is to roughly match the terrain viewer lighting to the real position of the sun in the aerials. If they don't match, the 3d rendering conflicts with the real shadows and makes the results less realistic.

Enjoy!
 
Last edited:

Boyd

Administrator
Staff member
Site Administrator
Jul 31, 2004
9,981
3,116
Ben's Branch, Stephen Creek
Figured I should wind this up with a Pines Barrens location instead of a distant mountain. Let's start at Hampton Gate

https://boydsmaps.com/#16.00/39.801439/-74.677717/legacy24k/0.00/0.00

And again, check the quality of the NAIP imagery because it's not great in some places. But this looks pretty good to me.

https://boydsmaps.com/#16.00/39.801439/-74.677717/naip2023/0.00/0.00

This time we'll go directly to the 2d view, just to be different. Click the blue cube, set it like this and click the open button.

open.png


That will open in the Terrain Viewer (sometimes, it mysteriously hangs with the spinning cube... reloading the page should fix that). But before we look at the Terrain Viewer, let's go back to the original NAIP image. If you drag the map West to this farm, the direction of the sun is pretty clear.

https://boydsmaps.com/#18.00/39.805354/-74.700408/naip2023/0.00/0.00

shadows.png



I am putting the sun due East, based on that large barn(?). If the sun had been in the Southeast, I don't think we'd see equal shadows on the two sides. But you could experiment with moving the slider a bit to the South and see what you think. In the terrain viewer, set the Sun slider to 1000 East with the North/South slider at 0.

The sand pit in the Northwest corner looks to be the brightest part of the map, so we'll use that as a guide to setting Height and Brightness. The obvious place to start is the Brightness, but I usually feel like the whole scene gets too dark when I lower it as much as needed. So, I suggest starting with the Height slider. As the "sun" gets lower, it brings out more surface detail but also doesn't appear as bright. It's just a matter of playing with those two sliders and finding the best trade-off. This was my first try


2d_settings.png


But things can look very different in 3d view, so we'll switch to 3d and zoom in on that sand pit. I just repeated the same process of playing with the Height and Brightness sliders again and came up with these settings. But - for example - if you don't care about detail in the sand pit, you might make it brighter to show more detail in the forest.

https://boydsmaps.com/terra/#39.801...59/0/36/0/1000/451/0/40.75/3/3d/ortho/0/0/z16


pit.png




Here's my final animated version

https://boydsmaps.com/terra/#39.801...138/0/49/0/1014/451/0/41.5/3/3d/ortho/0/1/z16

vx3.png



This reminds me of something I've thought about for awhile. Just seems "natural" to increase the vertical exaggeration in the pines, since everything looks so flat otherwise. But... what if we didn't exaggerate, what would that look like? Just move the slider all the way to the left to see for yourself. Doesn't reveal the terrain very well. But we can improve it quite a bit with the controls. Since everything is pretty flat, the idea is to get the "sun" down very low. We'll also move it as far as possible to the East. This will make it very dim, so we'll have to set the Brightness to 100%. Now all the settings are maxxed out except the Height, so that's the only slider left to play with. Run it left and right and observe the effect. This was where I put it.

vx1.png


Here's my final version with no vertical exaggeration.

https://boydsmaps.com/terra/#39.801...-314/0/36/0/2000/239/0/100/1/3d/ortho/0/0/z16

And here's a drone-view, circling those hills right at sunrise. And this is the correct proportion for everything, with no exaggeration.

Lots of different options - the controls are there for you to experiment!

https://boydsmaps.com/terra/#39.801.../463/0/36/0/2000/239/0/100/1/3d/ortho/0/1/z16
 
Last edited:
  • Like
Reactions: 66C10

bobpbx

Piney
Staff member
Oct 25, 2002
14,792
5,003
Pines; Bamber area
Interesting. That final version on the sand pit is interesting. I'm sure some will use it. As to me, on your second link, when I switch over to 2007, you can see the watercourse better, which is my aim.
 

Boyd

Administrator
Staff member
Site Administrator
Jul 31, 2004
9,981
3,116
Ben's Branch, Stephen Creek
I make no claims of any practical use for this technique whatsoever. It's just something fun to do (for me, at least). It uses the USGS/NAIP aerials from the National Map which are only 8 foot (level 16) resolution and were also taken during the summer, so tree canopy hides details. Really, it's much more fun when you get up into the mountains but I thought a more familiar location might interest someone.

If your interests are more technical than artistic, the color and grayscale shaders are probably more useful and these techniques won't make sense, my tutorial is about matching virtual lighting on a 3d model to the real lighting on a photograph. :)

BTW, eventually I hope to offer a choice of different aerials but don't have anything else appropriate yet. I hope to continue the current historical series of mid-atlantic historical aerials (1980, 1990 and 2000) with 2010 aerials and will use the nj 2012 for those, which are twice the resolution and taken during the winter.
 
Last edited:
  • Like
Reactions: bobpbx

Boyd

Administrator
Staff member
Site Administrator
Jul 31, 2004
9,981
3,116
Ben's Branch, Stephen Creek
For a change, you could switch to 10-color mode and 2d view. This link is higher resolution and uses extreme lighting angles to bring out detail instead of vertical exaggeration. (Looks kind of like a big foot to me :D )

https://boydsmaps.com/terra/#39.801...0/0/0/0/1380/211/0/79.5/1/2d/shader10/0/0/z17

Screen Shot 2025-02-14 at 10.11.20 PM.png


You can play with the vertical exaggeration slider and observe what happens as you increase it to around 3. You will want to raise the height of the sun and adjust the brightness to compensate. It's a somewhat different effect, more harsh when you zoom in.

https://boydsmaps.com/terra/#39.801...0/0/0/0/1380/577/0/36.5/3/2d/shader10/0/0/z17
 
Top