Activity › Forums › Adobe After Effects Expressions › layer transparency distance from camera
-
layer transparency distance from camera
Posted by Franky Torres on October 13, 2007 at 8:18 pmI need an expression that does the following:
the further a layer gets from a camera, the darker it gets until it is fully transparent…here is the catch I need to layer to remain at ful opacity for “x” amount of time. Anybody know of any way to accomplish this?
Stuart Simpson replied 8 years, 5 months ago 9 Members · 21 Replies -
21 Replies
-
Dan Ebberts
October 13, 2007 at 9:49 pmDo you really mean “x amount of time”, or do you mean its opacity needs to be 100% until it reaches a certain distance from the camera and then it fades until it reaches some other distance where it would be 0%? That would be like this:
C = thisComp.activeCamera;
startFade = 500;
endFade = 1500;
d = length(toWorld(anchorPoint),C.toWorld([0,0,0]));
linear(d,startFade,endFade,100,0)I’m not sure what it would be if you mean something else.
Dan
-
Franky Torres
October 13, 2007 at 10:22 pmhow about if the camera is in another comp and I am collapsing transformations?
-
Dan Ebberts
October 13, 2007 at 10:32 pmI think you’d just change the first line to this:
C =comp(“your outer comp name goes here”).activeCamera;
Dan
-
Franky Torres
October 13, 2007 at 10:44 pmthis doesn’t seem to be operating correctly…can you explain the parameters?
-
Franky Torres
October 13, 2007 at 10:55 pmhey dan,
it is fading in and out…I apoloigze for not explain clearly. The camera is flying by an image tunnel…and I need them to slowly fade away as they get further from the camera. But currently, they are fading based on distance…so when they are infront of the camera they are also fading…I need to eliminate this effect. understand? I apologize if I am not clear. -
Ariel Levental
October 14, 2007 at 5:53 amnot that i can shed a new light on this situation…
but it wouldn’t kill ya to add a “Please” or a “Thank you” somewhere in the post.
all this “i need” stuff doesn’t come off too polite… -
Dan Ebberts
October 14, 2007 at 6:41 pmSorry, you lost me. I’m sure there’s a soulution – I’m just not sure what the problem is. 🙂
Dan
-
Franky Torres
October 14, 2007 at 7:06 pmpoint taken…thanks for the advice…although, adding tone to emails and forum post is a dangerous practice…what you interpeted as unpolietness was really deep confusion.
-
Franky Torres
October 14, 2007 at 8:09 pmFirst I want to take a minue and say thanks for all the help…
so the issue is that the opacity of the layers is not stayig at 100% behind the camera. what it is doing is starting at 0 rising to 100, only for a frame and then dropping back down to 0.
Example:
layer 1 is at postion -300 z, behind the camera (at this position it is 0% opacity)), when it reaches pos 0, it becomes 100% opacity. then when it reaches pos 300 it is at 0 opacity again. Basically what I am trying to do is have it at 100% opacity until position 0 then dissolve away. The positions I put in this example are abritrary, and not exactly relavant to the actually composition, because there are so many layers and they all have different positions that the camera flys by.
I have built 7 comps, each with about 100 layers, all the layers are in different places in z space. I brought these 7 comps into another comp, collapsed thir transformation (to maintain their z space), offset them and flew a camera through them. Creating a tunnel of images.
I hope this better explains my situation and delimea. What do you think?
-
Dan Ebberts
October 14, 2007 at 8:47 pmWhat you descibed (I think) covers layers on the camera’s z axis. What about layers that are off axis? What determines their opacity – distance from the camera, distance from the camera’s z-plane, or ?
Dan
Reply to this Discussion! Login or Sign Up