newbie zdepth as output as an pic,tiff,jpg

   4120   10   1
User Avatar
Member
5 posts
Joined: Dec. 2016
Offline
Hi im overwhelmed by all the options in houdini.
yet im comming from 3dsmax/vray, where you can save a pass as an element
in jpg,tiff or whatever. easy

I can see the zdepth in mplay, yet when i render the sequence it does some color correction
so the image looks like rendering an alpha pass pure white an black.

what is the most simple solution, for rendering that seperate zdepth pass
as an external file.?

tried settings in AE 32 bit different gammas but the zdepth info is lost just black and white

someone knows here a simple solution for rendering the zdepth pass as seen in mplay.

or know a script,plugin. easy passes render for houdini

thanks in advance
User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
Z-Depth is normalized to the range of values in the image when displayed in Mplay, when saved to disk this re-mapping is not applied. Saving to low bit depth formats such as jpg will not be able to contain the information in a zdepth image. The high dynamic range floating point format such as exr is required for writing depth channels, and 32 bit is recommended.

If required output as a separate file, the image plane tab of the render node has settings for ‘different file’ for each added pass.
User Avatar
Member
5 posts
Joined: Dec. 2016
Offline
yes thanks.

i have searched trough multiple documents and youtube videos.
There are two option in rendering mantra node a Pz button which i click on
but apperently does nothing, or does it embed the depth channel in the image file as it was
saved by exr.?
Yet i do save also an seperate extra image file as plane Pz and as an exr.
i set the render resolution to 1280 720 in the render globals and also
custom resolution on the mantra node 1280*720.
the color/diffuse“beauty” pass renders fine in 1280*720 as tiff.
yet still 2 problems.

the zdepth pass is a different story it renders out sometimes as 830*487 sometimes 540*480 although i set
the resolution everwhere in the “globals/and on mantra node” that i can find to 1280*720.
and also the exr in after effects does nothing. when i set my AE project/footage to 32bits
and add 3d channel extract too zdepth, or use exposure i just get a blank frame smaller than the “beauty pass”

i also noticed that the mantra settings on the node are also not set when saved from the main menu to houdini file.
so you have too set them each time when opening the houdini file

could be the apprentice limitations?

i cant understand why mentalray, vray or others can save out elements as zdepth file as tiff, png or even jpg.
and zdepth works even with jpg element, less data on disk
is it because the color corrections done in max are in the globals not per node.?
Edited by aliasalias - June 11, 2019 05:37:50
User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
aliasalias
but apperently does nothing, or does it embed the depth channel in the image file as it was
saved by exr.?

Yes, all image planes are normally embedded in the beauty pass exr.

aliasalias
i set the render resolution to 1280 720 in the render globals and also
custom resolution on the mantra node 1280*720.
the color/diffuse“beauty” pass renders fine in 1280*720 as tiff.

I'm not aware of any such setting as ‘render globals.’ Resolution is normally configured on the render camera. The render node can override the resolution, ignoring the camera setting.

aliasalias
the zdepth pass is a different story it renders out sometimes as 830*487 sometimes 540*480 although i set
the resolution everwhere in the “globals/and on mantra node” that i can find to 1280*720.

This is highly implausible, as only one raster size is possible in a single render. Post a scene file maybe?

aliasalias
and also the exr in after effects does nothing. when i set my AE project/footage to 32bits
and add 3d channel extract too zdepth, or use exposure i just get a blank frame smaller than the “beauty pass”

After Effects is woefully under-equipped for handling CG render elements. You may need to precomp them for AE to handle them. This is a reason why Nuke is used almost exclusively for compositing of rendered elements.

aliasalias
i also noticed that the mantra settings on the node are also not set when saved from the main menu to houdini file.
so you have too set them each time when opening the houdini file

This is unlikely, are you sure you are saving your file where you think you are?

aliasalias
i cant understand why mentalray, vray or others can save out elements as zdepth file as tiff, png or even jpg.

I'm not familiar with other renderers saving depth in low bit depth formats. Depth pass renders out of VRay are much the same as mantra. Perhaps when saving to an inappropriate format, they store the information in log-space or 1/x based on the clipping planes, such as in the style of an ogl frame z-buffer.

