Planetside Software Forums

General => Terragen Discussion => Topic started by: squirreltape on August 01, 2014, 10:06:55 AM

Title: Terragen 3.1 geog htfld load etc
Post by: squirreltape on August 01, 2014, 10:06:55 AM
Hello folks. Does anyone know of any documentation / tuts for the (new to 3.1) geog heightfield load and the geog image shader nodes? I've not done much in v3.0 (it's been a while since my last project in v2) so I was very excited to hear about the 3.1 update.
A couple of years ago I spent a lot of time rendering the moon using a global heightfield derived from the latest LRO WAC and kindly offered up online. This was a godsend as I'd been fruitlessly lost trying to use the DEM data to output my own g2h map (had a hard time with 3DEM so when the LROC Team released the heightfield as a .tif on their site I snapped it up like most everyone else) but now that v3.1 reads most DEM formats I'd like to get stuck-in playing with the DAWN Vesta datasets with a mind to deforming a suitable planet to Vesta's shape and texturing it accordingly.
I had a quick look-see in v3.1 but clearly was doing something wrong (at first I couldn't even connect a geog node to anything in the v3.1 default scene but did eventually see the Vesta g2h map at coords 0,0 in the preview render once I unconnected the default nodes) hence my request for a pointer re any documentation.
This is a wonderful site about some wonderful software so thanks in advance for any directions.
Mark
Title: Re: Terragen 3.1 geog htfld load etc
Post by: bobbystahr on August 01, 2014, 03:35:47 PM
Check BigBen's threads...they're all about thiss
Title: Re: Terragen 3.1 geog htfld load etc
Post by: squirreltape on August 01, 2014, 04:19:00 PM
Thanks for the pointer... I'll have another look at those posts.
Title: Re: Terragen 3.1 geog htfld load etc
Post by: Oshyan on August 01, 2014, 06:13:16 PM
Official documentation is here:
http://planetside.co.uk/wiki/index.php?title=Geog_Heightfield_Load
http://planetside.co.uk/wiki/index.php?title=Geog_Image_Map_Shader

I would suggest using the Add Terrain button on the Terrain layout at the top of the Node List on the left, especially for heightfields, because they actually require *two* nodes in Terragen currently, and creating those nodes in the node network directly does not always create all the ones you need. Once you're familiar with how the heightfield nodes all work you can setup the node structures yourself more easily, but there's really not much reason not to use the Add Terrain button anyway, in my opinion. The specific option in this case would be Heightfield (load DEM).

- Oshyan
Title: Re: Terragen 3.1 geog htfld load etc
Post by: bigben on August 01, 2014, 10:52:15 PM
Hmmm.. time to update my moon model ;)  (Just found a small glitch in the texture which needs fixing)  I haven't looked at the LROC tiffs but the file size seems a bit odd.  I went with the original IMG file and converted it to 32bit geotiff (LZW compressed) and ended up with 240mb.    This is the same resolution as my current elevation map but this looks like the original data.  Must read my own posts to see if I mentioned where I got the data from then.  I'm also donwloading a 64k texture map from Celestia Motherlode.

Finally got around to reading the docs  ::)  One very important thing with the geog image map shader is that it uses Plan Y projection so for a full planet texture map I'd use the default shader (a bit simpler than the image map shader as you don't have to specify the position of the centre of the sphere)

The attached image was rendered in situ on the hemisphere opposite TG's origin (no texture map)
Title: Re: Terragen 3.1 geog htfld load etc
Post by: Oshyan on August 02, 2014, 12:25:53 AM
TG should be able to read the IMG format natively. Ben, you're used to old TG2 that had less DEM capability, so you're still in the conversion mindset. ;) I could be wrong of course, but I do recall loading up the IMG format natively for TG3 pre-release demo images: http://terragen3.com/focus-on-features-enhanced-dem-support/

- Oshyan
Title: Re: Terragen 3.1 geog htfld load etc
Post by: bigben on August 02, 2014, 01:38:56 AM
I've loaded a few formats to try them out and it works quite well for single data files but more often than not I end up doing some reprojection of the data because the data is not in a suitable projection for loading multiple images into TG. 1. converting to geographic projection and 2.  a central longitude of 0°.  In this case the data goes from 0 to 360° rather than -180 to 180° which TG doesn't like (and makes things awkward with Global Mapper as well). So at the end of the day I convert to geotiff mainly because it's a bit more flexible for creating derivative images in Photoshop for masks as well.

Only real "problem" I've had has been with greyscale/single channel geotiffs with the geog image map shader.  I have to convert them to RGB to get them to show up, but that adds to the RAM usage which becomes significant when you're trying to use high res imagery for surface masking.  Investigating a workaround for that.
Title: Re: Terragen 3.1 geog htfld load etc
Post by: squirreltape on August 02, 2014, 03:25:22 AM
Thankyou Oshyan and Bigben for those pointers, now I get some freetime today to have a play. In haste I looked in the wrong sections of the wiki and I'll see if my lunar image map is still the current res (refamiliarize myself with the node network and see what I get with the .img workflow rather than my .jpg of the .tif from LROC) before diving headlong into Vesta, tee hee. Plan Y eh?, gotcha.
You've all been very helpful, thanks again guys.
Mark
Title: Re: Terragen 3.1 geog htfld load etc
Post by: bigben on August 02, 2014, 06:01:43 AM
If you have trouble with the IMG my new moon model is going in here: http://files.bigben.id.au/terragen/terrains/moon/geotiff/ (http://files.bigben.id.au/terragen/terrains/moon/geotiff/). Geotiff elevation map is there now
Title: Re: Terragen 3.1 geog htfld load etc
Post by: squirreltape on August 04, 2014, 04:52:37 AM
Thanks eversomuch Bigben... free time has been allocated for some playing ;)
Title: Re: Terragen 3.1 geog htfld load etc
Post by: Matt on August 10, 2014, 01:56:41 AM
Quote from: bigben on August 01, 2014, 10:52:15 PM
(a bit simpler than the image map shader as you don't have to specify the position of the centre of the sphere)

It's not that you don't have to, it just doesn't allow you to do it in the shader. If your sphere/planet isn't at 0,0,0 then you would still need to specify the position, or transform the texture coordinates. But you could use a transform shader to do this. Or use the "translate textures" option on the planet, if that's what you're rendering.

Matt