Expressions/Scripts/Presets

Moderator: Paul Tuersley

 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: AE to C4D

Thu Dec 16, 2010 4:32 am

Hi Daniel,

I saw your post over on the Cow (I don't have an account there) and wondered why you didn't ask me direct. I have to say, I'd rather you hadn't posted the direct download link for the script on there.

Are you running the script on Win or Mac? Normally, if you write to a file on Win the text file will open on there fine, although not if you write on Mac but open in Win. But with my script I seem to remember that I am doing specific things to ensure C4D can read the text file, even though this is at the expense of the line returns being messed up on Win, so that may be adding to the confusion.

You could try experimenting with a basic script like this to see if you get the same result:
{
   var theFile = new File (Folder.myDocuments.absoluteURI + "/test.txt");
   theFile = theFile.saveDlg("Save test file.");
   
   if (theFile != null) {      
      theFile.open("w","TEXT","????");      
      theFile.writeln("test");
      theFile.writeln("test");
      theFile.writeln("test");      
      theFile.close();
   }
}

You could also start a new post in the Scripts Discussions section, using something like the test script above as the starting point (not my script), with a question like "Text file line returns on Windows" to see if anyone else has any experience with this issue.
 
dcrooks
Posts: 8
Joined: Tue Dec 14, 2010 9:13 pm

Re: AE to C4D

Thu Dec 16, 2010 2:37 pm

hi Paul

jeepers, sorry for posting the download link, I didn't think. I'll edit my post as soon as i can get back into my cow account.
and yeah I was intending to ask here first but it took a day for my registration to go through... more apologies for impatience.

I'm running the script on a mac. I have tried pretty much everything I can possibly think of including
lineFeed = "Unix", "unix", etc
encoding = "CP1252", "UTF-8"
as well as inserting characters into the string \r, \n, \r\n, \n\r, \f, \u000A, \u000D

all of which have exactly the same effect, works fine in TextEdit and everything else mac, but only single long line with odd character in Notepad. I did read somewhere that Notepad is one of the few apps that can't detect alternative newlines but I'm sending the data to a micro-controller which is just as particular so it's actually kind of handy to test with.

anyway thanks for the time and sorry again for the lack of etiquette.

cheers../daniel
 
notAPyr0
Posts: 1
Joined: Mon Mar 28, 2011 11:56 am

Re: AE to C4D

Mon May 09, 2011 10:50 am

Any one figure out a good work flow for going from Mocha to AE to C4d? Trying to figure out how to get the null information into the camera animation. For now I put the tracking animation onto a solid and a static camera, but the scale keyframes aren't importing to give the z-space movement illusion.
 
editboy23
Posts: 1
Joined: Tue Aug 02, 2011 1:50 pm

Re: AE to C4D

Wed Aug 03, 2011 11:29 am

aaaaargh, this is so frustrating! I've motion tracked with cameratracker, exported from ae, imported to cinema but I can't pin it down successfully. I've tried the tricks, matching the camera focal length, exporting null objects (which show up somewhere weird in c4d). My text that i rendered in cinema won't match so it's 'drifting' and i've been fooling with it for hours now.
It's a great script, I just can't get it to work successfully
 
foylyndstrom
Posts: 6
Joined: Sat Sep 10, 2011 4:44 pm

Re: AE to C4D

Mon Sep 12, 2011 2:35 pm

editboy23 wrote:
aaaaargh, this is so frustrating! I've motion tracked with cameratracker, exported from ae, imported to cinema but I can't pin it down successfully. I've tried the tricks, matching the camera focal length, exporting null objects (which show up somewhere weird in c4d). My text that i rendered in cinema won't match so it's 'drifting' and i've been fooling with it for hours now.
It's a great script, I just can't get it to work successfully


I'm having the same exact problem. I've done several tracks in AE (CS5.5) and imported them into C4D (R12 - I'll be testing it with R13 this weekend), and it never sticks. I;ve seen another solution involving some Xpresso nodes that read off of an Excel spreadsheet filled with motion points you manually export & copy paste from AE, but I honestly don't have the time to try that out; plus, that blog post was written in 2007, so it's quite outdated.

If anyone has another solution out there, please let me know. Honestly, it's really too bad that Maxon hasn't developed it's own plug-in for this end of the AE/C4D workflow.
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: AE to C4D

Mon Sep 12, 2011 3:42 pm

I can assure you that it does work. editboy23 did get it working with my help off list.

One thing is that AEtoC4D doesn't currently export FOV so you need to set this manually in C4D. Create some 3D nulls and position them in the corners of your comp in AE on the first frame. You can use these as reference to correct the FOV once you've imported it into C4D.

Another thing is to make sure you export reference nulls at the positions you want to place your objects in C4D. The scales can be quite different between AE and C4D, so it's important to have some reference for this.

Let me know how you get on.
 
foylyndstrom
Posts: 6
Joined: Sat Sep 10, 2011 4:44 pm

Re: AE to C4D

Tue Sep 13, 2011 6:05 am

Thank you so much for your prompt reply - I will definitely investigate this over the weekend and report back.

My hope is that once I get the entire workflow down pat, I can create a video tutorial for those people trying to do the same thing.
 
foylyndstrom
Posts: 6
Joined: Sat Sep 10, 2011 4:44 pm

Re: AE to C4D

Sun Sep 18, 2011 2:16 pm

Update: The nulls in the corner worked successfully. I still had/have quite a bit of slipping, and right now I'm trying to figure out if that slipping originated in AE or in C4D. It's my first time tracking a shot, and it's a tricky tracking shot to begin with as the camera moves about 270 degrees over 40 seconds of video (I wanted to start with a very difficult shot instead of a simple static camera setup; if I am able to successfully track this shot, than most other difficult tracking shots won't be too hard.) If I have any more trouble I'll let you know.

Thanks for the help!
 
foylyndstrom
Posts: 6
Joined: Sat Sep 10, 2011 4:44 pm

Re: AE to C4D

Thu Sep 22, 2011 1:17 pm

Result: http://www.youtube.com/watch?v=w1DN5Mfi ... r_embedded

Thanks for the help; this is a skill I'm definitely looking improve on.
 
D4effects
Posts: 6
Joined: Fri Sep 23, 2011 6:06 am

Re: AE to C4D

Fri Sep 23, 2011 10:47 am

Hellos ppls, fist off I would like to relay a cyber hug to Paul for this amazing script!!!

I am trying to accomplish the same foylyndstrom, and it almost looks like we're having the same issues, that looked like a good test but it was a little jumpy just as mine is here :
[url]
http://www.youtube.com/watch?v=yuVE6z6_ ... re=related[/url]

I have never tracked anything so I am pretty wet behind the ears on the subject but I get the feeling that it's a fps issue? the footage I used was shot at 25 fps, I didn't realize this until I noticed my element being jumpy, the export from Cinema was 30fps so I figured that if I just render out my text element at 25 fps things would look good, but I was wrong.. here is my 25fps render:
[url]
http://www.youtube.com/watch?v=rxM6WdiD ... re=related[/url]

it now looks worse... so can anyone fill me in on what I am doing wrong / how to do it right?

much <3 from Canada, thanks! =)

