ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

3D camera moves on a 2D layer

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shaun Harrison3D camera moves on a 2D layer
by on Aug 24, 2010 at 1:04:32 pm

Hi All,

Hope someone can help me with this one.

I have a composition in AE CS3 in which the only thing that animates is the camera, so all layers are 3D enabled. I need to simplify and deliver the composition to a client as a 2D composition, so I have rendered out the animation and created a whole new composition with just the rendered video in it.

One of the initial 3D layers needs to live in the 2D composition but I can not bring the camera with it, and it can no long be 3D, so obviously it won't move. Is it possible to bake in the movement of the camera into the single layer, therefore creating keyframes in the layers position and scale attributes (rotation isn't an issue)?

Ultimately the layer needs to move as if it's part of the rendered background but leave the client the ability to change this layer as needed.

I have tried tracking, but it's not very stable and seems a shame to have to do this when I have access to the actual created camera movement data.

Hope that makes sense, any questions please ask, and thank you loads in advance for your help!

Many Thanks
Shaun Harrison


Return to posts index

Michael SzalapskiRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 1:12:55 pm

I really don't understand why the client needs to have a 2d composition.
Here's a thought: render out your comp, but not your changeable layer.
(Don't forget to save a copy of your project.)
Put the changeable image in a precomp.
Delete everything in the main comp except the camera (and any nulls used for its movement).
Place the changeable image precomp in the main comp along with the 2d comp (as a 2d layer). That way the client can change the image in the precomp and have it match the 3d motion perfectly.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.


Return to posts index

Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 1:22:04 pm

Hi Michael,

Thank you for your quick response and your suggestion.

The finished project file is ultimately being used in an automated system. The system has been built to only understand 2D transform data and track mattes.

So, though your suggestion is very cunning, there can be no 3D compositions or layers within the delivered project file. I probably should have clarified it as 'project file' as apposed to focusing on 'composition'.

Thanks again, I'm hoping someone has some magic copy & paste solution!

Many Thanks
Shaun Harrison.

Many thanks
Shaun Harrison
http://www.pictopictures.com
http://vimeo.com/user1362174/videos
Editing/VFX/Animation/Motion Graphics/Colour Correction


Return to posts index


Walter SoykaRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 2:32:04 pm

[Shaun Harrison] "I have tried tracking, but it's not very stable and seems a shame to have to do this when I have access to the actual created camera movement data."

I would have guessed that tracking would be the quickest way to go from 3D to 2D. It might be easier to replace the actual footage with something easier to track (maybe flat color fields or grids ?) and use Mocha instead of AE's built-in pixel tracker.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 2:35:58 pm

Hi Walter,

Thank you for your reply.

I think you're probably right... times like this I wish I'd bought CS5... hopefully the next job can fund it.

Many Thanks
Shaun Harrison

Many thanks
Shaun Harrison
http://www.pictopictures.com
http://vimeo.com/user1362174/videos
Editing/VFX/Animation/Motion Graphics/Colour Correction


Return to posts index

Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 4:36:52 pm

Hi,

OK, so I've managed to manually match the position that's not an issue. The composition actually only has three keyframes/movements, but the problem I'm having is matching the scale of the layer to the camera z-space movement.

I know there's a science behind the position being spatial and the scale being temporal. What I'm getting is that the layer is scaling up too fast therefore not matching the smooth movement of the background. I have tried playing with the keyframe handles in the graph editor, but I still end up with a slight jerky movement.

Is there some math that can be done to convert the cameras z-space position into what the layers scale property should be? I'm happy to keyframe every frame to achieve the result.

Many Thanks
Shaun Harrison


Return to posts index


Chris WrightRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 8:39:21 pm

to link the z-position to the alt click image scale simply:

g1 = (toWorld(anchorPoint) - thisComp.activeCamera.toWorld([0,0,0]));
g2 = thisComp.activeCamera.toWorldVec([0,0,1]);
find = dot(g1,g2)

value*(find/100)

the camera is at z=100

http://technicolorsoftware.hostzi.com/


Return to posts index

Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 10:43:58 pm

Hi Chris,

Thank you for your message.

I'm not big on expressions, which field or fields should this expression be added to? Have tried the position and the scale attributes of the layer that needs manipulating, to no avail.

Many Thanks
Shaun Harrison

Many thanks
Shaun Harrison
http://www.pictopictures.com
http://vimeo.com/user1362174/videos
Editing/VFX/Animation/Motion Graphics/Colour Correction


Return to posts index

Chris WrightRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 10:50:08 pm

I don't know what you're doing wrong. I tested it with a layer scale and a camera and it works perfectly. You just paste into the scale property.

http://technicolorsoftware.hostzi.com/


Return to posts index


Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 11:00:35 pm

Hi Chris,

I didn\'t realise that \'the camera is at z=100 \' was not part of the expression, and though it seems to work, it seems to be doing the opposite where the image scales up as the camera moves back. Could be because I\'m moving in negative z-space?

Thanks in advance for your help.

Many Thanks
Shaun Harrison

Many thanks
Shaun Harrison
http://www.pictopictures.com
http://vimeo.com/user1362174/videos
Editing/VFX/Animation/Motion Graphics/Colour Correction


Return to posts index

Chris WrightRe: 3D camera moves on a 2D layer
by on Aug 24, 2010 at 11:30:03 pm

yay! now just make the expression have a - negative sign where you need it to be.

http://technicolorsoftware.hostzi.com/


Return to posts index

Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 25, 2010 at 10:27:54 am

Hi Chris,

Thank you for all your help, I can feel this getting very close.

I noted that I needed to change 'value*(find/100)' to 'value/(find/100)' otherwise the image scales the wrong way.

It's close, but not perfect, here is the result:
https://files.me.com/pictopictures/q0f8pl.mov

Does the expression need to know the position of the photo frame on which the layer should be attached?

Thanks again
Shaun Harrison


Return to posts index


Chris WrightRe: 3D camera moves on a 2D layer
by on Aug 25, 2010 at 8:05:32 pm

oh, I didn't know you were scaling opposite, You're on the right track. Now to simply get your scaler multiplier, put effect, expression control, then use this instead. Set it to the required scaler. And I also noticed that you have a position problem in your frame where it doesn't have equal distance on the left/right sides. You should use expressions for that too.

value/(find/effect("Slider Control")("Slider"))

http://technicolorsoftware.hostzi.com/


Return to posts index

Shaun HarrisonRe: 3D camera moves on a 2D layer
by on Aug 26, 2010 at 8:36:17 am

Thanks Chris, you've saved my life!

Many Thanks
Shaun Harrison

Many thanks
Shaun Harrison
http://www.pictopictures.com
http://vimeo.com/user1362174/videos
Editing/VFX/Animation/Motion Graphics/Colour Correction


Return to posts index

Chris WrightRe: 3D camera moves on a 2D layer
by on Aug 26, 2010 at 9:23:46 am

Glad I could help. Enjoy the rest of the website!

http://technicolorsoftware.hostzi.com/


Return to posts index

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