If you'd like you can attempt your own encoding in a shader to mimic the output of another renderer, such as 1/z or e^z or use the perspective transformation:

export float @depth = 0.0;
float z = -Pz;
float w = -z;
float near = 0.1 // near plane
float far = 1000.0 // far plane
z *= -far/(far-near);
z += -far*near/(far-near);
z /= w;
@depth = z;
User Avatar
Member
8513 posts
Joined: July 2007
Offline
aliasalias
the zdepth pass is a different story it renders out sometimes as 830*487 sometimes 540*480 although i set
the resolution everwhere in the “globals/and on mantra node” that i can find to 1280*720.
you are most probably seeing the resolution of the exr data window not the image
in case AE can't handle data window being different from the image resolution you may need to add vm_setexrdatawindow render property to Mantra and uncheck it
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8513 posts
Joined: July 2007
Offline
aliasalias
i cant understand why mentalray, vray or others can save out elements as zdepth file as tiff, png or even jpg.
and zdepth works even with jpg element, less data on disk
cause in order to do that they are normalizing the z depth within certain depth range, therefore making it unuseable for any real DOF calculation as you will lose the real depth values, however for quick purely artistic DOF it may suffice as it may replace custom gradient mask, but it usually turns into a nightmare if you want to make shots consistent as artists tend to normalize zdepth value within min/max depth per shot which is arbitrary and completely unnecessary if you can simply save real depth values in .exr or any floating point format
Edited by tamte - June 11, 2019 19:14:56
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
5 posts
Joined: Dec. 2016
Offline
thank you all for your answheres.

so basicly AE is pretty useless in terms of houdini output comping, you will need nuke for that “”but i bought AE, aint switching“
i was indeed looking for a quick purely ”artistic" DOF it may suffice as it may replace custom gradient mask
it might be not the correct way, but i get zdepth dof pretty looking good from vray zdepth in AE alltough it might not be
the appropiate way for doing things, yet im not working on major blockbusters, more as hobby/low entry work
for camera setting im still searching in the interface, i indeed change the resolution on mantra node.
yet the mantra node right click enable overrides falls back when i close the scene and reopen.
i tried to save the mantra node to the gallery but that didnt work either.

here are the screenshots
below is the zdepth from a 3dsmax/vray scene output as an jpg, which is low on your hd space, instead of exr which produces massive files
Edited by aliasalias - June 12, 2019 09:08:27

Attachments:
mantra1.jpg (123.6 KB)
mantra2.jpg (142.1 KB)
matra3.jpg (104.7 KB)
seq_VRayZDepth0080.jpg (142.4 KB)

User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
aliasalias
yet the mantra node right click enable overrides falls back when i close the scene and reopen.

That is the purpose for the overrides–temporary settings that don't save to the file. To change settings properly, it must be changed on a node.

The V-Ray image doesn't look correct, normally black is near and white is far.
https://docs.chaosgroup.com/display/VRAY4MAYA/Z-depth [docs.chaosgroup.com]
I looked at the vray documentation and it appears the depth pass takes range arguments to fit the values to the 0-1 range, and optionally clamp. It is still expected to be output to a 32bit floating point image though, as there is simply not enough information possible in an 8bit image for depth to be of much use. You can do the same range fitting of the depth plane by modifying your shader to output an image plane with Pz remapped to your desired range. Since this is atypical for how depth is normally used it is not a built-in feature.
User Avatar
Member
5 posts
Joined: Dec. 2016
Offline
ok thanks, will look into modifying a shader too output an image plane with pz.

the image from vray is because i inverted the z-depth since it works better with AE
which can also invert it.
Edited by aliasalias - June 13, 2019 05:26:03

Attachments:
vray.jpg (22.3 KB)

User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
What's with that VRay interface? It looks very different from the Maya one. It even has spelling mistakes.
User Avatar
Member
5 posts
Joined: Dec. 2016
Offline
its from 3dsmax and vray
but correct vray for maya even has options that 3dsmax hasn't.
and maybe vica versa
  • Quick Links