also.. here is the initial track with just 2D elements:

http://www.youtube.com/watch?v=lulrvrRoz28

which goes to show that the initial track was good.
 
foylyndstrom
Posts: 6
Joined: Sat Sep 10, 2011 4:44 pm

Re: AE to C4D

Sat Sep 24, 2011 7:12 am

In the initial track video with the particular and the two pieces of text: what kind of corrections did you do in AE after the track/solve/create scene stage? Did you merely just add the elements to the scene in AE then export, or did you tweak the track by moving around the nulls? Because I had some issues with null tweaking - things seemed to get really janky really quick. My initial thought was that the errors stemmed from the fact that you had to un-parent the camera from the nulls before exporting to cinema, then re-parent the camera once again in Cinema. I know that the Camera Tracker plug-in uses the nulls in a unique fashion that I am not completely knowledgeable of, an I'm not sure how that is playing into it all. I'm also curious to know if there are any differences between the way that Cinema & After Effects treat parenting with nulls.

Also: Are these renders directly from Cinema, or did you just render out the text elements from Cinema, add them back to your scene in AE, then render out of AE? As I'm not sure exactly how Cinema treats/converts the frame rates of video elements used as textures.
 
D4effects
Posts: 6
Joined: Fri Sep 23, 2011 6:06 am

Re: AE to C4D

Sat Sep 24, 2011 8:06 am

After the track/solve/create scene I didn't do any sort of null corrections, I simply chose a few points in the scene and created nulls for them and exported the data to cinema, everything was unparentedm and yes, I just rendered out the 3D text element with an alpha channel and back into after effects for the final render. Should I be rendering out from cinema at a frame rate that matches the original clip even though it looks like I got a worse result?
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: AE to C4D

Sat Sep 24, 2011 9:10 am

Are you saying that despite your composition in After Effects being 25 fps, when you use AEtoC4D to export to C4D it creates a project that is 30 fps? That shouldn't happen.

There is an issue where C4D doesn't (or didn't) support non integer frame rates e.g. 29.97, where AEtoC4D rounds up to 30. The solution in that case is to leave it rendering out of C4D at 30fps, but then use File > Interpret Footage to change it back to 29.97 after importing the render back into After Effects.

Paul
 
D4effects
Posts: 6
Joined: Fri Sep 23, 2011 6:06 am

Re: AE to C4D

Sun Sep 25, 2011 8:36 am

Yes sir that's correct, I had to manually change the settings in c4D to get it to match the frame rate, but yeah I like the interpolate in AE idea =)
Hopefully I can get back at this tomorrow for a few more tests, thanks Paul!
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: AE to C4D

Sun Sep 25, 2011 11:59 am

It does appear that your 30 fps render from C4D is in sync, but there is a slight jump every 5 frames. This could simply be a result of having 30 fps footage in a 25 fps comp, but the mystery is why you're having to render out of C4D at 30 fps in the first place.

Can you double check that in After Effects the original 25 fps footage is in a 25 fps composition and that the Camera Tracker has generated keyframes at 25 fps? Then can you check that the exported text file's first line is "FrameRate,25". And after importing into C4D, check Edit > Project Settings to see if the Frame Rate is set to 25? Also, check the length of your sequence in After Effects in frames, and compare this to the frame range in C4D. And can you let me know what version of C4D you're using.

If you can send me your AE project, exported text file and C4D project, I'll take a look and see if I can figure out what's going on. Send it to paul.tuersley@btinternet.com

Paul

Who is online

Users browsing this forum: No registered users and 2 guests