FORUMS: list search recent posts

Lens Flare in 3D space

COW Forums : Adobe After Effects

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Bruno
Lens Flare in 3D space
on Jan 22, 2004 at 1:06:13 pm

Hi!

How to make correspond by expressions the position of a light in 3D, seen by a camera, to the position of an 2D effect lens flare (which would be added over in adjustment layer)??
In such way that the light move around to light 3D layers But also creates a lens flare which would follow its position.


Return to posts index

Chris Zwar
Re: Lens Flare in 3D space
on Jan 22, 2004 at 1:32:46 pm

I wondered this a few months ago, except I was wanting to put lens flares on Invigorator objects.

I ended up just making the lens flare a 3D layer too and parenting it to the source object. It worked fine for my situation.

If you have more demanding needs, then the knoll light factory set of plug-ins will track objects, and is well worth the price.

Chris Zwar
Entertainment Media


Return to posts index

Bruno
Re: Lens Flare in 3D space
on Jan 22, 2004 at 1:54:57 pm

Thank you!
but...
if i Parent the Layer, the lens flare will not act correctly with its luminous rounds which move according to the center of the lens.
To use knoll i need to create another composition and create inside a small solid, Parent of the light of the first comp. will function but i ll like to do that directly.

Aren't the "Layer Space Tranforms" functions in the expressions used for that?

(sorry fo my english)


Return to posts index


Dan Ebberts
Re: Lens Flare in 3D space
on Jan 22, 2004 at 2:27:45 pm

Yes, you should be able to do what you want with Layer Space Transforms.
What I'd do is create a null, make it 3D, and create an expression for the null's position that just sets it equal to the light's position. Then add this expression to the source point of your lens flare:

src=this_comp.layer("Null 1");
src.to_comp(src.anchor_point)

Tha should do it.

Dan



Return to posts index

Bruno
Re: Lens Flare in 3D space
on Jan 22, 2004 at 6:12:41 pm

wonderful!!!!!!!
Dan is the best

it's work fine, but i really don't understand how it goes....

where i can find some explanation about Layer Space Transforms?

thanks a lot


Return to posts index

Dan Ebberts
Re: Lens Flare in 3D space
on Jan 22, 2004 at 7:07:52 pm

Bruno,

As far as I know, there's not a lot of in-depth documentation on how the layer space transforms work.

I was typing up a little explanation of how the expression works when it occured to me that you don't need the null at all. This expression will work just as well:

this_comp.layer("Light 1").to_comp([0,0,0])

Let me explain what's going on here. What we're doing here is converting the coordinates of a point in the Light's layer space to coordinates in comp (or "view") space. To do that, we have to start with coordinates that are relative to the upper-left hand corner ([0,0,0]) of the layer's space.

For a normal layer, you would probably want to transform the center point of the layer. This will usually be the same as the anchor point. For example, if you have a 100x100 solid, the anchor point will be at [50,50], which is the center of the layer expressed relative to the upper-left corner of the layer. The anchor point (assuming you haven't moved it relative to the layer) will always give you the local coordinates of the center of the layer - even if the layer has a parent (which translates the layer's position into the parent's layer space). The point of all this is just to tell you to use the layer's anchor point, not it's position when translating from layer space to comp or world space.

OK - back to the problem at hand. Lights don't have an anchor point. But if they did, they would be at [0,0,0] because the light is just a point with no width, height, or depth. That's why the expression above works.

The reason that I used a null in the original solution and positioned it at the light was just to provide an anchor point at the correct location, but it turns out that wasn't necessary.

Dan


Return to posts index


Bruno
Re: Lens Flare in 3D space
on Jan 23, 2004 at 8:51:15 am

Great! I start to better understand.

Still of new posibilities to be explored in AE...

thank you Dan


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]