ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Depth map from 3D objects in comp? How?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brian MurphyDepth map from 3D objects in comp? How?
by on May 3, 2011 at 11:05:51 pm

Hey all,

Is there a way to get a depth map out of 3D objects in an After Effects comp?

I have a camera and rendered animation brought into AE from Cinema 4D. Picture an environment full of cells scattered around. I only rendered the main cell that plays to the camera with an alpha in Cinema 4D and will populate the scene behind it with flat images of cells in 3D space but to get depth of field and have them fade into the far distance, I need to somehow get a depth map from all those 2D objects that I turned into 3D in my comp. Any idea how?

Thanks!
Brian



Return to posts index

Brian MurphyRe: Depth map from 3D objects in comp? How?
by on May 3, 2011 at 11:34:40 pm

In answer to my own question, I did happen to find this....

http://www.digieffects.com/product/atmosphere

But can I isolate alpha's 3d layers and NOT affect a background image?


Hmmmmm.



Return to posts index

Kevin CampRe: Depth map from 3D objects in comp? How?
by on May 4, 2011 at 4:26:14 pm

[Brian Murphy] "but to get depth of field and have them fade into the far distance, I need to somehow get a depth map from all those 2D objects that I turned into 3D in my comp."

i'm not sure you need a depth map to do that... what would you use it for? dof can be set up within the ae camera, or you can use expressions to link a blur to the distance between the layer and the camera.

you can use a similar expression to link that same distance to a layer's opacity or an effect that would help it blend into the background (actually, i f you needed a true depth matte from ae, you'd use a similar expression to link distance from camera to opacity of the layer, hide the background and render just the alpha channel)...

anyway, you'll find a good expression here:

http://www.motionscript.com/design-guide/falloff.html

in that example, dan uses it in the material properties of 3d layers to simulate light falloff, but you could use it in a layer's opacity, or in the source opacity of an effect like solid composite if you wanted it to change color rather than opacity...

to make it relative to the camera, you can either parent a light to the camera and set the light position to 0,0,0, or, if you don't need the light (ie, not using the material properties), you can change one line of code to:

L = thisComp.layer("Camera 1"); // use the name of your comp camera

to effect blur (if you're not using the camera's dof), you could use an expression like this in the blur property of an effect like fast blur:

decay = 100;
focalDist = 500;
L = thisComp.layer("Camera 1");
d = length(L.transform.position,transform.position);
Math.abs(d-focalDist)/decay


Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index


Walter SoykaRe: Depth map from 3D objects in comp? How?
by on May 4, 2011 at 10:08:22 pm

[Brian Murphy] "Is there a way to get a depth map out of 3D objects in an After Effects comp?"

Yes -- Digieffects Depth [link].


[Brian Murphy] "I have a camera and rendered animation brought into AE from Cinema 4D. Picture an environment full of cells scattered around. I only rendered the main cell that plays to the camera with an alpha in Cinema 4D and will populate the scene behind it with flat images of cells in 3D space but to get depth of field and have them fade into the far distance, I need to somehow get a depth map from all those 2D objects that I turned into 3D in my comp. Any idea how?"

I agree with Kevin -- you might not need a depth map to do this. Why not just use DoF in AE's camera?

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Brian MurphyRe: Depth map from 3D objects in comp? How?
by on May 5, 2011 at 5:45:45 pm

Depth of field is great for blur and that works fine but I really need to sell the effect of distance by having the further objects take on more of the background color to simulate fog or murky liquid. Kevin's script was awesome and I will use that for the camera and objects distanced from it...the depth map was mainly to apply the color effect toward the furthest objects. I can't use opacity for this because at times, there are objects that go behind them and the would show through.

Thanks guys!
Brian



Return to posts index

Michael SzalapskiRe: Depth map from 3D objects in comp? How?
by on May 10, 2011 at 5:27:15 pm

You could apply some color correction effects to give your layers that atmospheric look and tie the amount of color correction to the distance from the camera with expressions. Once you have it set up for one layer, it should be fairly easy to copy it to the others.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]