FORUMS: list search recent posts

L/R Simultaneous adjustment expressions for Stereoscopic compositing?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matt Faw
L/R Simultaneous adjustment expressions for Stereoscopic compositing?
on Oct 3, 2012 at 6:34:33 pm

Dear all,

I am brand new to expressions, and relatively new to stereoscopic compositing. I am mostly generating my stereo material in 3DS Max, and finishing in AE CS 5.5, using the built-in stereo rig. In order to reduce ghosting, I usually output elements from Max in several passes, based on depth, and then I align each pass separately in one stereo rig in AE. Because each layer has its own alignment, I cannot use the overall convergence slider, within the "3D Glasses" filter, but need to perform all horizontal position transforms, layer by layer. To complicate things, I have to adjust one eye's horizontal position, until the alignment is correct, then go back and divide that offset by 2, and finally adjust the other eye by the opposite offset. If I am keyframing my horizontal position, then I have to do the math for each and every keyframe.

I have been scouring the web for an expression or script to simplify my AE workflow; so far, to no avail. What I'm seeking is as follows:

Before I add my L/R footage to my L/R comps, I'd like to indicate that it should be a linked pair. From then on out, whenever I adjust the horizontal position in the left eye, the right eye version should simultaneously adjust, by the equal-but-opposite amount. Then, for every other transform but horizontal position (like scale, rotation, vertical or Z-space position, perhaps even filters) the slider should effect both layers, within their respective comps, equally. Keyframes created in one eye should automatically be generated in the other, etc. This should allow me to make my adjustments while looking at the final comp, and while adjusting layers in only one eye, greatly simplifying the current byzantine workflow.

If anyone knows of an existing expression (or easy work-around) for this workflow, I'd love to hear it. Or if someone has some suggestions as to how to start creating my own expression to deal with this, I'd very much appreciate it.

Thanks!

Matt Faw
Consciousness 3D


Return to posts index

Dan Ebberts
Re: L/R Simultaneous adjustment expressions for Stereoscopic compositing?
on Oct 3, 2012 at 9:02:57 pm

What you're describing might be difficult. When you say "adjust the horizontal position in the left eye" it doesn't sound like you're talking about keyframing that motion, rather just changing the static position. If so, the expression on the other eye has no way of knowing where the left eye was before you moved it. Unless... you can establish some kind of reference point so you can set up an expression for the right eye that says "keep me as far to the right of the reference point as the left eye is to the left of it". Something like that. In any case, that's not something you can set up before you create the layers (unless you possibly save it off as a preset).

You might actually need a script that you run when you're finished stting up the left eye and it sets up the right eye to match. Scripting has a tougher learning curve than expressions, but you might end up with a time-saving tool.

Dan



Return to posts index

Matt Faw
Re: L/R Simultaneous adjustment expressions for Stereoscopic compositing?
on Oct 3, 2012 at 11:08:36 pm

Hi Dan,

Thanks a lot for your reply.

Let me try to fill in some missing details:

1. I'm working in 1920X1080, so 3DS Max outputs files that are centered at 960 pixels. So, when I am adjusting the left eye, I am moving it a certain number of pixels, +/- offset from 960, and the right eye, the equal number of pixels on the other side of 960. In my current workflow, I align the left eye layer, calculate the offset from 960, halve it, and apply that difference, either +/-, to my left and right eye layer. I'd rather have one slider that moves each eye's layer 1/2 pixel, in opposite directions. The 960 pixel mark is a perfectly usable reference point.

2. When subjects change their depth (e.g. during a 3DS camera move), then the convergence often changes, so I need to keyframe the alignment. This is especially true of the talent I've shot in front of greenscreen, and inserted into my 3DS environment. Since they are not true 3D (in the CGI sense), but are two stereo bitmaps, their alignment is usually significantly different than that of the environment I place them in, and keyframing becomes especially necessary.

I don't mind if the solution is in the form of an expression or a script. But if I adjust the left eye, and then apply the script, it has to not only adjust the right eye to match, but also systematically adjust all the left eye horizontal positions, as well, so both eyes are centered at 960 pixels. If I only adjust the left eye and leave the right eye alone, then there is a big gap to one side of the screen, which I can't afford, because stereo already eats up so much territory on either side of the screen (from the act of HIT/converging).

Perhaps, instead of some master script or expression that keeps all adjustments in tandem, I could survive on just an expression (preferably tied to a slider that I could put in the Stereo View effects pane), which merely adjusted the L/R horizontal position, +/- 1/2 pixel each per increment. Then I could probably keep that expression in a text file, and copy it in, whenever necessary. Likewise, I could have a separate expression for moving things in unison, whenever I need to rescale, etc. a layer in both views.

Thanks again, and I hope this makes sense.

best,

matt faw


Return to posts index


Dan Ebberts
Re: L/R Simultaneous adjustment expressions for Stereoscopic compositing?
on Oct 4, 2012 at 12:55:45 am

Just as an example, suppose your left and right layers have the same name except that the left one ends in "_L" and the right one ends in "_R". A position expression like this for the right layer will find the corresponding left layer and position itself symmetrically across the vertical centerline of the comp:

P = thisComp.layer(name.substr(0,name.length-2)+"_L").transform.position;
[thisComp.width-P[0],P[1]]


Dan



Return to posts index

Josh Wallace
Re: L/R Simultaneous adjustment expressions for Stereoscopic compositing?
on Nov 28, 2012 at 5:55:31 pm

Hi Matt and Dan,

I'm trying to do a very similar thing with some stereoscopic footage.

Tried Dan's expression and works a treat!

Thanks,

Josh


Return to posts index

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