Skip navigation
richtbh
Currently Being Moderated

Can you add global visibility into a scene to effect all 3D objects?

Oct 3, 2013 11:31 AM

Hi there

 

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 was 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. 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

Rich

 
Replies
  • Currently Being Moderated
    Oct 3, 2013 10:35 AM   in reply to richtbh

    There are plugins out there to simulate atmosphere, but you would might like a distance expression from the layer to the camera just as much.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 3, 2013 4:56 PM   in reply to richtbh

    you'll find an expression for something similar here:

     

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

     

    you'll want to change the light layer in the expression to your camera.

     

    the expression is to simulate light falloff.  if you just need your layers to fade to black, then that will probably work for you, if you need it to fade to white (of another color or backgound layer), then try adding compound arithmetic, set the second source layer to the background layer (or a solid that is the color that you want) and apply the expresson to the 'blend with original' property.

     

    if that works for you, then you can create a preset with the effect and expression and then quickly apply it to all the 3d layers that you need.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 14, 2013 12:38 PM   in reply to richtbh

    You have to add a little language to the expressions to make them look at comp space instead of layer space when you have layers with spatial transformation expressions that have a parent.  Did that make sense?

     

    Look up toWorld and toComp in the expressions guide or show us a screenshot of your project with the layer properties revealed and we can help you fix the expressions to take care of the parenting issue. Without a good screenshot and a good understanding of your project structure we can't write an example expression that is guaranteed to work.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 18, 2013 11:26 AM   in reply to richtbh

    i must admit i still get confused with layer space transforms... so i'd modify the expression to detect a parent, something like this:

     

    decay = .005;

    noFalloff = 1500;

     

    L = thisComp.layer("Camera 1");

     

    if (hasParent==true){

        d = length(L.position, parent.position + position);

    }else{

        d = length(L.position, position);

    }

     

    if (d < noFalloff){

        value;

    }else{

        value/Math.exp((d - noFalloff)*decay);

    }

     

    it's not as robust as using layer space transformations (which i really should sit down and figure out), but it should work with single level parenting.  however it would not work if the parent also had a parent.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points