Z-depth in mental ray - Best way for instancing, methods, passes?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  12 December 2010
Originally Posted by InfernalDarkness:
How do I go about tone-mapping any of these files, and which one should I be trying to do this to? With the passes method, I get a MasterBeauty folder file and a depthRemapped folder file for each render, but there's no z-channel in my depthRemapped file at all, and no alpha. The RGB channel of this file is identical to the alpha from my MasterBeauty file, and the alpha is plain white. No Z-information in this file. Should I be working with the MasterBeauty file's black (but present) Z-depth information? And how would I save this out to a format that Photoshop recognizes?


In Nuke I use the Grade node to tonemap the camera_depth pass. This is the only one that requires tonemapping. The depth_remapped is already 'tonemapped' in a way. It's 'remapped' so it fits into the 0 to 1 space of a regular 8 bit file. No tonemapping required for that one.

Some depth plugins may require floating point data...if this is the case then no tonemapping of the camera_depth pass is needed. I've found Lenscare works much better if I normalize the values to a 0 to 1 space so when I use that plugin I always tonemap using the grade node in Nuke. I know you said you are doing your work in PS and I can't be of much help there because I've never actually attempted this process in PS. My first guess would be the exposure tool, though, if you wanted to tonemap the 32 bit file down to the normalized 0 to 1 range.

There should be no z channel for any of the render pass depth passes. It is stored in the rgb channels of that file. I can't remember off the top of my head if it stores the depth info in only one of the rgb channels, or if it is present in all of the rgb channels. A quick look in fcheck or PS would tell you that pretty easily though. Either way, you only need to work with one of those channels, either the r, g, or b will work. But yea, don't be looking for a specific 'Z' channel for the depth_remapped or camera_depth passes. Also, no alpha comes with those passes by default because no alpha is needed for a depth pass. You only need depth information, not transparency information. I believe you can override this behavior in the attribute editor for that pass...but they may have locked the ability to edit this for the depth pass. I can't remember exactly and at work we still use 2008, so I can't check any of this right now.

I hope I wasn't too confusing. If I was let me know and I'll explain it better.
__________________
If animation is the illusion of life, then life is the illusion of reality.


"On ne sort pas DU REVE."


Last edited by Redsand1080 : 12 December 2010 at 06:46 PM.
 
  12 December 2010
32 bit Depth channel is stored in EXR, otherwise you can render it to Tif.

32 bit will allow you to grade it to any values you want, which can also do with exposure controls in Photoshop. You will then have to convert to 8bit if you want to use with filters and what not.


Very useful if you want to isolate a very specific depth.
__________________
: my website :
 
  12 December 2010
Quote: 32 bit will allow you to grade it to any values you want, which can also do with exposure controls in Photoshop. You will then have to convert to 8bit if you want to use with filters and what not.


Very useful if you want to isolate a very specific depth.


Not to be rude, but this is precisely the reason I'm trying to render out the z-depth. I already knew all these things - the problem isn't knowing what z-depth is for, the problem is actually getting it to render at all.

Quote: 32 bit Depth channel is stored in EXR, otherwise you can render it to Tif.


Where is this stored? Which file is this stored in, and how do I access this information from Photoshop? And I've tried TIF as well, and RLA, and BMP, and IFF, and EXR, and Targa. So far coming up with a big fat nothing.

I know you're trying to be helpful so I apologize for being a bit caustic. But compare rendering z-depth in mental ray for Maya to every other rendering package on the market, and it's just plain retarded. Every other application and renderer nails it fine with almost no hassle. MR for Maya = the stupidest, most broken, disjointed and horrendous implementation of rendering available.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
  12 December 2010
switch to vray then...

(one of our co-workers always tries to convince us to use max & vray haha)

I hear ya. Motion Blur is another story too...
__________________
mathiasmarkovits[dot]com
 
  12 December 2010
There are many reasons to switch to Vray, and a few to use Max as well (such as OnyxStorm for trees, etc.), but it's also a budgeting issue. I can't justify to my employer the purchase of Vray for Maya, since we don't need it for my arch/viz work. We have no competition up here in today's market, so I'd basically be sacrificing my next raise. But this is also why I still use Maya 2009 - there's simply no reason or extra functionality that 2011 brings to the table for my actual work.

My hobby, or personal artwork, is mostly landscapes and gay castles and flowers and stuff. This is where the z-depth hangup comes in for me. After 6 years of Maya I can't go back to Bryce - it doesn't even have viewport texturing, for the love of god! But I did pound out a lot more artwork back then, that's for certain. Some of it in a day or less. Sure, my personal quality standards have changed dramatically too - and that's why I love Maya. MR's results are amazing too, I just can't wrap my head around this retarded z-depth problem.

I'll put a man on the moon by hand, by myself, before I get a decent depth render, it seems!

So far, what I've gathered (trying to stay positive here, and not sound like a sissy):

1. Passes require Nuke or another compositor to work properly. Photoshop alone won't do the trick.

2. Passes are retarded - thus the need for Mercuito's Core Pass System. But alas, not for 2009 yet.

3. Z-depth is stupid, and I'm an even greater dummy for not being able to pull it off in any but the most basic scenes. A few spheres instanced? No problem. A real scene? No way in hell, here.

What would really be nice would be to simply use Maya Software to render a depth pass. This would work, except that Maya Software doesn't use BSP2. So given the complexity of my scenes, I'd need at least double the RAM I have, if not quadruple, to do this in MS. Brutal.

I apologize for my negativity. I know you're all trying to help, but I'm really getting nowhere and just need to shut up and step back for a few days or get drunk and just cry it all out. Perhaps a bottle of merlot and an appropriate chick-flick emo-film will straighten my mind out. Aliens vs. Predator or something.

