Page 3 of 6

Re: AE to C4D

Posted: February 16th, 2009, 10:13 am
by tinleelow
Any one know if this can be used along with Andrew Kramer's SureTarget preset?

Re: AE to C4D

Posted: February 18th, 2009, 1:25 pm
by Paul Tuersley
I haven't used SureTarget, but it appears to require parenting the camera to a null and this script doesn't export parented layers.

It's not out of the question to implement it though. For example you may be able to use toWorld() expressions to create a second unparented camera that matches the movement of the main camera. Then you could export this second camera to C4D.

Or I could implement that method as part of the script, meaning it would be possible to export parented layers in general.

Paul

Re: AE to C4D

Posted: February 18th, 2009, 7:02 pm
by Yenaphe
How would you "parent" a camera with ToWorld ?

I'm very unfamiliar with this.

Re: AE to C4D

Posted: February 24th, 2009, 2:14 pm
by Paul Tuersley
Yenaphe wrote:How would you "parent" a camera with ToWorld ?

I'm very unfamiliar with this.
I'm suggesting it may be possible to use expressions on a new camera to link its position and rotation to the parented camera. Then you could export the new unparented camera to C4D.

But I don't know the exact expressions required, or even if it's possible. This sounds like a question for Dan Ebberts.

Re: AE to C4D

Posted: February 24th, 2009, 5:24 pm
by Dan Ebberts
I think these expressions for the second camera will do the trick:

Code: Select all

//  position

C = thisComp.layer("Camera 1");
C.toWorld([0,0,0])


// point of interest

C = thisComp.layer("Camera 1");
C.toWorld(C.pointOfInterest)



// orientation

C = thisComp.layer("Camera 1");
u = C.toWorldVec([1,0,0]);
v = C.toWorldVec([0,1,0]);
w = C.toWorldVec([0,0,1]);

sinb = clamp(w[0],-1,1);
b = Math.asin(sinb);
cosb = Math.cos(b);
if (Math.abs(cosb) > .0005){
  c = -Math.atan2(v[0],u[0]);
  a = -Math.atan2(w[1],w[2]);
}else{
  a = Math.atan2(u[1],v[1]);
  c = 0;
}
[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]


Dan

Re: AE to C4D

Posted: March 21st, 2009, 1:29 pm
by c_wall
Question for Dan...

First my props. Paul, Dan you amaze me. I am sooooo grateful. Please give me an opportunity to buy something from you guys. I feel like I'm stealing! I would happily pay for some of these scripts or expressions.

I do have a follow-up question.

I was trying to use a second camera that was tied with expressions to the first parented camera--as has been discussed here. It seemed to *almost* work but not quite.

Dan's script was working some magic but maybe needed one tweek to complete the mission. The camera orientation/rotation isn't transfering over properly.

I am wondering if it would work if Dan changed the code that currently operates on the orientation and rewrite it for the rotation. I think Paul's script doesn't work with camera orientation--only the camera rotation.

I'd love to see a solution because Andrew Kramer's SureTarget is sweet.

Thanks again!

Re: AE to C4D

Posted: March 29th, 2009, 5:24 am
by pdeb
Would this be what you're looking for:
http://www.aenhancers.com/viewtopic.php ... hilit=bake

seems to bake out rotation for a camera with sure target applied,
pdeb

Re: AE to C4D

Posted: May 6th, 2009, 3:33 pm
by zold
[Edit: Oops, a multiplier needs to be added to convert the zoom into focal length ... ]

Hi Paul. I hope you're doing well.
The lack of zoom translation for this system is a bit of a killer, isn't it?
One possible kludge might be to do this (I've only just begun to get my head around C4D scripting):
1) include the zoom values in the jsx script (and hope that C4D gets around to making this "focal length" property work at some point via C.O.F.F.E.E.)
2) on the CSC side, make a null called something like "zoomKeys"
3) as the script builds the camera and nulls, it also adds keys to this 'zoomKeys' null that have the zoom values as COFFEE-accessible key values, like z position values, so that a focal length of 43.5 would be placed into the zoomKeys' position as [0, 0, 43.5].
4) when the script is done, in C4D, the user simply copies the keys of the zoomKeys z axis and pastes them into the "Focal Length" camera property in the timeline (this does work).

It's a funky kludge, but its much better than having to do this by hand.

Of course, one may kludge this already by making a null in AE, expression-linking the z axis to the zoom, exporting to C4D, importing in C4D, copying z axis in C4D, pasting to camera's Focal Length.

p.s. great work as always, PT

Re: AE to C4D

Posted: May 23rd, 2009, 8:43 pm
by Navstar
Is this compatible with CS4? I'm getting a "T1P: ATM Parse Error 83:2" at launch.

Re: AE to C4D

Posted: May 24th, 2009, 1:29 am
by Paul Tuersley
I just tried doing an export from AE CS4 and it worked ok. Are you sure that's an AE error? It doesn't sound like it. Maybe it's a Cinema 4D error?

Re: AE to C4D

Posted: May 24th, 2009, 5:52 pm
by zold
Sounds like an AE error, but not related (or possibly strangely related) to the scripting environment. I'm assuming when you say 'launch', you mean the launch of AE. I have seen errors on the web with ATM parse error relating to, not surprisingly, font issues (Adobe Type Manager). So in order to diagnose, it would help to know what else has changed recently in your CS4 installation and font management installation (or perhaps, not changed, as in needing updating).

-cg

Re: AE to C4D

Posted: May 24th, 2009, 9:08 pm
by Navstar
Well, a good system restart magically fixed it. Seems to be working fine with CS4.

Re: AE to C4D

Posted: August 6th, 2009, 2:38 am
by ill-stronzo
hey there,
i'm experiencing some problems exporting the camera-data from AE CS4.
it tells me, there is a problem in line 51, "null" is no object.
i'm not shure, but i guess, it is because i use a german version of AE.
i encountered some problems before, where some lines in the expressions wouldn't work because of not-translations.
any ideas as to what i can do?
thanks,
ill

Re: AE to C4D

Posted: September 25th, 2009, 9:32 am
by imynderup
Great set of scripts!

Have a couple of questions though. Why is it, that when I bring the camera data into C4D, the camera is offset to the right and down quite a ways from the origin of the grid in C4D? Is there a trick to somehow line it up in AE so it translates properly when brought into C4D?

Thanks for this great resource.

Ian

Re: AE to C4D

Posted: September 27th, 2009, 12:41 pm
by Paul Tuersley
Hi Ian,

I guess this is due to the fact that 0,0 co-ordinates in After Effects are at the top left of the composition, with the center values being half the comp height/width. It would be pretty easy for me to change the script to compensate for that.

Paul