A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Trouble with depth of field
Posted: 21 October 2015 08:55 PM   [ Ignore ]  
Total Posts:  298
Joined  2010-04-13

Hi Dr. Sassi, I want to use depth of field in AE using a depth map; my question is in two parts; I know that it is inferior to the C4D DOF, but time is important here. What I’d like to do is this: I have spheres going through a tunnel; I have noticed, unless I’ve made a mistake which is very likely, ; )when I render my scene with with a buffer for the cloner/spheres and another one for the tunnel, if I want to modify the color of the cloner/spheres, I should be able to bring in the object buffer for the cloner to isolate the cloner/spheres and adjust the sphere without affecting the tunnel, correct?, by when I apply curves, for example, my whole scene gets affected. Also, since DOF is time consuming to render, I have tried rendering a depth map in multipass, and my scene using png sequence’ when I try to use the depth map with a camera blur, or 3rd party plugin, it is not working. Did I make sense here?, other wise, I can rephrase, and resend; thank you as always,Craig

PS-one more thing please;  my tunnel curves around, and as a result, when the spheres go around the bend, I lose sight of them, which makes sense and it is what I want. When I have rendered the spheres separately, with object buffer 1 and visible to the camera, and use object buffer 2 for the tunnel, invisible to the camera, I had expected my sphere to be invisible from around the bend, but they are visible; can you please tell me what I did wrong here as well?, thank you

 Signature 

Craig

Profile
 
 
Posted: 22 October 2015 02:07 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Craig,

The depth map is not an image map, it is a data map. Each single pixel represents one depth information. This map should NEVER be rendered in Antialias quality, because it will render then two depth values, or more, into one value, and that is pretty much certainly something that does not exist in that depth. If AA was written into it, a seam will appear in Ae with a product of the, e.g., Background and foreground object. To an critical eye, that looks like CGish.
As each pixel represents a depth value, the typical suggestion is to oversample, to render out the depth information at least twice in size, and apply it to the scaled up footage in Ae. Then scale down.

The set up of the camera is critical as well, especially when you render in anything but floating point precision. Worse case here, 8bit/channel, as you get nearly no quality representation of the depth. If the Depth Map is set very large, and the parts in question would be in, e.g., 10% of that “space”, you would get only ~26 values for that part, which might not work if that is everything you like to have from “in focus” to the Bokeh part.

In After Effects this information needs to be set to RGB Values, if integer, e.g. PNG 8 or 16 bit was used. Otherwise, and gamma is applied to it and perhaps destroys any precision left. (Interpret Footage, Preserve RGB, Colorspace none).

The problem with any DOF Post blur is given that no partially transparency can be calculated, without a lot of work (taking the scene apart).

Another major problem is given in the 2D information, once the 3D space is flattened, the DOF calculation misses the invisible parts, which the Aperture Sensor/Film combination would have seen. So the edge part of the blur has no complete information and has to repeat those pixels. See example (and the page before!) here:
http://old.cineversity.com/forum/forum_posts.asp?TID=2720&PN=1&TPN=12

Here will see the other problems with DOF, no reflections, difficult transparence handling, with 2D post approaches. Sorry that I get so long on all of that, but DOF is since decades a favorite theme of mine, I own a Patent Pending for a specific Aperture, the “Dual Aperture”. So forgive my detailed response ;o)

Note that any Ae blur combination will fail, e.g., post DOF Blur and Motion Blur. It can be set up, but as both needs to be calculated at the very same time, Ae will not deliver, it calculates on or the other first. Here is the major skill and advantage in the C4D approach, it just works!

The buffer question and the curve, I’m not sure what you have set up, typically I would try to use an Adjustment Layer, which has the Buffer Applied to it.

Buffer-Tunnel, if the camera can’t see the Tunnel, it will see the Spheres. I would expect exactly that. You might have to render out two versions. Normally I would suggest to work with a “Seen By Transparency” set up with a 100% transparent tunnel, but with DOF, I might be more cautioned about that. Switch off all textures and Lights, and the second pass should be fast, especially since you have buffered it.

Let me know if there is any other question.

My best wishes for the project

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 24 October 2015 10:17 AM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  16
Joined  2008-11-17

Thanks for that explanation, very detail.

 Signature 

Bernie Solo
http://www.solostudioworks.com

Profile
 
 
Posted: 24 October 2015 01:01 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the feedback, Bernie Solo, very much appreciated.

:o)

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile