Fog COP and Z-Depth images issues

   7314   6   3
User Avatar
Member
581 posts
Joined: July 2005
Offline
Hi all
I'm trying to make a fog effect using the Fog COP.
It seems that it need a z-depth image in the input two to compute the fog, more concretely the doc says that a point or depth plane is requiered.
For the depth plane i'm trying to render a z-depth image, in the doc i've read that using the argument -z or -Z with mantra it renders a z-image, but i get a white image when i look-up in the z channel of the rendered image.
The scene is well because i can render it normally in rgba channels.
Anibody knows what could be problem???, i need a z-image for the Fog COP?? or the terms point and z planes are refered to any other thing???
Thanks
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
252 posts
Joined: July 2005
Offline
I am not sure, but the Z image that the COP wants may be just a simple white to black image.

The Z depth image that mantra writes out for shadow mapping, etc. is a different format that holds a lot more information.

Try just rendering a depth image tif file that varies from white to black with one color meaning close, the other meaning far and use that in the COP.

I have had to do this in other compositors, but I am not sure what COPs does or needs since I have never used it.

-Craig
User Avatar
Member
581 posts
Joined: July 2005
Offline
So i can make a Z-image from houdini in tif format???
I think i can use the -Z or -z parameters and in the output format use tiff, sgi or similar???
The problem is that the Fog COP suposes that the input image have Z channel, so if i have the z info in other file i need to copy this info to the z-channel in the original image to get an image with z-channel, no?
I can do that with halo??
With the Z-images generated in houdini .pic format, the problem is that when i see it in mplay, the z-channels appears only white(all the pixels have the value 1), have anibody suffered the same problem???
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
252 posts
Joined: July 2005
Offline
If the COP says specifically Z format, then it probably will take what Houdini writes out in Zdepth format. Perhaps you need to name it .rat to support the floating point type of Z file… Not sure.

Anyway, I just jumped in because I had some experience with this with Shake which doesn't support Z format renders from Renderman or Houdini, but rather a render from a standard Depth shader which is different (and just uses color to show depth rather than keep it in a higher precision floating point format like Houdini).

Anyway, Houdini's COPs may be different, so I don't want to be any more misleading if I am wrong.

You can view Z format images in mplay with a button somewhere that toggles mplay to view the full range or something like that…

Good luck,
Craig
User Avatar
Member
710 posts
Joined: July 2005
Online
Hey lisux, there is a video tutorial on creating fog in the compositor here…

http://www.vislab.usyd.edu.au/sidefx/houdini_video/by_topic/compositing/index.html [vislab.usyd.edu.au]

Basically, don't bother with z-depth. Instead go to the deep rasters page of mantra and use P. This will embed the floating point depth data in your .pic file which the Fog COP will use. That sounds about right at least, been a while since I tried it.
User Avatar
Member
581 posts
Joined: July 2005
Offline
Responding craig you can generate z-buffer image from renderman in alias depth format that can be loaded into shake, now you can composite with Z-Buffer.
Thanks to dajuice, now i can use the fog cop, but can't still generate z-buffers, if i generate a plane with Pz it shows the same results if that i generate a z-image, all white. Generating z-images can be useful because i can save it in a tif image an use later in other application, for compositing.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Just to be clear, Houdini successfully generates both Depth and P layers, and they work fine. I've used it many times. When you say “all white”, I suspect that you're talking about the default method that mplay(a display program designed to work on an 8 bit moniter) shows floating point images(P and Depth for instance - which contains more bit depth than your monitor can possibly show). Since your monitor isn't capable of displaying all that information, you need to “remap” mplay using the “Adapt to full pixel range” button and then fiddling with contrast/brightness and such to start seeing something. It's been asked as an RFE to make this a little “smarter” since I've lost count of the users(including me ) that thought the output was busted when it's just that you can't see it!

I'll be honest, it's been ages since I've looked at the Fog COP demo, so I'm unsure about all this Depth vs P stuff, so I can't comment on which is more valid, but I know that Depth is a floating point image containing location in z space from the camera, which works great for things like Depth of Field in compositing or which layer is in front of which, and P is, well, P , which is really useful for fiddling with things like having hotspots and other directional light sources being added in comp and respecting the surface shape of your element. While I probably wouldn't design a job around this capability, it's got a great neato factor and I can see times when you could polish something quickly without a full re-render.

Cheers,

J.C.
John Coldrick
  • Quick Links