Georeferenced DEM in IMG format loads in above planet surface off kilter/rotated

Started by D.A. Bentley (SuddenPlanet), January 17, 2018, 07:43:08 PM

Previous topic - Next topic

D.A. Bentley (SuddenPlanet)

I'm trying to load in a set of IMG format DEM (the 2010 NED 1/3 arc stuff) but using the default settings with it Georeferenced it loaded in rotated and above the planet surface. 

Really what I want is to have all of these DEM pieces not georeferenced, but closer to the typical starting point in Terragen (north pole?) but all lined up where they fit.

Do I just have to start sliding the pieces around manually and figure out where they go like a puzzle, or is there any easier way using the lat long corners listed in the georeferenced data?


These are the DEMS I'm using:
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/USGS_NED_13_n37w114_IMG.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/USGS_NED_13_n37w113_IMG.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n37w112.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n36w113.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n36w114.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n36w112.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n37w115.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/USGS_NED_13_n38w114_IMG.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/USGS_NED_13_n38w113_IMG.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n36w115.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n38w112.zip
https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/IMG/n38w115.zip

Thanks for any help,

Derek

D.A. Bentley (SuddenPlanet)

I think I figured out how to do this.  Trying it now, but it looks like all my DEM pieces are exactly 87,809m x 11,432m so all I have to do is manually enter in the position for each piece using multiples of those numbers, and with the correct offset based on the 4x3 grid these make.  I have Parallels (lat) from N36 - N 38, and Meridians (Lon) W112 - W115, which gives me a 4 x 3 grid.

Am I on the right track?

D.A. Bentley (SuddenPlanet)

OK I think I got it.  :)  Now just need to search on how to blend the edges.

Dune

Looks like you replied on your own questions and got it solved.

There was also a reference a while ago about rotating the planet so the maps were more in the 0/0/0 region.

cyphyr

The simplest solution to this is to copy the coordinates from one of your DEM tiles in the img loader (I would suggest one of the central ones) and paste those values into the Planet note Lat Long at apex fields. You can then manually adjust to taste.
This will rotate the whole planet so your tiles are at the top (north pole).
Make sure you turn OFF Border Blending on each tile as well.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

ajcgi

Quote from: cyphyr on January 18, 2018, 04:40:04 AM
The simplest solution to this is to copy the coordinates from one of your DEM tiles in the img loader (I would suggest one of the central ones) and paste those values into the Planet note Lat Long at apex fields. You can then manually adjust to taste.
This will rotate the whole planet so your tiles are at the top (north pole).
Make sure you turn OFF Border Blending on each tile as well.

QFA. Much easier than offsetting. Sometimes when blending you'll get slight seams, especially where data overlaps. I use a large (LARGE) simple shape to blend one with the neighbour to smooth the overlap out, then kick out a new heightfield of everything merged at the North Pole. It's how my current project is set up actually.


D.A. Bentley (SuddenPlanet)

Thanks everyone!  I will try these techniques.

Ajcgi, can you tell me your process for "kick out a new heightfield of everything merged at the North Pole"?  Is there a way to essentially "bake out" a new merged heightfield from all of the individual heightfield terrains with the blending done?

ajcgi

Get a Heightfield Generate node, attach the last heightfield shader to the shader input of that. Position the node in such a way that it is in the centre of your heightfields and wide and deep enough to cover it all. The number of points is pixels. I normally take all of the fractal values down to zero so I get no extra noise added in for me.
Hit generate now, then right click the node and click save as. You get the option of .ter or .exr. I use exr and load it in to an image map displacement shader as it's quick.
This method works for me. Others may have newer or slicker methods.

D.A. Bentley (SuddenPlanet)

Quote from: ajcgi on January 18, 2018, 10:18:01 AM
Get a Heightfield Generate node, attach the last heightfield shader to the shader input of that. Position the node in such a way that it is in the centre of your heightfields and wide and deep enough to cover it all. The number of points is pixels. I normally take all of the fractal values down to zero so I get no extra noise added in for me.
Hit generate now, then right click the node and click save as. You get the option of .ter or .exr. I use exr and load it in to an image map displacement shader as it's quick.
This method works for me. Others may have newer or slicker methods.

Hey ajcgi,

I have finally got around to trying your technique to bake a bunch of DEM terrain into a single EXR map.  It works pretty slick, but it did take 7 hours to generate the node (I had 35 DEM files).  So although I ended up with only a 32k EXR for the map it should be sufficient for the high altitude renders I will be doing.  The 35 DEM chunks were USGS 1/3 Arc NED so my grid of 7x5 DEM calculated out to be a resolution of 75,684 x 54,060 so a square 32k map representing this is about half the resolution.  It will be interesting to see if World Machine can handle 32k terrains (I have 64GB of memory and have done 16k terrains just fine, but never have tried going bigger.) 

Thanks again!

-Derek