G-Buffer - Depth map

joel ruiz c

Active member
Hi there, long time no see, I had to create a new account because I coundn't remember my old password and I don't have access to my old email e.e

Anyway, I'm trying to find out how to create a depth map that I can use in photoshop. I read the help, but it doesn't help much lol.. I saved the rendered image to the exr file format, but the alpha channel is all white.. how do I access the z-buffer map? Is it possible?

Thanks!
 
Hi and Welcome back?
When I open a render with enabled G-Buffer/color depth.32bit/Z-Buffer: Normalized in Affinity Photo I instantly got this:
z-depth_map.jpeg

What I still don´t understand is why it´s not anti aliased.

Cheers
Frank
 
Hello Frank.. I'm sure you don't remember me I participated here for only a few months about 2 years ago (username Joel Ruiz). Anyway, that's exactly what I want, I guess Photoshop can't read that (I thought I would find it in the alpha channel but it's not there) .. I'll check Affinity, thanks for the heads up. I'm nut sure about the aliasing tho.
 
I saved the rendered image to the exr file format, but the alpha channel is all white.. how do I access the z-buffer map? Is it possible?
Just a stab in the dark but as a 32bit image in Photoshop you might need to adjust the exposure slider in lower left corner to see the depth maps greyscale. Additionally you may need to use an exr plugin that supports layered files to access you Z depth layer as Photoshops default does not handle Exr layered files (it flattens them on opening).
 
If you don't want to deal with the annoying exr format you can always use the fog object in Cheetah.
- disable all materials (objects will then render with default grey)
- add fog object (black, linear, adjust density)
- disable all lights and use one ambient light instead
- increase render exposure till the front objects are white
screenshot.png

In Photoshop you can invert the image if you need black front and white distance.
 
Just a stab in the dark but as a 32bit image in Photoshop you might need to adjust the exposure slider in lower left corner to see the depth maps greyscale. Additionally you may need to use an exr plugin that supports layered files to access you Z depth layer as Photoshops default does not handle Exr layered files (it flattens them on opening).

Too bad Ps can't handle the layers.. :( thanks for the info, I'll check that too..
 
If you don't want to deal with the annoying exr format you can always use the fog object in Cheetah.
- disable all materials (objects will then render with default grey)
- add fog object (black, linear, adjust density)
- disable all lights and use one ambient light instead
- increase render exposure till the front objects are white
View attachment 34667
In Photoshop you can invert the image if you need black front and white distance.

That looks perfect! I will definitively try that!
 
I only tested Photoshop 2018 und 2019, and both can't handle the alpha maps anymore, not only from Cheetah but from another app, too. Doesn't matter what you try and what you save.

As I did use at least once a depth map from Cheetah a while ago. Back then it worked correctly.
 
Obviously they introduced a new bug since then (there was a function for cutting out objects that doesn't work as good as it did for years).
 
I only tested Photoshop 2018 und 2019, and both can't handle the alpha maps anymore, not only from Cheetah but from another app, too. Doesn't matter what you try and what you save.
All you need to do is grab and install the free ProEXR plugin from from fnord and it will give you access to the the layered channels Cheetah outputs in the layered EXR files:
https://www.cheetah3d.com/forum/index.php?threads/13433/#post-117300

If you have a PC you can also use the newer actively developed free EXR-IO Photoshop plugin from here as well:
https://www.exr-io.com/

A further note about Z depth from Chettah. There are two options: Standard and Normalized. Standard may appear all white until you adjust the exposure slider. The data is still in there through. Normalized will show the actual greyscale data as is (not quite sure what it does but I guess it "normalizes" the values in some way).

Would love if someone could explain the different use cases as to when one one would use Standard over Normalized.
 
Thank you, Pegot. I actually only tested it for joel because I knew it had worked. Actually Standard and Normalized appear white without plugin. It didn't matter that I changed exposure.

While it's good to know that a plugin exists if the need arises, it's really something they should be able to handle. I do already use another plugin for something in PS that used to work and doesn't anymore since a few versions back. And it's annoying. I'd change gladly to affinity if I could, but sadly I can't (I need the whole package for several things).
 
Standard and Normalized appear white without plugin. It didn't matter that I changed exposure.
Of course. That is because in order to access the Z depth channel at all, you need one of the plug-ins capable of opening a layered EXR file.

Maybe Martin could fine tune the G-Buffer render settings with an option to output a single, separate one layer EXR file for each info channel (Z-Buffer, Layer ID, Object ID, and Material ID).

But since ProEXR is free this really shouldn't be an issue for anyone using Photoshop.
 
Maybe Martin could fine tune the G-Buffer render settings with an option to output a single, separate one layer EXR file for each info channel (Z-Buffer, Layer ID, Object ID, and Material ID).

But since ProEXR is free this really shouldn't be an issue for anyone using Photoshop.

Other 3D apps can connect the z-buffer to the diffuse channel or something like that, so you could make a render of only the z-buffer. That would be awesome to work in Ps or AE, add fake DOF, fog, or for what I wanted it this time.. use the facebook photo 3D thingy lol.. maybe this could be implemented?
 
I only remember that it worked. As Pegot clearly knows better than me, it seems I had ProEXR installed back then (I have to admit, the name sounds vaguely familiar).

Don't get me wrong. Some plugs are simple great and can really enhance your work flow drastically. But I hate to be dependent on them (though I am), because I have a whole bunch of great plugs on my ancient pc that don't work anymore in newer versions of photoshop.

The other gripe I have with plugs is to find the right one. There is not always a friendly pegot to explain what you need. Sometimes you lose simple a day or more to find that great plug that sits somewhere out there in the vastness of the net where (almost) no man has been before, waiting to solve just your specific problem. And it's not exaggerated with the lost work day.

And third there is that: Sometimes you'd have to pay for something that photoshop should be able to do in the first place and can't even be sure that it really will still work a few years from now.

Photoshop still is the industry standard. But looking at affinity and quite a few other solutions out there they really should be worried and deliver.

And affinity designer has some functions I'd like to see in illustrator (which got a bit more love from adobe than ps anyway).


Concerning render output:
It really should be possible to have access to that layer separately in Cheetah. So I really like the way Modo handles this. You just specify the desired output, for example final color, alpha or depth (another one I use is surface id, where every object is rendered with a single basic color. Great to mask something in PS afterwards). Then you just hit render. In the render window you have access to the different pics and can save them out in different formats as single files (the option to have it all in a layered psd would be even better, though, even if 32 bit for something like a depth map is of course much better). So whatever (combination of) software you use, you have access to the different outputs with no fuss.

Maybe this way the depth map could be aliased, too.
 
Back
Top