CGTalk > Software Specific Forums > Autodesk Maya > Maya Rendering
To minimize the ads you see on this page create a CGTalk account and log in HERE
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 01-31-2011, 07:03 PM   #46
daddyo
Frequenter
Raphael Protti
Freelance Artist
Hollywuuuud, USA
 
Join Date: Oct 2003
Posts: 243
Send a message via AIM to daddyo
Here's the shader in question:

http://www.cookingwithlasers.com/fi...phZ_shaders.rar

I packed two versions in there. One is the full automated one, but my setup has issues with world coordinates on some scenes, or because the camera move is so complex, the locators get 'inverted' and the math no longer works for Z depth. In that case, use the 'simple version' for which you just input clipping plane values in the set range node. Directions can be found in the notes for the locator group you'll find in the outliner when you import into your scene.

Note that you can easily replace the simple gradient with a ramp to create a focus field. Just replace the blender nodes with a ramp, pipe the output from the set range into the y or v of your ramp, and bam...

For both versions, red channel has Z, green is Y. Since its built from maya nodes it should work without installing anything, and with any render package that supports the nodes. plug and play. Thanks for any feedback.
 
Old 07-11-2011, 10:46 PM   #47
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,572
Tested this one again as the topic came up in another thread.

Works great for basic stuff, but we already had that covered. When cutout opacity and instancing come into play, it's not producing any different results than the standard depth remapped method, which does not support cutout_opacity from the mia_mat_x.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 07-16-2011, 06:38 AM   #48
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,572
I can happily report that I'm able to pull out nice clean z-depth passes now in Maya 2012! Not sure what I was doing wrong in 2009 to be honest, or if the passes system was just broken. Thanks for everyone's support on this topic, especially Bitter who made it seem so easy that it became easy!
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 07-16-2011, 10:25 AM   #49
m0z
SOuP cook
 
m0z's Avatar
portfolio
Mathias Markovits
CG Allrounder
ViennaPaint
Austria
 
Join Date: Apr 2010
Posts: 413
how-to?
__________________
mathiasmarkovits[dot]com
 
Old 07-16-2011, 07:37 PM   #50
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,572
I'm just using the Depth pass, and the DepthRemapped. Still having a hell of a time with file formats though. I do get a clean .tif file now but the tonemapping part eludes me. Perhaps I'll render my master beauty as an 8-bit file or something, not sure how to make it all work.

But I'm now getting a depth pass which incorporates the cutout opacity from my mia_mat_x_passes shaders without any headaches or BS, which is precisely what I needed! Much more efficient than making and assigning tons of new shaders to everything, when I know that the cutout opacity data already exists in the mia_mat_x_p.

Previously, I couldn't get the depth pass to respect cutout opacity, thus all my frustration.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 07-17-2011, 09:18 AM   #51
m0z
SOuP cook
 
m0z's Avatar
portfolio
Mathias Markovits
CG Allrounder
ViennaPaint
Austria
 
Join Date: Apr 2010
Posts: 413
great if it finally works for you. I just tried the whole thing again - with 32bit tif and it works perfect with the nuke zblur.
__________________
mathiasmarkovits[dot]com
 
Old 07-17-2011, 06:24 PM   #52
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,572
Still having a bit of a headache with the file formats. I don't use Nuke (yet), how would you go about tone-mapping a 32-bit .tif in Photoshop instead?
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 07-17-2011, 09:36 PM   #53
m0z
SOuP cook
 
m0z's Avatar
portfolio
Mathias Markovits
CG Allrounder
ViennaPaint
Austria
 
Join Date: Apr 2010
Posts: 413
Basically I just use the Exposure (ps) or Color Correction (nuke) adjustments. It should look like the 8bit with 2.2 then afaik.
__________________
mathiasmarkovits[dot]com
 
Old 07-17-2011, 10:08 PM   #54
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,572
Using my scene from earlier, I figured now'd be as good a time as any to dive into the .exr filetype. I was having no luck with .tif, .iff, or .bmp of course. After playing around for awhile, it seems I finally "got it down", and feel rather silly for all my complaining and crying here and abroad on this topic!

Same scene from earlier, only using the depth_remapped pass and the .exr filetype in Photoshop. Still gotta work on linear lighting in a real scene, but this one passes my cutout_opacity tests and I get a decent depth pass finally, albeit with some tweaking of the levels.

