Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

After Effects question. Global visibility for 3D objects?

Discussion in 'Animation, Motion Design & Film Making' started by richimgd, Oct 3, 2013.

  1. richimgd

    richimgd Member

    Hi there - not sure if there are any After Effects gurus on here?
    I am wondering if it is possible to achieve a specific type of effect.
    I'd like to be able to add global visibility into a scene with parameters, so that 3D objects over a certain distance from the camera become either invisible or less visible. As if there is fog in the scene. For example you can achieve this type of effect in Cinema 4D by adding an 'environment' into your scene and then adjust the settings for distance and amount. It takes just seconds to do and its a very powerful effect. It means you can very quickly add the equivalent of fog into a scene where objects that are further away do appear more distant because they are less visible / have less contrast. Not only is it quick, its also extremely accurate because it is based on the distance the objects they are from the camera in real time. It would otherwise require a lot of painstaking animation on all your individual objects and this would be less accurate.
    Anyone know if you can do this, or if there is a plugin?
    Many thanks
  2. Levi

    Levi Moderator Staff Member

    Note I don't use AE very often (if at all lol) but it looks like you're looking for depth of field (dof) aka z-depth, I know you can fake it easy enough in 3ds max, blender etc so I would assume c4d is the same. You would need to render a full animation using the 'faked' z-depth pass (it's fairly quick though) to get the required layer for things like after effects.
    That pass would then need to be used to apply the 'fog' or blur in c4d using some layer settings.
  3. richimgd

    richimgd Member

    Ah right yeah its a similar thing to depth of field in the sense that it is defined by the distance from the camera. But obviously depth of field is make objects either sharper or blurrier - I am interested in making them either more or less visible. I will have a play around and see if I can adapt dof to what I need... if that is what you are suggesting?
  4. Levi

    Levi Moderator Staff Member

    well in a way what you're asking for is depth of field... but it's using opacity instead of blur.
    Now I don't know if this is possible or not, never tried it to be honest but I would guess the below could work.
    Do a z-depth pass (working on the assumption you're using a file you can get this) to get the depth of the 'objects' in the scene. Remember if this is in 3d program you can do this without redoing a whole scene, you can just apply a texture to the scene and 'fake' it.
    This will (in my programs anyways) produce a greyscale image which can then be used to mask off the scene. The mask would then be used to adjust the opacity of the video layer so you can see more of the 'solid' background colour (may need another 'layer' for this), in essence giving the items further away less visibility.
  5. matt

    matt Member

    I guess you could use a depth matte as a luma matte for transparency, but I don't think you can create one in AE, and based on your question this is a native AE project isn't it? You may also encounter issues with objects in the foreground being out of focus and therefore transparent.
    Presumably you could set up an expression to control transparency based on distance from camera. I wouldn't know how though.
    I did come across this a while ago: when researching a similar problem. I've not used it, but it looks like it'll do what you're after.
  6. richimgd

    richimgd Member

    Hi guys cheers for the posts.
    I actually opened a thread on the Adobe forums too which got a couple of replies:
    I wanted to do everything in After Effects rather than incorporating any other program. The depth map sounded a bit complicated and I wasnt sure if this is something you can do in After Effects or not. I would have wanted it to be done in real time though without having to render out a depth pass then do some kind of composition for it to work. I didnt want to have to setup the whole screne in 3D program as I was hoping that After Effects would be capable of doing it. It takes litrally 10 seconds for it to be setup innCinema 4D - its just for what I was doing After Effects seemed better (mainly 2d objects in 3D space and some typography etc).
    I actually tried setting up an expression with the 3D objects so that they faded to 0 opacity when over a certain distance from the camera. Adapted from this:
    I found this really powerful at first but then as I got more involved in the project I realised there were some inconstancies. One of which was putting the 3D objects inside a parent container threw out all the coordinates so I spent ages trying to get the expressions working accurately since the expression seemed to take into account the parent of the object when working out coordinates for some reason.
    In the end I just removed all the expressions and manually animated the opacity so in other words I gave up trying to find the 'quick way' to do it.
    I'd be interested in finding out if this effect and be achieved either by taking another look at expressions or if some kind of depth type filter could be plugged into the scene since it would be such a useful and powerful effect that would come in handy for all kinds of things.

Share This Page