Digital Art Zone

 
   
2 of 2
2
Is depth of field effect tied to scene scale?
Posted: 31 August 2012 04:41 PM   [ Ignore ]   [ # 16 ]
Member
Rank
Total Posts:  141
Joined  2005-05-21
de3an - 31 August 2012 02:52 PM

In regard to transparent (and/or refracting) objects:

The depth-of-field blurring that is obtained by using Carrara’s default DOF “post render” option, or by using a depth pass render in conjunction with Photoshop’s Lens Blur filter, will not render the DOF blur that occurs behind a transparency.

However, Carrara’s DOF “Raytraced” option will render the blur behind transparent areas. It’s the only automatic way I’ve seen to render complete depth-of-field blur in such scenes.

(Low quality settings were used in the following examples so as to expedite their creation. Smoother blurs are obtained with higher settings.)

Nice to know. Or rather, I guess, not nice to know. Is it worth a bug report? Has it been? It seems to me the depth pass *should* work through transparency.

Profile
 
 
Posted: 31 August 2012 05:20 PM   [ Ignore ]   [ # 17 ]
Power Member
Avatar
RankRankRank
Total Posts:  1059
Joined  2007-10-15

I assume that when there’s only open air between the camera and an object Carrara can calculate a post effect like DOF. But when there’s some sort of transparent object in front, there are too many ways the image can vary in that region based upon the transparency/opacity settings, so you can’t just come up with a standard DOF formula to vary the image. So you have to raytrace it to come up with the right DOF. In other words, how much do you blur for DOF when the transparent object is doing its own blurring and modification to what’s behind it?

Probably not a bug, but rather a “we can’t do it because the result would look even worse than the standard crappy DOF”.

Profile
 
 
Posted: 31 August 2012 05:47 PM   [ Ignore ]   [ # 18 ]
Member
Rank
Total Posts:  141
Joined  2005-05-21

de3an pointed out the separate depth pass, like I use for PS, doesn’t work with transparency. That’s what I’d like fixed, personally; I don’t really care about C’s DOF, but I would like a somewhat accurate depth pass. But what do I know. It may not be worth the effort.

Profile
 
 
Posted: 31 August 2012 05:55 PM   [ Ignore ]   [ # 19 ]
Power Member
Avatar
RankRankRank
Total Posts:  1059
Joined  2007-10-15
CarltonMartin - 31 August 2012 05:47 PM

...but I would like a somewhat accurate depth pass..

I’m not sure what you mean by an “accurate depth pass”. It seems to be correct as far as I can tell. The depth to a transparent object is just that. Do you want it to instead show the depth to the floor and background objects behind the transparent object? I suppose that could be an option, but technically that’s not what a depth pass is.

Still, you can modify the depth channel image in PS and make your own gradient image with whatever variation you want behind the transparent object.

Profile
 
 
Posted: 31 August 2012 05:58 PM   [ Ignore ]   [ # 20 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5904
Joined  2006-08-27

I have used the depth pass and Photoshop quite a bit to get a DOF, and it’s not hard to paint out the areas of an object that have an alpha applied. Usually takes me an extra five minutes.

 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 31 August 2012 06:06 PM   [ Ignore ]   [ # 21 ]
Power Member
Avatar
RankRankRank
Total Posts:  1059
Joined  2007-10-15
evilproducer - 31 August 2012 05:58 PM

I have used the depth pass and Photoshop quite a bit to get a DOF, and it’s not hard to paint out the areas of an object that have an alpha applied. Usually takes me an extra five minutes.

Very true. And don’t forget the Object Index pass which assigns a different level of grayscale to each object in the scene, so you can use that to instantly select just an object. Though sometimes the different grayscale levels are imperceptibly close, so you have to take that into account in your selection settings.

Profile
 
 
Posted: 31 August 2012 07:21 PM   [ Ignore ]   [ # 22 ]
Member
Rank
Total Posts:  141
Joined  2005-05-21

Take a look at the second of de3an’s pictures—the image through the glass doesn’t have any depth when the depth pass was run, so the PS blur doesn’t work. It works around the glass, but the image in the glass has no depth. And it would, as the raytraced Carrara DOF shows in the third image.

Thank you, though, I know how to use the depth pass. Take a look http://www.daz3d.com/forums/viewthread/221/P90/#80282.

I asked a simple question originally. It’s not worth any more of my time. I doubt I’ll ever have occasion for it to matter, but if I did, I’d be annoyed. I at least know what doesn’t happen now.

Profile
 
 
Posted: 31 August 2012 09:38 PM   [ Ignore ]   [ # 23 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5904
Joined  2006-08-27
CarltonMartin - 31 August 2012 07:21 PM

Take a look at the second of de3an’s pictures—the image through the glass doesn’t have any depth when the depth pass was run, so the PS blur doesn’t work. It works around the glass, but the image in the glass has no depth. And it would, as the raytraced Carrara DOF shows in the third image.

Thank you, though, I know how to use the depth pass. Take a look http://www.daz3d.com/forums/viewthread/221/P90/#80282.

I asked a simple question originally. It’s not worth any more of my time. I doubt I’ll ever have occasion for it to matter, but if I did, I’d be annoyed. I at least know what doesn’t happen now.

You may not wish to know more, so disregard if you wish, but for anybody else reading this thread that may be interested:


It would be nice for it to work through objects with an alpha, but since it is a post effect, there may be technical hurdles to overcome, as Joe mentioned.


As I mentioned above, you can paint out the edges of offending objects with alphas. If you have a program that can handle masks, it should be a simple procedure. I use it quite a bit, especially for dynamic hair as the post render DOF effect doesn’t respect dynamic hair. Neither does the depth pass or any other pass that I’ve tried. I usually use the polygonal lasso tool to mark the edges of where the DOF is supposed to be and depending on what I have to do, I either paint in the selected area or invert the selection.


Here’s an example. I used the DOF in Carrara, but I also rendered a depth pass because I was aware of the issue with alphas and wanted to fix any artifacts in my particles as they used alphas. The first image (assuming they display in the order in which I upload) is the raw image, the second one is the raw depth pass, the third is the painted depth pass and the last image is the final version.


I did invert the depth pass because I wanted the background out of focus as well. since I rendered a DOF with the image, it didn’t hurt the foreground’s lack of focus.

Image Attachments
Breathing-fire.jpgBreathing-fire-raw-depth.jpgBreathing-fire-fixed-depth.jpgBreathing-fire-final.jpg
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
Posted: 31 August 2012 10:57 PM   [ Ignore ]   [ # 24 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5904
Joined  2006-08-27

This is good to know: The raytraced DOF respects dynamic hair. I wasn’t sure it would as the hair itself is a render time effect.

Image Attachments
hairy-ball.jpg
 Signature 

I find it somewhat liberating not to be encumbered by accuracy.

Profile
 
 
   
2 of 2
2