Answers.Body: <p>The default camera blur in after effects isn't very nice. You can adjust it a little by changing how the camera behaves in the Camera settings</p>
  <p>A larger aperture value on the camera will give you more blur at closer positions.
  You could try making the aperture larger, and then change the amount of distance between the text layers (and compensating with the scale of each object to get the effect you want).</p>
  <p><a href="https://i.sstatic.net/JQ7cb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/JQ7cb.png" alt="enter image description here" /></a></p>
  <p>Alternatively, a much more involved process is to use the <a href="https://www.youtube.com/watch?v=fiWJcWdbUe4" rel="nofollow noreferrer">Camera Lens Blur</a>, or a third party camera lens blur, and a <a href="https://www.youtube.com/watch?v=485In_11OcQ" rel="nofollow noreferrer">depth map</a> to get a more realistic depth of field blur. This looks much nicer, but takes much longer to render.</p>
  <p>The depth map is a 2D greyscale version of your 3D image, where the shade of grey of each pixel represents how far the image is from the camera, so it allows a camera plugin to correctly calculate the blur for each point.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-27T13:04:02.920Z
Answers.Text: Thanks for your answer. But the other options only work with 2D projects, right ?
  I mean, they fake 3D DOF within a 2D space. I wouldn't be able to use them conveniently in a 3D space to replace the camera DOF, right?
  The picture here above with the blur I like is taken from a video that is using 3D panning. I just don't know how they got that effect while being in a 3D space. I just can't see how a depth map could follow and be updated in real time when the camera is moving. if it's possible, I would be curious to know how. Thank you very much for your help, it's appreciated.
Answers.UserDisplayName: Bachir Messaouri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-27T13:08:36.463Z
Answers.Text: FYI, I played with the aperture and the distances. The result remains the same, it's just brighter/darker. And adding some blur will enhance the fuzzy aspect of the DOF. However, I kind of found an okay workaround : using "falloff" with the light so that the background texts are less visible. But it means I have to "hide" them somehow to make them acceptable. Which is not great.
  Is there, by any chance, any plugin that totally replaces the camera or the built-in 3D DOF?
