Can't even see the GeoTiff terrain

Started by yesmine, April 09, 2013, 02:12:22 AM

Previous topic - Next topic


I'm new to trying Terragen 2, and I admit up front that it's frustrating me. I'm trying to import a terrain from a USGS GeoTiff, and I've worked with GeoTiff's and DEM's a good bit even with Terragen classic and several other 3D programs. Also, I made a point of looking thru a couple of tutorials on how to load the GeoTiff into T2, centering the 'planet' object so the terrain should appear in the viewer. No problem...I did that as instructed. And, I've noted a warning in one tutorial that you may end up with the camera inside the terrain, so you may need to "move the camera around" to be able to see the terrain appear.

I get nothing...just a entirely black area in the viewer. I've tried moving the view around using the widget in the upper right corner, but it just moves the black area around and shows the white lines I presume are the heightfield. I don't see any sign of the imported terrain. Even if I move upward and think I should be a mile above it by then, still nothing. If I click the 'Terrain' button, it just shows the generic flat greyish plane with black splotched areas around the white lines. Switching the camera to Top View doesn't even give a birds-eye view of anything. The tutorial(s) I've seen make it sound like once you center the lat/long of the planet on the terrain you should see it...but I guess that isn't all there is. If I rotate the view around...nothing. Is there no way to just load a terrain and have T2 place the default camera in a position that lets you see the terrain right in front of you like most 3D programs do?

In case an opinion might be seen, I'm experienced with Maya, VUE, Photoshop, and a few other 3D programs I've used to work with DEM's, and I grasp the 'node' way of doing things in T2. But I have to say that T2 has been a real disappointment in the several hours I've been trying to do something with it. Does it have to be this tricky just to see a terrain? I find myself thinking if it's this confusing just to load a terrain file...what next? My impression is that the view thru the viewport should immediately let you see the terrain..not have to go searching around for it. I'm very willing to take the time to learn a program, but there really should be better tutorials that don't just say "move the camera around" since you're not going to have any idea where you are. If anyone can point me to them I would appreciate it.


First, you should be aware that GeoTIFF support is currently fairly basic and somewhat limited. There are certainly some GeoTIFF files that TG might have problems loading natively. With TG Classic, GeoTIFF was never natively supported, you had to convert to TER with 3rd party software. Unless you need the georeferencing, it might be advisable just to convert to TER (which TG2 still loads and uses as a native terrain format for heightfields), if you already have the tools and workflow from TG Classic use.

That being said, what you're experiencing is not usual, if it were the tutorials would no doubt have a lot more caveats and warnings. The first thing I would suggest is uncheck "Auto georeference from file" as well as "Georeference" in the Heightfield Load node settings (if either are enabled, that is). That should at least get the terrain to attempt to load at the default 0,0 position, though the scaling may be off then. If that works, then you can proceed to try adjusting the georeferencing manually, or finding where on the planet the georeferencing is putting it. If it doesn't work, it suggests either there is something wrong with your GeoTIFF, or it has format/feature elements in it that TG doesn't currently support.

Posting a screenshot or rendered image of what you see currently would also be very helpful in troubleshooting.

- Oshyan



I'm sorry to hear of your difficulties. It sounds like you've seen Ryan Archer's tutorial here:

It's a good tutorial and is accurate although it does perhaps assume a little familiarity with the basics of TG2 such as moving the camera.

TG2 is not like other 3D apps in that the basic "set" is an entire planet, and this can lead to some wrinkles which might not be apparent with other apps. We generally suggest that you work around the origin of the planet though. Ryan's tutorial mentions this when he talks about changing the "Lat long at apex" parameter for the Planet object. The reason for doing this is that accuracy falls off as you move away from the origin. This generally isn't too much of an issue until you get well away from the origin though. Changing the apex of the planet ensures your area of interest has the highest accuracy.

There is a way to quickly view an element of scene such as heightfield. If you click the third button from the left under the 3D Preview (green circular arrow icon) you will see a menu item called "Centre on object or shader". Go to this and you can choose your heightfield from the submenu. You can also do this with the 3D Preview context menu (right click in the 3D Preview). This will centre the camera on the heightfield.

There are some things to look out for though. If you have not changed the "Lat long at apex" parameter for the Planet then the heightfield will be at its georeferenced location on the planet. First off, depending on where the heightfield is the camera may be inside the planet looking toward the surface where the heightfield is located. This could be what's causing everything to look black. A good way to tell if this is happening is that the "under terrain" indicator will be showing in the top left of the 3D Preview, under the compass. The indicator is a red version of the Terrain icon.

If you zoom out far enough you will eventually start to see the planet render again as you come out from "inside" it. If you can see the heightfield it might not be rendering properly anyway. This is why it's a good idea to change the planet apex.

So let's say you change the planet apex. The heightfield will now be sited at the origin and should be rendering ok in the preview. To see it you can again use the menu to centre the camera on it. This should show the heightfield pretty well, although you may be partly under its surface. You should see the "under terrain" indicator if this is the case, and you may also see broken up looking triangles in the preview. To move out from under the terrain you can zoom out. Rolling the mousewheel toward you is the easiest way to do this. In a future version the camera centreing behaviour is improved and this is less of an issue.

Here's my crash course to working with GeoTIFFs once they're loaded:

1) Copy one of the georeferenced corners from the Heightfield load node to the "Lat long at apex" parameter of the Planet node. You can use the buttons with the clipboard icons to copy and paste all the coordinates of a parameter at once.
2) Use the "Centre on object or shader" menu to centre on the heightfield
3) Zoom in or out if needed to see the heightfield

I will look into improving the documentation on using georeferenced heightfields.