Beautypass (not beautiful this time):



Depth pass:



I think I need to override my file filtering on the depth pass or something, it's antialiasing the cutout_opacity, but that's a small hiccup. At last, a quick and painless depth pass! Thanks for all your patience and support people; I'm simply posting up these latest tests in case anyone else runs into these problems.

Edit: Here's a comp test, just adding some colored haze based on the depth pass, similar to adding distance haze in a heavy forest scene for example:

__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


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

Last edited by InfernalDarkness : 07-17-2011 at 10:33 PM.
 
Old 07-18-2011, 09:05 AM   #55
m0z
SOuP cook
 
m0z's Avatar
portfolio
Mathias Markovits
CG Allrounder
ViennaPaint
Austria
 
Join Date: Apr 2010
Posts: 413
if you select the pass in the attribut editor there's a checkbox for filtering. I guess that's what you're searching.
__________________
mathiasmarkovits[dot]com
 
Old 09-10-2011, 04:32 AM   #56
rchr
New Member
portfolio
Australia
 
Join Date: Feb 2005
Posts: 16
Doesn't work with MR Proxy still though...
 
Old 01-08-2012, 09:46 AM   #57
oracio
Frequenter
Uri T.
Tel Aviv, Israel
 
Join Date: Jun 2006
Posts: 132
Quote:
Originally Posted by InfernalDarkness
But I'm now getting a depth pass which incorporates the cutout opacity from my mia_mat_x_passes shaders without any headaches or BS, which is precisely what I needed! Much more efficient than making and assigning tons of new shaders to everything, when I know that the cutout opacity data already exists in the mia_mat_x_p.


Sorry for jumping an old thread.
Correct me if I'm wrong but you got cutout opacity from a mia_x mat to work with only the Depth Remapped Pass?
If so, how?
The best I could do with the Depth Remapped pass is when I have a mia_x mat with a cutout opacity file based on alpha and not luminance map (B&W texture), but still the Z-pass showed me just the areas in my map where the opacity is 100% and discarded semi-transparent areas.
 
Old 01-10-2012, 12:19 AM   #58
InfernalDarkness
Madness. Madness, I say!
 
InfernalDarkness's Avatar
portfolio
Sho Pi
CG arch/viz
Seattle, USA
 
Join Date: May 2008
Posts: 5,572
@Oracio: The trick was something Bitter mentioned, made me feel rather foolish.

Use the mia_material_x_passes for anything pass-related. If you already are, I don't mind helping you dissect the issue further. But the regular mia_mat_x will not spit out Cutout Opacity to the passes, which was part of my struggle initially.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 01-10-2012, 05:58 AM   #59
Bitter
Also Highly Corrosive
 
Bitter's Avatar
David Fer Real
Fixer of things
USA
 
Join Date: Apr 2003
Posts: 1,720
Quote:
Can someone explain me the benefit of this jaggy zbuffer passes?


Because filtered samples from two objects at two different locations results in a pixel with a mixture of hither and yon distances (object distance A and object distance B get merged). Meaning the resulting value belongs to neither object (or more objects that overlap)

123 Main Street and 364 Main Street filtered together (anti-aliased) might be 214 Main Street.

It's a technical concern for correct compositing where you may use something like a z-compose. It will tend to fall apart in the case where your values are filtered together.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 01-10-2012, 03:45 PM   #60
oracio
Frequenter
Uri T.
Tel Aviv, Israel
 
Join Date: Jun 2006
Posts: 132
Quote:
Originally Posted by InfernalDarkness
@Oracio: The trick was something Bitter mentioned, made me feel rather foolish.

Use the mia_material_x_passes for anything pass-related. If you already are, I don't mind helping you dissect the issue further. But the regular mia_mat_x will not spit out Cutout Opacity to the passes, which was part of my struggle initially.

Hi InfernalDarkness,
The thing is that the Z-Depth pass doesn't work with semi-transparent maps.
In the end my solution is to use the p_z shader with a little script that I wrote that does the automation of replacing the current shader with the p_z and connecting the opacity files (should be used on a new Render Layer).
You can find it here:
http://forums.cgsociety.org/showthr...=1027613&page=2

Thanks
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:37 PM.


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