Planetside Software Forums

General => Terragen Discussion => Topic started by: archonforest on May 30, 2014, 08:53:17 AM

Title: IMG data error
Post by: archonforest on May 30, 2014, 08:53:17 AM
I try to open an *.img file with TG. It gives a "Parse error at line 1: not well-formed(invalid token)" error.
I got the file from USGS. Does anyone knows what is this error means or there is any other way to import this file into TG?
Title: Re: IMG data error
Post by: Matt on May 30, 2014, 04:42:59 PM
How are you loading it? With the Geog Image Map Shader?

Matt
Title: Re: IMG data error
Post by: archonforest on May 31, 2014, 07:34:22 AM
Not like that...
...but I cannot locate that shader u mentioning. I can see the Image Map Shader under the Color Shader and under the Displacement Shader.... ???
Title: Re: IMG data error
Post by: kalwalt on May 31, 2014, 10:54:42 AM
QuoteNot like that...
...but I cannot locate that shader u mentioning. I can see the Image Map Shader under the Color Shader and under the Displacement Shader.... ???
Which version of TG are you using? in the last v.3.1 is located under shader/displacement shader...
Title: Re: IMG data error
Post by: archonforest on May 31, 2014, 10:57:28 AM
v 3.0 free....
that cannot take this file?
Title: Re: IMG data error
Post by: bobbystahr on June 01, 2014, 01:27:07 PM
Quote from: archonforest on May 31, 2014, 07:34:22 AM
Not like that...
...but I cannot locate that shader u mentioning. I can see the Image Map Shader under the Color Shader and under the Displacement Shader.... ???

Try here
Title: Re: IMG data error
Post by: archonforest on June 01, 2014, 01:30:42 PM
Thx but I do not have that menu point :o
Maybe 'coz I use TG3 free???
Title: Re: IMG data error
Post by: bobbystahr on June 01, 2014, 01:59:02 PM
Quote from: archonforest on June 01, 2014, 01:30:42 PM
Thx but I do not have that menu point :o
Maybe 'coz I use TG3 free???

you should as that's what this screen grab is out of...also too poor for the full version
Title: Re: IMG data error
Post by: archonforest on June 01, 2014, 02:21:03 PM
i will download TG3 free again...maybe I miss an update :D
Title: Re: IMG data error
Post by: archonforest on June 01, 2014, 02:53:34 PM
Okay I downloaded again and it is okay now. Can someone tell me what to do after u loaded the IMG file? Need to apply some displacement? I cannot really see it...
Title: Re: IMG data error
Post by: bobbystahr on June 01, 2014, 03:08:11 PM
Quote from: archonforest on June 01, 2014, 02:53:34 PM
Okay I downloaded again and it is okay now. Can someone tell me what to do after u loaded the IMG file? Need to apply some displacement? I cannot really see it...

sorry, have never used a .img file so have none to load or I'd work it out
Title: Re: IMG data error
Post by: jo on June 01, 2014, 05:03:34 PM
Hi,

My guess is that the .IMG file is a DEM/terrain file. Where did you get it from? If it is a DEM then you want to load it with the Geog heightfield load node, which should do the right thing with it regarding displacement. You can add a Geog heightfield load node by choosing "Heightfield (load DEM)" from the "Add Terrain" button in the Terrain node list.

Regards,

Jo
Title: Re: IMG data error
Post by: Oshyan on June 01, 2014, 09:36:33 PM
It may have Georeferencing enabled by default, which could put it very far away from the camera right away after it loads. Edit the Geog Heightfield Load node and disable Auto-Georeference From File as a test. If you see the terrain at that point, you can determine if georeferencing is useful for you and if so, you will need to find where the terrain is placed when it is enabled. You can try starting with the "Center on object or shader" function on the pop-up menu when you right-click in the 3D Preview.

- Oshyan
Title: Re: IMG data error
Post by: archonforest on June 02, 2014, 09:58:16 AM
Quote from: jo on June 01, 2014, 05:03:34 PM
Hi,

