Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 19-08-2012 , 05:37 AM
Registered User
Join Date: Aug 2012
Posts: 22

Hardware Render: need a depth pass for sprites to be comped in AE

Hi folks. New to this forum. I have a question I've been researching for a few hours now with no luck.

So I have a static field of sprites that a camera is passing through, and I'm trying to figure out how to apply depth of field. Most DOF info on the web has been non-hardware render related, but I don't really have a choice, since I'm using sprites. Hardware rendering only user added image

I've tried rendering in different output formats like .tiff, .rla, .iff. With formats like .tiff and .rla, I would batch render and get the main pass as well as a depth image for each frame, but the only program that can open those depth images is fCheck. It correctly displays the grayscale depth coloration, though the Z view shows my sprites as cards...not as the images they contain. I tried saving that Z image out and using it in AE as a luma matte for the main render, but of course it didn't work in the comp since they're grayscale cards, not images.

I tried the technique listed here by yenvalmar: https://forums.cgsociety.org/archive/.../t-314991.html

...but I never saw a second alpha with Photoshop, even when using software rendering of a polygon object.

I have a very simple understanding of expressions and MEL...not much of a code monkey.

Need help!

(sorry to seem like the guy that joins/starts a thread because I have a question...but I do.)

edit: here's a shot of the sprites I'm working with, and the zDepth result I get from fCheck, both at 25% scale (if it helps)

Attached Images

Last edited by scentmental; 19-08-2012 at 05:43 AM.
# 2 19-08-2012 , 05:43 PM
Registered User
Join Date: Aug 2012
Posts: 22
checking in. Still have not found a solution.

# 3 19-08-2012 , 06:40 PM
daverave's Avatar
The thin red line
Join Date: Aug 2009
Location: England
Posts: 4,472
Sprite render in mental ray as well have you tried, or render out as PS or tiff that should keep a alpha channel.............dave




Avatar Challenge Winner 2010
# 4 19-08-2012 , 08:32 PM
Registered User
Join Date: Aug 2012
Posts: 22

Sprite render in mental ray as well have you tried, or render out as PS or tiff that should keep a alpha channel.............dave

thanks for the reply, Dave.

Mental Ray doesn't seem to produce anything at all. From what I have read, sprites can only be hardware rendered. I tried MR with various image formats, none of them worked.

I tried hardware rendering in all formats, with no success getting a z-depth image that gives me something other than grey cards. Getting the regular alpha is not the problem...getting the "second alpha" that was mentioned in that link is what I was unable to achieve.

# 5 19-08-2012 , 09:09 PM
daverave's Avatar
The thin red line
Join Date: Aug 2009
Location: England
Posts: 4,472
I just did this in mental ray must be your settings, I am using maya 2009..............dave

Attached Thumbnails



Avatar Challenge Winner 2010
# 6 19-08-2012 , 11:17 PM
Registered User
Join Date: Aug 2012
Posts: 22
Thanks Dave. You inspired me to try more mental ray tests. I was able to render those sprites with a new camera, though now I have a slew of fresh problems to deal with. I won't bother to mention them here though.

I'd still prefer to figure out how to get DOF with hardware renders, but this will have to do.

Thread resolved

# 7 06-04-2013 , 06:31 PM
ckuper's Avatar
Registered User
Join Date: Nov 2012
Posts: 1

Thanks Dave. You inspired me to try more mental ray tests. I was able to render those sprites with a new camera, though now I have a slew of fresh problems to deal with. I won't bother to mention them here though.

I'd still prefer to figure out how to get DOF with hardware renders, but this will have to do.

Thread resolved

Hi, scentmental, I am wondering if you can explain a little more about your solution for this. I think I have a similar situation that I'm trying to resolve.

I have a scene that is faking the look of layers of framing foliage using a series of planes (cards, as you put it) with black and white png images mapped outcolor > transparency of blinn shaders. I would like to animate a change in depth of field. A bokeh lens shader on my camera works beautifully in mental ray, but each frame takes a million years to render. I tried creating a luminance depth render but got the "gray cards" effect rather than the shapes of the images mapped onto the planes.

How did you ultimately get a depth image of your sprite shapes? Is there a way to use my shaders in the depth render rather than the surfaceShader? Or maybe map my images to it...hmmm.

Thank you!
C.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads