Z-depth image?

Started by PuffnStuff, October 15, 2023, 09:11:13 PM

Previous topic - Next topic


Hi -

Can anyone tell me how to render/export a z-depth image for a complete still image? (TG4 Pro)


Kevin Kipper

Hi PuffnStuff,

Here's how to render/export a z-depth image from Terragen 4 Professional.

1. Select your renderer in the Render Node List.
2. Click the small green "+" button to the right of the "Render Layer" parameter and select "Create new Render layer".
3. Click the same button again and select "Go to Render layer ##"
4. On the Render Elements tab, check the "Surface depth" and "Cloud depth" checkboxes.  Then close the Render layer window.
5. On the Sequence / Output tab, check the "Extra output images" and set the path to save the images.  If you want the images to be saved to separate folders, check the "Create subfolders" checkbox.  You can also set "bits per channel" and "compression options" by clicking on the "EXR options" and "TIFF options" buttons if needed.
6. If you're rendering an image sequence, set the "Sequence first" and "Sequence last" parameters to the appropriate frame numbers you wish to render, then click the "Render Sequence" button.
7. If you're rendering a still image, click the "Render all to disk" button

Here's the links to the online documentation for rendering and using render layer elements:


Hi, Kevin -

Thanks for the response.

No luck, though - the surface depth image is completely black. Any ideas?


Kevin Kipper

Any chance you can send us your project file?  I'll be happy to take a look.

Kevin Kipper

Just a follow up, how are you viewing the image and determining it's completely black?  For example, if you load a z-depth EXR in Fusion and hover over the pixels you should see the z-depth values.  They'll be in meters.  The Fusion viewer has the ability to "normalize" the viewport, mapping the range of values to 0 - 1 which can show you more or less a greyscale representation of the z-depth.  


Hmmm... I was just viewing the .tif w/ Gimp.

Re uploading the project - sure. It's nothing but a bare DEM with a little snow thrown on it for contrast. Early days. I'll break out one terrain tile and check to see if I get the same results, then I'll zip it up and upload it. That way I don't have to send multiple DEM files. I imagine it's a configuration issue.


Hey, Kevin -

An update - sorry for the delay. I've don't need the z-depth stuff just yet, and I've been unable to resist working on the render in the meantime. You know how it goes. I'll be getting back to you soon - trying to work out a blend of orange and gray granite.


Hi, Kevin -

Just an update so you don't feel as if you wasted your time. I've had other things occupying my time lately.

I took a quick look at Fusion, but I really can't/don't want to drop several hundred dollars on software I only have one specific use for.

Tangentially, the new version of HDRShop seems to be inaccessible. I've tried a couple of times to get a key from the group at USC running the gig. No response through the licensing web page, nor by emailing them directly.

The end objective is to get depth data loaded into an OpenGL texture. I just wanted to verify that the data was there, and see what format it was in. I guess I'll skip the intermediate steps and build a static lib from the latest version of tifflib, then see if I can load the image directly and check out the results.

I'll keep you posted. And I'll post a clip file of the render and render layer nodes along with screenshots of the image and depth data as I'm seeing it. I'm probably wrong, but I'm a-thinkin' it'll come down to data loss when going to an 8-bit/channel format with the z data.