My guess is that the .IMG file is a DEM/terrain file. Where did you get it from? If it is a DEM then you want to load it with the Geog heightfield load node, which should do the right thing with it regarding displacement. You can add a Geog heightfield load node by choosing "Heightfield (load DEM)" from the "Add Terrain" button in the Terrain node list.

Regards,

Jo

Thx for the usefull data Jo and Oshyan :D
It worked. I used the Heightfield load(DEM) function and TG imported the data. Otherwise I got the dta from the USGS site! Major breakhtrough :D :D
Title: Re: IMG data error
Post by: Altbier on July 12, 2014, 07:47:38 PM
Is there a DEM load size limitation to the free version?  I am running 3.1 (32-bit) and have only been able to successfully load 2 different 1/9arc .img files from USGS.  Both have been 105MB or less.  All other files that I have tried, .img, .adf, and .flt, are 1/3arc and larger than 129MB cause Terragen to immediately exit to the desktop.  Any ideas?
Title: Re: IMG data error
Post by: bigben on July 12, 2014, 10:05:45 PM
Not sure if there is a DEM size/count limit in the free version, but I've loaded several hundred Mb of geotiff. Using images and DEMs does eat into your available RAM though, which could be an issue with 32bit. I'd check there first. What coordinates are you looking at?
Title: Re: IMG data error
Post by: bobbystahr on July 13, 2014, 08:44:14 AM
My guess would be a limitation of the 32 bit O/S
Title: Re: IMG data error
Post by: Altbier on July 14, 2014, 07:49:35 PM
N39W123 and N39W124

Should add that the above are 1/3 arc scale.  A file I have been successfully able to load is N38.5W123 1/9 arc scale, althought there are some artifacts displayed after converting it. I tried replacing novalue elevation points with 0m elevation, but I only succeeding in flattening the entire heightfield.  I need to reread the applicable posts on the forums and try that again.
Title: Re: IMG data error
Post by: Oshyan on July 16, 2014, 02:54:20 AM
There is no hard limit that I'm aware of, but using the 32 bit version you only have access to 2GB of RAM unless you're using the /3GB switch, in which case you have 3. It's very possible you're having memory issues. If any intentional limit were being encountered you would see an explanatory dialog box or error, it wouldn't simply exit, so that suggests something is going wrong.


One thing to be aware of is that image (or terrain, or other data) size *on disk* isn't necessarily the same as size *in memory*. A good example of this is the difference between an uncompressed TIFF image and a PNG of the same image. The PNG will be losslessly compressed and so has the exact same actual image data in it, but it may be half the size of the uncompressed TIFF, or even smaller. Both will take up the same amount of memory though because the image data must be decompressed when decoded and loaded into memory. So a 100MB file on disk could take up 200MB in memory, or even more, depending.

- Oshyan
Title: Re: IMG data error
Post by: bigben on July 17, 2014, 06:05:29 PM
Quote from: Altbier on July 14, 2014, 07:49:35 PM
N39W123 and N39W124

Should add that the above are 1/3 arc scale.  A file I have been successfully able to load is N38.5W123 1/9 arc scale, althought there are some artifacts displayed after converting it. I tried replacing novalue elevation points with 0m elevation, but I only succeeding in flattening the entire heightfield.  I need to reread the applicable posts on the forums and try that again.

I'm uploading a demo set of multiple resolution geotiffs around Clear Lake that shouldn't take up too much RAM. The area of 10m resolution is a bit limited using this technique qhich is why I asked where you were looking at. It makes exploring a wide area in TG a bit limited, but it also makes it possible to render large scenes without taking up too much RAM.

http://files.bigben.id.au/terragen/terrains/us/clear_lake/ (http://files.bigben.id.au/terragen/terrains/us/clear_lake/)
Title: Re: IMG data error
Post by: bobbystahr on July 17, 2014, 07:12:04 PM
Quote

I'm uploading a demo set of multiple resolution geotiffs around Clear Lake that shouldn't take up too much RAM. The area of 10m resolution is a bit limited using this technique qhich is why I asked where you were looking at. It makes exploring a wide area in TG a bit limited, but it also makes it possible to render large scenes without taking up too much RAM.

