Z-Buffer, Surface Depth

Started by Ben3D, January 07, 2015, 10:31:00 pm

Previous topic - Next topic

Ben3D

Hello,
I have purchased the pro+anim version of Terragen a few days ago and am making some tests to see what I can do with it. I tried to get a z-buffer or depth pass but the file that I got as a result is very dark and only has 18 shades of grey. I tried to reduce the Far Clipping distance to get a lower depth but the resulting image is the same. Anyone can tell me why? (File attached)[attachmini=1]

Thanks,
Benoit

Oshyan

Your output looks correct to me. What are you using to view the EXR and count colors?

- Oshyan

Ben3D

I am using irfanview and Photoshop. I got the count in irfanview. I looked at the picture in Photoshop thinking that irfanview may be limited in exr support but it looks the same in Photoshop. I thought that the depth would be 256 greys. The Atmosphere direct looks more like what I would have expected. [attachmini=1] May be I'll use it instead of the other.

Oshyan

I don't know what your intended usage is, but Atmo Direct is definitely not going to give you the same thing (it has some similarities, but some important differences from pure depth). All Render Elements output in 16 bit *per channel* floating point EXR format in Terragen. This is a high dynamic range format and so it does not display "normally" on your *low dynamic range* monitor. You're actually getting a lot *more* than 256 levels of grey and your monitor is unable to accurately display the ranges involved. Irfanview is almost certainly showing things incorrectly because its handling of high dynamic range is very minimal, while Photoshop is probably showing right (within the limitations of your monitor), depending on the version you have.

If you can give more specifics about your intended use is then we can probably help you a bit more. It may be that you already have what you want, it just doesn't look like you expect it to. But that doesn't mean it won't work like you want it to, again depending on specific usage.

- Oshyan

TheBadger

My question (because I haven't needed to use it yet) is, am I meant to treat an element .exr just as one treats a HDRI? Is that its exact purpose in compositing the elements? I mean each element is an HDRI and I can work the layers (even on a single still) in basically the same way as single EXR render?
For example, should I think about the elements in terms of tonemapping like i *can* a single render saved as an exr, OR is it really only for compositing in AE or Nuke or the like?

There was a tut posted that people said was good. I thanked the poster for it in advance of seeing it because I knew the topic interested me, But I never got to it :-[ OP may like to see it too, but It may have been taken down.

Anyway
QuoteThis is a high dynamic range format and so it does not display "normally" on your *low dynamic range* monitor.

Right, so I can tonemap it, yes? And thats what its for, right? even for just a still image post worked in PS?

I think that is mostly correct, please let me know either way.
It has been eaten.

Oshyan

Badger, this is only tangentially related to the initial question, but might be of interest to the original poster anyway so I'll leave it here (but please consider starting a *new* topic unless your question is directly related to the initial question).

Generally speaking you would not want to "tonemap" a render element, although you might adjust a specific one to get a particular effect on the final output. For example let's say you have your Atmosphere element and you want a redder atmosphere, you could redden the atmosphere. Or if you wanted more indirect light, you could increase brightness of the indirect light element. This of course only works properly after you have reassembled the elements in the correct way to reproduce the look of the normal output. The render elements just give you more power to adjust individual scene elements like clouds and atmosphere *separately* from the ground, say. That kind of thing is nearly impossible with just a single, non-layered image (i.e. with no render "elements").

Using a literal "tonemapping" tool (in the modern software feature sense of that word) on a single render element is unlikely to produce good results. If you must use tonemapping, do it on the final composited high dynamic range image. If *all* you want to do is tonemapping, don't bother with render elements, just output the final render to EXR (the Save As dialog on the normal render window will do this), and then tonemap your EXR in whatever your favorite tonemapping app is.

So short answer: render elements are for compositing and very specific adjustments to individual scene elements. They are not generally for normal color correction, tonemapping, etc, etc.

- Oshyan

TheBadger

That was a good answer, thanks. Sorry, but I thought it was directly related. 
It has been eaten.

Ben3D

Badger: no problem, I found your question interesting  :)

Oshyan: thanks for the replies. I am currently just experimenting to see what are my possibilities. I will use Terragen with Blender to create a pilot of a web animated series and am trying different options to see how I will render things for workflow, speed and quality. I may render outside scenes with the blender objects fully in Terragen or render the Terragen background and then go in Blender to add the objects and atmosphere/fog overlay. The Z-Buffer would be usefull if I use Blender to render the objects separately. I will continue my experiments. Thanks!

Oshyan

Blender should support EXR and high dynamic range compositing. So it should get useful info out of TG's native render element output. The only thing you might have to do is, if Blender doesn't have a built-in way to handle z-buffers and shift the distances, then you may have to adjust the tonal range in Blender before using it for e.g. Depth of Field or something.

- Oshyan

Ben3D