Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Avrohom Kohn on August 14, 2007 at 1:14 pm

    I have a 3D scene with multiple flat layers of ‘fog’ offset in 3D. I’d like to have a camera fly through. The problem is when the camera passes through a layer, you see a sudden change, since it stops being shown abrubtly.

    Can anyone help me with an expression for each layer’s opacity, it should depend on the camera’s position relative to itself. Say if the camera is 200 pixels away or more, it should be at full opacity (or something I’ll specify later.) But when the camera gets between 200 and 10 pixels away, the layer should fade out accordingly. That way I can fly my camera through and get a pretty realistic fog.

    Thanks,

    Abraham Perl
    TAMotion

    Mike Clasby replied 18 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Mike Clasby

    August 14, 2007 at 5:31 pm

    This expression on the Cloud layer’s opacity, does what you ask:

    startFade = 200;
    endFade = 10;
    L = thisComp.layer(“Camera 1”);
    d = length(L.position,position);
    linear(d,startFade,endFade,100,0)

    It is a combo/hack of two Dan expressions, from here:

    https://forums.creativecow.net/readpost/2/888147

    Change startFade and endFade to taste.

    I’m glad you asked the question as I’ve never made clouds before, but a quick Fractal Noise on a 3D Solid chased by Unmult and this expression on Transparency works nifty. Thanks.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy