Georeferenced heightfield/image misaligned

Started by djwhitehart, November 13, 2016, 05:57:13 AM

Previous topic - Next topic

djwhitehart

Hi everyone,

Despite going over my search results with a fine-toothed comb, I haven't yet found a working solution to this problem. Using bigben's fantastic unfinished Earth tgd as a starting point, I'm working on a TG representation of a fictional planet. However, I've run into trouble getting the surface maps to align with the heightfield (a .ter exported from Wilbur). No matter what I try, the maps all seem to be offset to the south of where they should be - curiously, more offset closer to the North Pole than further south. This misalignment isn't affected by using regular image map shaders instead of the current georeferenced image map shaders, nor does using a regular heightfield load in place of the original georeferenced one make any difference.

I've run out of ideas to try out, so I've zipped my TGD (plus required files) and added it to my Dropbox here so that those of you who are more experienced with TG can hopefully find something I've missed so far. Thank you in advance for your help.

Oshyan

None of the formats you are working with have any georeferencing data in them, so this is not an issue with georeferencing per se. That probably explains why it doesn't matter whether you use the geog image map shader or normal image map shader. Because the positioning is not determined by georeferencing in the first place.

If I am understanding the files in your download correctly, you have a terrain (.ter), along with several image maps, all of which are in the same shape (aspect ratio) and projection, and are intended to be overlayed on top of each other and wrap completely around the planet. My suggestion then would be to actually use Image Map Shaders for *all* of your images and use *spherical projection*. Do not use Geog Image Map Shader as it does not have a Spherical option. Basing your work on BigBen's project is probably not the way to go because his project involved using high resolution *partial globe* images, not intended to wrap around the whole planet. The only way to do that is with Spherical Projection.

So, first you need to get your .ter into an image format so you can load it in an Image Map Shader. Right-click your Heightfield Load in Terragen and choose Save As, then give it a file name with .exr on the end. You can then load the exr into an image map shader, and you'll want to enable displacement and then set the multiplier to *the altitude of the highest point in your terrain* (in meters). Load all your other images into image map shaders all connected to the planet as well, similar to BigBen's setup in how they're all configured, but using Image Map Shaders instead (in fact you can still start with his basic setup, just replace the image loading nodes with standard image map shaders). Set them all to Spherical projection and then, this step is critical, you need to set the position of all of them to be *the same as your Planet object*. Basically just go to the Planet object and copy the Position coordinates and paste them into the Position parameters for each of the Image Map Shaders.

Once you've done that it should all be wrapping properly around your entire planet. And if I understood your files correctly, that was your desired result. If not perhaps you can explain further.

In the future I suggest using the "Export gathered project" feature from the File menu if you want to share project files. This will properly reconfigure your project so that file paths will work on other computers. As it was your TGD just didn't not work, none of the file dependencies could be found without manually relinking them all.

- Oshyan

djwhitehart

Thank you, Oshyan. I didn't know about the "gather project" option, so I'll be sure to use that in the future. As for the lack of georeferencing data, I was actually manually georeferencing the maps through the shaders, setting their extents so that they wrapped all the way around the planet. Nevertheless, I might as well stick with the regular image map shaders you recommended.

As it turns out, the misalignment I mentioned wasn't a Terragen issue at all; the heightfield simply wasn't aligned with the image maps, even in Photoshop. I don't know how that happened, since I composited both the heightfield and color map in QGIS using the same projection settings. However, after some tedious adjusting in PS, I've gotten the heightmap to line up reasonably well with the image maps. I may tweak it a bit more, but overall, I'm much more satisfied with it now.

Thanks again for your help!

Oshyan

Ah, glad to hear you were able to identify the issue (and that it wasn't TG :D ).

- Oshyan

Matt

Quote from: Oshyan on November 17, 2016, 03:46:28 PM
set the multiplier to *the altitude of the highest point in your terrain* (in meters)

This part is not needed. When a heightfield is exported to EXR, the values it contains are 1:1 elevation values in metres. So when you read it into an image map shader, the displacement multiplier should be 1.

Matt
Just because milk is white doesn't mean that clouds are made of milk.