Geog heightfield load makes black image

Started by russe166, August 18, 2014, 06:23:56 AM

Previous topic - Next topic

russe166

Hi!

I loaded the IMG from
http://wms.lroc.asu.edu/lroc/view_rdr/NAC_DTM_ARISTARCHU2
into the 'Geog heightfield load' and connected it with the 'Heightfield input' from the Heightfield shader.

When I render the image the colours are missing.

I don't now why?

[attachimg=2][attachimg=1]

Oshyan

Solution is here:
http://www.planetside.co.uk/forums/index.php/topic,18763.msg182622.html#msg182622

Best to only post one thread in the future. We look at all areas of the forums, so whether you post here or in Support you'll get a response. :)

- Oshyan

russe166

Hi Oshyan!

I thought this is the solution for the 'Geog image map shader', but in this topic I have the same problem with the 'Geog heightfield load' shader.

Do I have to convert the .img file to RGB?

bigben

TIFF version works OK and is a smaller download. Will have a look at the IMG later after it downloads. 

Oshyan

Oh I see, I misunderstood. I think you understand that the Geog Heightfield Shader does not load or provide color, yes? So you mean that it removes color that was provided by other shaders? It looks like there is some severe data interpretation issue going on with height ranges or something. It's possible the IMG is formatted in a way Terragen does not expect, or that no georeferencing data is provided with it, meaning Terragen has to guess the height range or something. We use an open source GIS data loading library called GDAL, so our data interpretation and format support limitations are largely governed by that library's limitations.

Perhaps Ben will come up with some more info.

- Oshyan

bigben

Heading off to work, but I'm not sure why the colour got removed based on what I saw with the geotiff.  It looks like the no data value is the centre of the moon so if you're not replacing it with a smaller value there will be some extreme displacement going on at the edge, but I don't get any problems like this with the geotiff. The files are lat/long projection but the data in it looks like it's sinusoidal projection so there will always be gaps of no data around the edges. 

I'd suggest overlaying these files with a wider area of lower resolution data (here's one I prepared earlier: http://files.bigben.id.au/terragen/terrains/moon/geotiff/). QGIS is free. 

If I have a choice of data formats I usually go with geotiff as it plays nicer with more programs

bigben

#6
IMG loads OK for me, but it's better if you set the no data value. Don't forget to also change the radius/position of the planet

russe166

#7
Thanks for your reply!

I tried the other .img files. Some have worked and others have not.  So I stick to the GeoTif but the landscape looks like a Minecraft level and is not smooth.

[attachimg=1]


Quote from: bigben on August 20, 2014, 09:23:31 AM
Don't forget to also change the radius/position of the planet

Do I have to change the radius of the Planet when I use a IMG file?

Dune


Oshyan

That looks like 8 bit data. Is that the GeoTIFF downloaded from the site you linked to?

- Oshyan

russe166

Hi!

I
Quote from: Dune on August 21, 2014, 11:16:30 AM
Did you check smooth interpolation?
Yes, I checked it but it does not make a big difference.

Quote from: Oshyan on August 21, 2014, 12:39:15 PM
That looks like 8 bit data. Is that the GeoTIFF downloaded from the site you linked to?

It is from the site I linked to. I cut out a part and saved it as .jpg so the size for the upload is not so big. I have the
same problem with the orginal .tif

Oshyan

That's the actual original file you got from the site just loaded into TG? I'm not seeing those kinds of artifacts here. Did you change any other settings?

- Oshyan

bigben

I'm guessing you wimped out and downloaded the pyramidal TIFF because it's smaller. ;) Unfortunately pyramidal TIFF uses JPEG compression so it's only 8 bit. The other TIFF file is 32bit and will be smoother.

Changing the radius of the planet is necessary when you're dealing with data that uses degrees for lat/long. 1 degree on the surface of the earth is a much bigger distance than 1 degree on the moon. You'd be flattening the terrain by a factor around 3.5  Some projections though, use meters for lat/long which doesn't cause this, although you would be flattening the curvature of the planet relative to the terrain elevation in that situation.

russe166

Thanks to you all! You solved it  :)

I used the PRY.tif file and not the big one. So now it is working ...

Oshyan

Ugh, why would someone make a TIFF with JPG data in it, much less for GIS data!? *sigh*

Hehe, anyway, glad you got it working.

- Oshyan