Answers.UserDisplayName: Bachir Messaouri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-27T17:36:41.057Z
Answers.Text: You can use these in a 3D space (an after effects style 2.5D space, which is what you get when you're using non-extruded text set to 3D in After Effects).  There's a tutorial here which shows you how you can make a depth map: https://www.provideocoalition.com/z-depth-from-3d-after-effects-layers/
Answers.UserDisplayName: tomh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-27T08:57:16.667Z
Answers.LastActivityDate: 2021-09-27T08:57:16.667Z
Answers.UserDisplayName: tomh
Answers.Body: <p>The default iris on the 3D camera in AE is set to <strong>fast rectangle</strong>. You'll get better bokeh if you change it to <strong>hexagon</strong>, or higher sided polygon. You can also adjust the iris roundness. Double tap <kbd>a</kbd> to show the camera settings.</p>
  <p><a href="https://i.sstatic.net/xk34s.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xk34s.png" alt="enter image description here" /></a></p>
  <p>You could also add a lens blur effect to each layer and drive the blurriness via expressions. E.G.:</p>
  <pre><code>let dofFactor = 0.5; //how blurry things off the focal plane are, edit or connect to slider
  let focusDistance = thisLayer(&quot;Camera Options&quot;)(&quot;Focus Distance&quot;);
  let dist = length(thisComp.layer(&quot;Camera 1&quot;).position, thisLayer.position);
  Math.abs(focusDistance - dist) * dofFactor;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-29T03:39:08.313Z
Answers.LastActivityDate: 2021-09-29T03:39:08.313Z
Answers.UserDisplayName: stib
Body: <p>I have a hard time getting blurry text in the background with a camera and depth of field look &quot;right&quot;.</p>
  <p>Because I need to use latex math equations, I can't use built-in text, I need to either use AI files, PDF files or a hi-res version of the text exported in png from photoshop.
  The results are exactly the same though.</p>
  <p>In the example here below, I used:</p>
  <ul>
  <li>1940*1080 composition</li>
  <li>A camera (-1500 back in the z axis, Zoom 1500, DOF on, Focus distance 1500, Aperture 800, Blur level 100%)</li>
  <li>The first text is at 0 on the z axis</li>
  <li>The second text is at 250 on the z axis</li>
  <li>The third text is at 500 on the z axis</li>
  <li>The fourth text is at 750 on the z axis</li>
  <li>The fifth text is at 1000 on the z axis</li>
  <li>All text instances have originally the same width (3840px) and are scaled just the same (46%).</li>
  <li>All text layers are in 3D.</li>
  <li>The image is rendered with the optimal settings.</li>
  </ul>
  <p>But the text layers seem very &quot;pixelated&quot; after I push them forward over 250 in the z axis. It doesn't seem natural at all passed the second layer.
  The plus sign is the most obvious in terms of degradation. The results seem more fuzzy than blurry.</p>
  <p><a href="https://i.sstatic.net/vdPjE.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/vdPjE.jpg" alt="enter image description here" /></a></p>
  <p>What am I doing wrong?</p>
  <p>If nothing in particular and it is supposed to be that way, what can I do so that the blur/bokeh seems smooth at all distances?</p>
  <p>As it is, it doesn't seem THAT bad because I gradually pushed those texts backward and the sense of depth of field is there alright. But if I have, let's say, both the first and last text alone, it doesn't look like one is behind the other, only that one is fuzzier than the other. That's a problem since I have to move the camera rather often in my animation. The sense of depth should be there all the time.</p>
  <p>Any workaround that would enhance the result (more blurry, less fuzzy) would be welcome.</p>
  <p>Here is an example of something that is approaching what I'm looking for:</p>
  <p><a href="https://i.sstatic.net/6m6kM.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6m6kM.jpg" alt="enter image description here" /></a></p>
  <p>The bokeh effect induced by the depth of field seems to smooth and &quot;sphere&quot; things out rather than &quot;square&quot; them.</p>
  <p>Thank you for your help and input.</p>
  
Tags: <after-effects><camera>
Title: After Effects, text layers and depth of field
UserDisplayName: Bachir Messaouri
ThreadText: # After Effects, text layers and depth of field
  
  (Asked by: username_0 on 2021-09-26)
  
  I have a hard time getting blurry text in the background with a camera and depth of field look "right".
  
  Because I need to use latex math equations, I can't use built-in text, I need to either use AI files, PDF files or a hi-res version of the text exported in png from photoshop.
  The results are exactly the same though.
  
  In the example here below, I used:
  
  * 1940\*1080 composition
  * A camera (-1500 back in the z axis, Zoom 1500, DOF on, Focus distance 1500, Aperture 800, Blur level 100%)
  * The first text is at 0 on the z axis
  * The second text is at 250 on the z axis
  * The third text is at 500 on the z axis
  * The fourth text is at 750 on the z axis
  * The fifth text is at 1000 on the z axis
  * All text instances have originally the same width (3840px) and are scaled just the same (46%).
  * All text layers are in 3D.
  * The image is rendered with the optimal settings.
  
  But the text layers seem very "pixelated" after I push them forward over 250 in the z axis. It doesn't seem natural at all passed the second layer.
  The plus sign is the most obvious in terms of degradation. The results seem more fuzzy than blurry.
  
  [![enter image description here](https://i.sstatic.net/vdPjE.jpg)](https://i.sstatic.net/vdPjE.jpg)
  
  What am I doing wrong?
  
  If nothing in particular and it is supposed to be that way, what can I do so that the blur/bokeh seems smooth at all distances?
  
  As it is, it doesn't seem THAT bad because I gradually pushed those texts backward and the sense of depth of field is there alright. But if I have, let's say, both the first and last text alone, it doesn't look like one is behind the other, only that one is fuzzier than the other. That's a problem since I have to move the camera rather often in my animation. The sense of depth should be there all the time.
  
  Any workaround that would enhance the result (more blurry, less fuzzy) would be welcome.
  
  Here is an example of something that is approaching what I'm looking for:
  
  [![enter image description here](https://i.sstatic.net/6m6kM.jpg)](https://i.sstatic.net/6m6kM.jpg)
  
  The bokeh effect induced by the depth of field seems to smooth and "sphere" things out rather than "square" them.
  
  Thank you for your help and input.
  
  **Tags:** after-effects, camera
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-09-27. Score: 1
  
  The default camera blur in after effects isn't very nice. You can adjust it a little by changing how the camera behaves in the Camera settings
  
  A larger aperture value on the camera will give you more blur at closer positions.
  You could try making the aperture larger, and then change the amount of distance between the text layers (and compensating with the scale of each object to get the effect you want).
  
  [![enter image description here](https://i.sstatic.net/JQ7cb.png)](https://i.sstatic.net/JQ7cb.png)
  
  Alternatively, a much more involved process is to use the [Camera Lens Blur](https://www.youtube.com/watch?v=fiWJcWdbUe4), or a third party camera lens blur, and a [depth map](https://www.youtube.com/watch?v=485In_11OcQ) to get a more realistic depth of field blur. This looks much nicer, but takes much longer to render.
  
  The depth map is a 2D greyscale version of your 3D image, where the shade of grey of each pixel represents how far the image is from the camera, so it allows a camera plugin to correctly calculate the blur for each point.
  
  > **Comments:**
  > **username_0**: Thanks for your answer. But the other options only work with 2D projects, right ? I mean, they fake 3D DOF within a 2D space. I wouldn't be able to use them conveniently in a 3D space to replace the camera DOF, right? The picture here above with the blur I like is taken from a video that is using 3D panning. I just don't know how they got that effect while being in a 3D space. I just can't see how a depth map could follow and be updated in real time when the camera is moving. if it's possible, I would be curious to know how. Thank you very much for your help, it's appreciated.  
  > **username_0**: FYI, I played with the aperture and the distances. The result remains the same, it's just brighter/darker. And adding some blur will enhance the fuzzy aspect of the DOF. However, I kind of found an okay workaround : using "falloff" with the light so that the background texts are less visible. But it means I have to "hide" them somehow to make them acceptable. Which is not great. Is there, by any chance, any plugin that totally replaces the camera or the built-in 3D DOF?  
  > **username_1**: You can use these in a 3D space (an after effects style 2.5D space, which is what you get when you're using non-extruded text set to 3D in After Effects).  There's a tutorial here which shows you how you can make a depth map: https://www.provideocoalition.com/z-depth-from-3d-after-effects-layers/  
  
  ---
  
  ### Answer by username_2 on 2021-09-29. Score: 0
  
  The default iris on the 3D camera in AE is set to **fast rectangle**. You'll get better bokeh if you change it to **hexagon**, or higher sided polygon. You can also adjust the iris roundness. Double tap `a` to show the camera settings.
  
  [![enter image description here](https://i.sstatic.net/xk34s.png)](https://i.sstatic.net/xk34s.png)
  
  You could also add a lens blur effect to each layer and drive the blurriness via expressions. E.G.:
  
  ```
  let dofFactor = 0.5; //how blurry things off the focal plane are, edit or connect to slider
  let focusDistance = thisLayer("Camera Options")("Focus Distance");
  let dist = length(thisComp.layer("Camera 1").position, thisLayer.position);
  Math.abs(focusDistance - dist) * dofFactor;
  
  ```
  
  
  ---
  
  