Thanks for all your input so far though, my friends! I know it's me that is failing - not you guys.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."

Last edited by InfernalDarkness : 12 December 2010 at 10:24 PM.
 
  12 December 2010
Photoshop doesnt support layered EXR, but After FX does....and i believe there are plugins for photoshop that do also.

Otherwise you would have to use other applications to get access to the other layers.
__________________
: my website :
 
  12 December 2010
And Fcheck doesnt support a single channel (R and not RGB) which is what a depth pass is. This is why you keep seeing black, when you load the render pass in the Fcheck.


Just did a test, works the same with .iff And you will get a 32 bit depth pass as a single channel in a Depth layer.


link to the .iff plugin:

http://www.3dbuzz.com/vbforum/showt...shop-IFF-plugin
__________________
: my website :

Last edited by MasonDoran : 12 December 2010 at 10:51 PM.
 
  12 December 2010
Thanks again for your help and positive attitude, despite my not-so-positive one, MasonDoran! That may be very helpful for me in the future, but for now I've set aside the passes method and revisited my barebones test scene. Just had to vent a little and cool off or whatever, but your information explains a lot why my files weren't visible in Fcheck especially, and I'll try the passes method again tomorrow.

Meanwhile, back in my test scene using the Puppet p_z shader, made some progress and broke it all down from scratch so I can replicate and dissect my workflow for later. Here's what I came up with:



Here's the p_z shader working with instances. The center sphere is original, the other four are instances. This only appears to only work in Regular BSP but I'll test it again, and try Large BSP and BSP2 as well. Good news is that RAM didn't skyrocket at rendertime the way it does with Maya Software, so at least instancing appears to be working under Regular BSP using this shader. Also the cutout opacity is of course working properly, with the backfaces' distance displayed as well.



Same tree from the other scene. I replaced the file node for the alpha from the previous render with the "WildTwisty" tree's leaf file to keep it down to one cutout-opacity-p_z and one without cutout opacity only, for now. As you can see, the cutout opacity is working for me still here. (right-click View Image to see full res) A bit of .jpg artifacting here on the web, but you can see that the foremost branches and leaves are indeed brighter than the rear ones! Sweet!



And here I've instanced the tree a few times. This is the part where (normally) Regular BSP starts to fall apart, and thus why I can't just switch to Maya Software for a depth render in big, complex scenes. Everything appears to be working for me finally here!

Next I just need to learn enough about Render Layers to make the Main Render use BSP2 and the PuppetZ Render use Regular BSP, etc. A few more things to learn, but it's working properly for me now!

I apologize for all my naysaying previously. I'll be launching back into passes with a fresh save of this scene (new name, folders, etc.) to keep things simple.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."

Last edited by InfernalDarkness : 12 December 2010 at 07:29 AM.
 
  12 December 2010
For the renderlayer thing: switch to the layer. Go to render settings and right-click on acceleration method -> create layer override
Then just switch to whatever you like
__________________
mathiasmarkovits[dot]com
 
  01 January 2011
So what are some peoples render settings that are getting them the best results. I ask only because I have heard and read many different values. Here is what I think is correct but not sure.

Dont know why I tried those settings of AA 0,0 and triangle filter, because with my original settings of 1,3 and Mitchell Filter, my renders seem to look much better...

Last edited by 3DRenderer : 01 January 2011 at 04:41 AM.
 
  01 January 2011
Getting a good Z-depth pass requires a separate render anyways so I usually handle it by creating a new render layer, overriding all the materials with say a black surface shader, lower the settings, 2x or 3x the render size, and add a camera depth remapped pass with adjusted values. The Render Pass is not aliased so it will give you more accurate results than resorting to the triangle filtering.

Scale that depth pass down in your compositor and you should be good to go. If you don't have Nuke or Fusion, use Toxik, it works just fine. If you don't have that, you could try Blender's compositor which is free of course. This workflow should work in most cases, but I'm not sure about scenes with mr_proxys.

Last edited by crispy4004 : 01 January 2011 at 08:34 PM.
 
  01 January 2011
Quote: Getting a good Z-depth pass requires a separate render anyways so I usually handle it by creating a new render layer, overriding all the materials with say a black surface shader, lower the settings, 2x or 3x the render size, and add a camera depth remapped pass with adjusted values. The Render Pass is not aliased so it will give you more accurate results than resorting to the triangle filtering.


This method does not work (in my scenes) for two reasons - it doesn't respect BSP2 proper and also would require a separate shader for each and every leaf-shader or plant-shader with opacity. In my tests it was difficult to get surface shaders to respect cutout opacity at all, therefore my Puppet_z shader tests.

Quote: Scale that depth pass down in your compositor and you should be good to go. If you don't have Nuke or Fusion, use Toxik, it works just fine. If you don't have that, you could try Blender's compositor which is free of course. This workflow should work in most cases, but I'm not sure about scenes with mr_proxys.


I need to look into Blender's compositor, but I'm not doing any animation, and you would think Photoshop would be enough. But it's just not. (sighs)
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
  01 January 2011
I'm still trying to understand why ppl don't use a shader that creates a depth pass that is antialiased and supports transparency if needed, so that it matches their geometry.

Can someone explain me the benefit of this jaggy zbuffer passes? I made a Zdepth shader that works great, includes a height field pass, and supports transparency for cards and other stuff...
 
  01 January 2011
share it?
__________________
mathiasmarkovits[dot]com
 
  01 January 2011
I'd love to give your shader a whirl, Daddy-O. So far, only the Puppet_z shader does z-depth properly for my compositing needs, and it still requires a TON of work to make it function properly. But Puppet knows what he's doing - best shader thus far I've found.

But I'd love to have height and z-depth in one shader, with support for cutout opacity and BSP2!
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:00 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.