🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.after.effects.scripting.render
Article #38

Re: Opacity linking to camera location

#38
From: Dan_Ebberts
Date: Sun, 11 Jan 2009 20:24
12 lines
1146 bytes
This will ramp the opacity from 0 to 100 as the layer moves from 0 to 500 pixels away from the camera. Should be easy to modify if it's not exactly what you're after:

maxDist = 500;
minDist = 0;
maxOpacity = 100;
minOpacity = 0;

C = thisComp.activeCamera;
d = length(C.toWorld([0,0,0]),toWorld(anchorPoint));
linear(d,minDist,maxDist,minOpacity,maxOpacity)

Dan
Technical Details
Message-ID: <59b77c40.0@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!feed.xsnews.nl!border-2.ams.xsnews.nl!eweka.nl!lightspeed.eweka.nl!89.250.64.36.MISMATCH!feeder2.xentech.net!news4us.nl!webcrossing
References: <59b77c40.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efebe,f9710d06a591eb68
X-Google-Attributes: gid1efebe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dan_Ebberts@adobeforums.com
Newsgroups: adobe.after.effects.scripting.render
Subject: Re: Opacity linking to camera location
Message-ID: <59b77c40.0@webcrossing.la2eafNXanI>
Date: Sun, 11 Jan 2009 12:24:38 -0800
References: <59b77c40.-1@webcrossing.la2eafNXanI>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!feed.xsnews.nl!border-2.ams.xsnews.nl!eweka.nl!lightspeed.eweka.nl!89.250.64.36.MISMATCH!feeder2.xentech.net!news4us.nl!webcrossing