TER MAPPING

Started by rolothomasee, July 31, 2008, 12:56:17 AM

Previous topic - Next topic

rolothomasee

I have been studying Ben's work with multiple terrains and function masking to try and understand how it all works.
http://forums.planetside.co.uk/index.php?topic=2036.msg19940#msg19940
http://forums.planetside.co.uk/index.php?topic=1657.0

I thought I understood the T2 coodinate system (left hand rule, Y positive in the "up" direction, default position of the planet object is y=minus planet radius, x=0, z=0). But looking at some of Ben's examples, I don't understand how the TERs are getting mapped to the planet surface. It appears that they are georegistered. Is this so or does it just seem so?

Not clear on how "flatten first" plays into the TER mapping to the planet sphere.

There was some discussion of converting the TER DEM to UTM before inporting into T2 as a height field. I understand UTM but am confused about how to properly geo locate the height field in the planet sphere. Is this infact possible?

Would like to be able to properly geolocate DEM data on planet surface and navigate the camera via lat/long/alt to specific locations over the TER.

Can someone straighten me out on the subject of how TERs get mapped to the planet, "flatten first", and geo referencing TERs derived from real DEM data?


rolothomasee

#1
OK, I think I have figured this out in case anyone cares and now that I have, I seem to recall reading a post somewhere that delt with this same topic.

It appears that you place the terrain in the zx plane using the position coordinates.

If you select "flatten first" in the displacement tab, the terrain remains in the zx plane and is extended vertically downward to intersect the planet surface. This causes the terrain to appear as a plateau when viewed from far out.

If you uncheck "flatten first" in the displacement tab, the terrain is projected downward on to the planet surface.

Now I understand why someone said that you could only cover one hemisphere of a planet with terrain height fields. If you position the terrain greater than one radius from the origin, it extends past the edge of the planet (looking down from the positive y direction) and so does not interscet the surface.

If all of this is correct, it should be possible to geo locate a terrain set within the upper hemisphere of the planet. You would need to translate the actuall lat/long to the northern hemisphere, then project that translated lat/long onto the zx plane to get the terrain position corrdinates. You should be able to use the same translation to position the camera over a specific point on the surface using real world lat/long. You would need to properly orient the camera using pitch roll and yaw. You could keep track of all of this in a spreadsheet and us it to compute an animation path.

Seth

i don't know if it can help you but this article might interest you...
http://en.tgblog.de/?p=40

rolothomasee

Seth,

Great article! It was a big help in undertanding what is going on with terrain mapping to the planet surface. As soon as I finish studying Ben's function mask technique I think I will play around with the camera projection technique described in the article.

My ultimate goal is to be able to do some cool animations with TG. While we are waiting for a final release (or at least faster render times) I figured I would invest some time in understanding some of the various modeling techniques I have been reading about in the formums.

Thanks so much for the link.

Seth

cool i hope to see some result soon ^^

bigben

Had a few changes keeping me away from here... and a few more changes to survive yet...  but back to the topic.

You've already grasped most of it from the other posts/tuorials, but here's a bit more.. some of it repeating stuff you know.

Firstly, my terrain sets do not attempt to geolocate terrains on the globe, as this is not practical with the way TG maps TER files onto the globe. Lat/Long maps to X/Z, Altitdue maps to Y displacement (not displacement along planet normal).  Because of this you can only place TER files in the "northern" hemisphere and  the terrain will suffer from shear as you move away from the top of the planet (0,0,0).

The strategy to my terrain sets is basically to centre the area of interest at 0,0,0 in TG using high res terrains, and then add lower resolution terrains to fill in the space around these.  The drop in resolution isn't an issue because it is not intended for the camera to be close to these areas.  There are still limitations to this, but it is possible to cover a fair portion of the hemisphere, to the point where the atmosphere should cover up any problems near the dege of the visible globe.

http://forums.planetside.co.uk/index.php?topic=2549.0

As for the masking... well it's pretty basic when you look at it. Each terrain gets a soft edged mask applied to it (values from 0 to 1 ), and the masks are added/subtracted such that the sum of the masks at every point = 1. 

Seth


rcallicotte

So this is Disney World.  Can we live here?