http://files.bigben.id.au/terragen/terrains/us/clear_lake/ (http://files.bigben.id.au/terragen/terrains/us/clear_lake/)

Clear Lake in which country,state or province
Title: Re: IMG data error
Post by: bigben on July 17, 2014, 07:39:20 PM
Quote from: bobbystahr on July 17, 2014, 07:12:04 PM
[quote

I'm uploading a demo set of multiple resolution geotiffs around Clear Lake that shouldn't take up too much RAM. The area of 10m resolution is a bit limited using this technique qhich is why I asked where you were looking at. It makes exploring a wide area in TG a bit limited, but it also makes it possible to render large scenes without taking up too much RAM.

http://files.bigben.id.au/terragen/terrains/us/clear_lake/ (http://files.bigben.id.au/terragen/terrains/us/clear_lake/)

Clear Lake in which country,state or province
[/quote]

Pass, I was navigating by numbers. The one near "N38.5W123", far west coast
Title: Re: IMG data error
Post by: bobbystahr on July 17, 2014, 07:56:57 PM
Quote from: bigben on July 17, 2014, 07:39:20 PM
Quote from: bobbystahr on July 17, 2014, 07:12:04 PM
[quote

I'm uploading a demo set of multiple resolution geotiffs around Clear Lake that shouldn't take up too much RAM. The area of 10m resolution is a bit limited using this technique qhich is why I asked where you were looking at. It makes exploring a wide area in TG a bit limited, but it also makes it possible to render large scenes without taking up too much RAM.

http://files.bigben.id.au/terragen/terrains/us/clear_lake/ (http://files.bigben.id.au/terragen/terrains/us/clear_lake/)

Clear Lake in which country,state or province

Pass, I was navigating by numbers. The one near "N38.5W123", far west coast
[/quote]

gotcha,,,not the one up here in Manitoba then...wrong numbers...everything here is N of 49
Title: Re: IMG data error
Post by: bobbystahr on July 17, 2014, 08:04:15 PM
looks like Clear Lake, CA

https://www.google.com/maps/place/Clearlake,+CA/@39.0983519,-122.9052332,13z/data=!4m2!3m1!1s0x80838b954060c195:0xc16aeac6f3b5e9b6
Title: Re: IMG data error
Post by: Altbier on July 18, 2014, 04:30:52 PM
Thanks everyone for your assistance!  Looks like the USGS DEM files for my area of interest are too big and detailed for my 32-bit machine.  The 10m GeoTiff file which BigBen posted loads just fine, so I'll will work with that format for now.  Later when I am able to upgrade to a much more capable PC, I will go back to trying the USGS data.

The ultimate goal here is to render horizon images from multiple viewpoints ranging from about 38.1068 N, 122.5645 W to 38.9731 N, 123.1152 W.  The images will be used to print a realistic backdrop for a model railroad layout, which our non-profit club is building based on the Northwestern Pacific Railroad through Sonoma County, California, USA.  To view an article demonstrating how someone else has already done this for his home model railroad, search for Model Railroad Hobbyist e-zine.

BigBen, where do you source GeoTiffs?  Last night I downloaded several from the J-SpaceSystems ASTER GDEM site. I plan to work with those a little bit this weekend.
Title: Re: IMG data error
Post by: Oshyan on July 18, 2014, 04:56:55 PM
Sonoma County, that's where I grew up. Cool! One of my earliest Terragen 2 renders, when it was still in early alpha, was of Mt. St. Helena (not to be confused with my later, and much more well-known, St. *Helens* images/animation :D ).


- Oshyan
Title: Re: IMG data error
Post by: Altbier on July 18, 2014, 08:12:28 PM
Oshyan, small world!  My family has lived on or around Mt. St. Helena for 7 generations.  Cobb Mountain, which is located within the GeoTiff which BigBen posted, is named after one of my great-great-great grandfathers.

As we progress on the layout backdrop project, I will try to keep you posted.  If this works out for us, we should end up with about 250' of Giclee printed wallpaper, that is 1 continuous image which ultimately wraps around on itself.  Unfortunately all of our views will be to the west, away from Mt. St. Helena.
Title: Re: IMG data error
Post by: bigben on July 18, 2014, 10:03:27 PM
Quote from: Altbier on July 18, 2014, 04:30:52 PM
BigBen, where do you source GeoTiffs?  Last night I downloaded several from the J-SpaceSystems ASTER GDEM site. I plan to work with those a little bit this weekend.

I use Global Mapper which accesses a number of databases directly online, including the USGS 10m data.  It only downloads enough data to display at the current screen resolution and it makes doing stuff like this really easy. To make these multi-resolution sets I just start out at a location zoomed in, export a geotiff at 10m and then just step through zooming out and exporting at screen resolution. The lower res files are then only 1600px wide at most, making them nice and small.
Title: Re: IMG data error
Post by: Oshyan on July 19, 2014, 05:16:01 PM
Very cool! Have you seen Ulco Glimmerveen's giant museum wall project? Sounds similarly ambitious to what you're working on:
http://www.planetside.co.uk/forums/index.php/topic,16733.0.html

I'd love to see yours when it's done. It's just a bit more accessible than Ulco's for me. ;)

- Oshyan

Quote from: Altbier on July 18, 2014, 08:12:28 PM
Oshyan, small world!  My family has lived on or around Mt. St. Helena for 7 generations.  Cobb Mountain, which is located within the GeoTiff which BigBen posted, is named after one of my great-great-great grandfathers.

As we progress on the layout backdrop project, I will try to keep you posted.  If this works out for us, we should end up with about 250' of Giclee printed wallpaper, that is 1 continuous image which ultimately wraps around on itself.  Unfortunately all of our views will be to the west, away from Mt. St. Helena.
Title: Re: IMG data error
Post by: bigben on July 20, 2014, 08:22:46 AM
Quote from: Altbier on July 18, 2014, 04:30:52 PM
The ultimate goal here is to render horizon images from multiple viewpoints ranging from about 38.1068 N, 122.5645 W to 38.9731 N, 123.1152 W. 

Uploading some files that should get you going.  http://files.bigben.id.au/terragen/terrains/us/sonoma/ (http://files.bigben.id.au/terragen/terrains/us/sonoma/)
7 x 10m geotiffs along the route. 3 x 40m and 1 x 200m geotiffs for distant terrain.  The 10m tiffs also have a 20m topo map for reference. There's a basic TGD in the directory as well that loads everything(using just under 1Gb of RAM). You could load this and then just delete what you don't need.
Title: Re: IMG data error
Post by: bobbystahr on July 20, 2014, 08:58:25 AM
Quote from: bigben on July 20, 2014, 08:22:46 AM
Quote from: Altbier on July 18, 2014, 04:30:52 PM
The ultimate goal here is to render horizon images from multiple viewpoints ranging from about 38.1068 N, 122.5645 W to 38.9731 N, 123.1152 W. 

Uploading some files that should get you going.  http://files.bigben.id.au/terragen/terrains/us/sonoma/ (http://files.bigben.id.au/terragen/terrains/us/sonoma/)
7 x 10m geotiffs along the route. 3 x 40m and 1 x 200m geotiffs for distant terrain.  The 10m tiffs also have a 20m topo map for reference. There's a basic TGD in the directory as well that loads everything(using just under 1Gb of RAM). You could load this and then just delete what you don't need.

see no .tgd in the sonoma dir Ben...just tifs 0-5..no topo map either and 5 gives a decode error...the rest are fine
Title: Re: IMG data error
Post by: bigben on July 20, 2014, 09:48:29 AM
"Uploading" ;) All finished now
Title: Re: IMG data error
Post by: bobbystahr on July 20, 2014, 09:59:59 AM
Quote from: bigben on July 20, 2014, 09:48:29 AM
"Uploading" ;) All finished now
I'm fast on the draw with my first coffee in me, hee hee hee