AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sun May 19, 2013 12:29 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Stereoscopic Plugins or Scripts around?
PostPosted: Wed Apr 29, 2009 3:00 am 
Offline

Joined: Tue Apr 28, 2009 8:11 am
Posts: 13
Hi all,
are there any stereoscopic plugins or scripts for AFX?
What I'd like to have is something which applies any effect and adjustment settings to two comps in realtime.
More detailed:
I have two comps. One called "L" and one called "R". When I add a Layer, Effect, mask, etc to one of these comps, it should do exactly the same for the other comp.
And on top of this: if I adjust a single setting, it should be adjusted in the other comp accordingly - realtime would be nice (by "realtime" I mean, that when adjusting i.e. a colorcorrector in one comp, it should adjust the according colorcorrector in the other comp before I release the mousebutton).
I know, that one could use expressions. But one has to set it up for each parameter (or is there a handy script which would do it automatically)?

A helpful thing (and probably quite easy to write) would be a script which duplicates the current comp and replaces all footage ending with "_L" with footage which ends with "_R" (oups... sound strange... did you get that? What I mean: just replace "tralala_L.jpg" with "tralala_R.jpg" in the duplicated comp - that's all).

Any help would be much appreciated.
Thanks!
Uli


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Wed Apr 29, 2009 5:01 am 
Offline

Joined: Tue Feb 03, 2009 6:30 pm
Posts: 84
Location: Paris - France
As far as i know, there is now way to have 2 comp windows updating real time. Only one will be RT and the other will update when button is released.

_________________
Sébastien
http://www.yenaphe.info


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Wed Apr 29, 2009 5:21 am 
Offline

Joined: Tue Apr 28, 2009 8:11 am
Posts: 13
Thanks for the reply, Sebastien.
No good news, but it brings me a step further.

Realtime is not necessarily a must. Would have been nice - but anyway: something which does the tasks even NOT in realtime would make my life much easier.

More hints/suggestions?
Thanks
Uli


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Wed Apr 29, 2009 2:58 pm 
Offline

Joined: Fri Dec 07, 2007 10:11 am
Posts: 128
There are actualy better approaches to stereoscopy in AE, in case you are building your 3d scenes in AE, other than duplicating everything twice. A better approach would be to make ONE comp that will include your 3d scene, and then insert it into 2 comps as a 3d layer ("L comp" & "R comp" where you will have L/R cameras accordingly) with Collapse Transformation switch turned on for that layer. This way you will have your entire scene in both L & R comps as full 3d (and not 2d) and look at it from any desired angle by locating the cameras wherever you want. This way and you will be able to change your scene only in one comp, and everything will be updated automatically in both the L & R comps.

Koby.


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Thu Apr 30, 2009 3:21 am 
Offline

Joined: Tue Apr 28, 2009 8:11 am
Posts: 13
Thanks for the reply, kobyg.
Unfortunately we are buidling the scenes in Max - and there is no way around that. We are talking about complex 3d animation - not just titles or things you can achieve in AFX.
But since I hardly know AFX at all, I'm happy you've pointed that out.
Thanks
Uli


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Thu Apr 30, 2009 9:14 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 645
Location: London, UK
ulikilian wrote:
A helpful thing (and probably quite easy to write) would be a script which duplicates the current comp and replaces all footage ending with "_L" with footage which ends with "_R" (oups... sound strange... did you get that? What I mean: just replace "tralala_L.jpg" with "tralala_R.jpg" in the duplicated comp - that's all).

Any help would be much appreciated.
Thanks!
Uli

Try this. It expects that the matching _R footage has been imported into the project.
Code:
{
   // this script duplicates the currently selected comp and replaces any footage
   // thats name contains "_L" with matching footage containg "_R"
   
   var charIndex, newName;
   var activeItem = app.project.activeItem;
   
   // make sure a comp is selected
   if (activeItem != null && activeItem instanceof CompItem) {
      
      // duplicate the comp
      var newComp = activeItem.duplicate();
      
      // loop through layers in dupe comp, looking for footage source that contains "_L"
      for (var x=1; x <= newComp.layers.length; x++) {
         if (newComp.layer(x).source.name.indexOf("_L") != -1) {
            
            // work out name for "_R" footage
            charIndex = newComp.layer(x).source.name.indexOf("_L")
            newName = newComp.layer(x).source.name.substring(0,charIndex);
            newName += "_R";
            newName += newComp.layer(x).source.name.substring(charIndex+2, newComp.layer(x).source.name.length);
            
            // loop through all project items looking for matching footage names
            for (y = 1; y <= app.project.items.length; y++) {

               // replace the layer
               if (app.project.item(y).name == newName && app.project.item(y) instanceof FootageItem) {            
                  newComp.layer(x).replaceSource(app.project.item(y), true);
               }
            }      
         }
      }
   }
}


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Thu Apr 30, 2009 9:56 am 
Offline

Joined: Tue Apr 28, 2009 8:11 am
Posts: 13
Hi Paul, thank you very much for your effort!
First I've opened it with quite a simple AEP and it said "Unable to execute script at line 16. undefined is not an object". I figured out that happend because of a light layer. But without the light it worked like a charm! :-)
I will try to take this as a starting point.

Thanks a lot!
Uli


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Thu Apr 30, 2009 10:16 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 645
Location: London, UK
Try this one:
Code:
{
   // this script duplicates the currently selected comp and replaces any footage
   // thats name contains "_L" with matching footage containg "_R"
   
   var charIndex, newName;
   var activeItem = app.project.activeItem;
   
   // make sure a comp is selected
   if (activeItem != null && activeItem instanceof CompItem) {
      
      // duplicate the comp
      var newComp = activeItem.duplicate();
      
      // loop through layers in dupe comp, looking for footage source that contains "_L"
      for (var x=1; x <= newComp.layers.length; x++) {
         if (newComp.layer(x) instanceof AVLayer && newComp.layer(x).source.name.indexOf("_L") != -1) {
            
            // work out name for "_R" footage
            charIndex = newComp.layer(x).source.name.indexOf("_L")
            newName = newComp.layer(x).source.name.substring(0,charIndex);
            newName += "_R";
            newName += newComp.layer(x).source.name.substring(charIndex+2, newComp.layer(x).source.name.length);
            
            // loop through all project items looking for matching footage names
            for (y = 1; y <= app.project.items.length; y++) {

               // replace the layer
               if (app.project.item(y).name == newName && app.project.item(y) instanceof FootageItem) {            
                  newComp.layer(x).replaceSource(app.project.item(y), true);
               }
            }      
         }
      }
   }
}


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Thu Apr 30, 2009 10:43 am 
Offline

Joined: Tue Apr 28, 2009 8:11 am
Posts: 13
Super - that did the trick!
Next step would be to import the footage via script as well. So that one doesn't have to import it manually.
The footage has always this pattern:
Left:
"z:\dir\subdir\maybeanothersubdir\shotname\L\shotname_L_0000.tga"
Right:
"z:\dir\subdir\maybeanothersubdir\shotname\R\shotname_R_0000.tga"

so two "_L" have to be replaced.
I will try to do that tomorrow. I'm not familiar with the adobe scripting language - but quite familiar with scripting in general. Hope I will manage to do it fairly quickly.
I'll post the script when it's done.

Again: thanks a lot, Paul!!!
Uli


Top
 Profile  
 
 Post subject: Re: Stereoscopic Plugins or Scripts around?
PostPosted: Fri May 01, 2009 5:57 am 
Offline

Joined: Tue Apr 28, 2009 8:11 am
Posts: 13
oups - won't be able to do it today. And I'm away next week :shock:
sorry for the rash promise....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group