• Projection - After Effects
    Projection

    https://aescripts.com/projection/

    Projection makes light work of camera mapping onto 3D planes in After Effects. It was created with the release of After Effects CS6 in mind, which now has the 3D Camera Tracker, a built-in matchmover. But Projection works equally well with imported match-move data from programs such as Syntheyes, Boujou and PF Track.

  • Hi.
    I tried to test projection.
    But when I klick "Go" nothing happens.
    Could there be a problem with the trial version?
    I have OSX 10.7 and AE CS6. I tried it with the included Test-Project and with one of my own (1024x576)

    Thanks

    Markus
  • Hi,
    i work on CS5 and i have "The Foundry" as my tracking software.
    Will it work for me?

    Thanks
    Stefan
  • @ Markus Ziegler:  Without more details it is hard to say what the issue is.  Have you watched the Tutorials?  They are under the 'Videos' tab.
  • @ Stefan Hinze:  Yes, it will definitely work
  • Hi Ben,

    when will the announced "3D Rotation Pro" Script be available?

    Regards from Germany!

  • Hello!!! I'm looking for the 3D Rotation PRO too... will you make a bundle with all these tools?
    Illumination/Projection/3D Rotation
    Thanks for make our life easier! ;)
  • Hi Ben,

    when will the announced "3D Rotation Pro" Script be available?

    Regards from Germany!


  • I wanted to test this ... but ... I followed the workflow and I can't choose any layer to project on, I still see "none".
  • I downloaded the trial but it doesn't seem to work I keep getting errors "Unable to execute script at line 130. undefined is not an object"

    I followed your tutorial/demo once I get to the point where you select the layer solid that you want to project etc - it gives me that error.  I would buy this if it worked but I've tried several times to make it work to no avail.  I'm using CS6.
  • Hi.
    I tried to test projection.
    But when I klick "Go" nothing happens.
    Could there be a problem with the trial version?
    I have OSX 10.7 and AE CS6. I tried it with the included Test-Project and with one of my own (1024x576)

    Thanks

    Markus


    Hi Markus,

    Excuse the delay getting back to you. I've just discovered the new forum here. I'm signed up now though and should be able to respond straightaway!

    That's an unusual problem. I've just checked my latest build in Mac OSX 10.8 and CS6, without any problem. I have had reports of users finding that Projection clashes with certain other scripts. I haven't managed to get to the bottom of why just yet, since all variables are amply protected. But one thing you could try is running Projection with all other ScriptUI windows closed. If you find that is the problem, then please drop me a line and let me know which other script is causing the clash.

    There is also an error log file for Projection. You can find it here on Mac...

    ~Library/Application Support/Adobe/Adobe After Effects CSX/Compositors Friend/ErrorLog.txt


    Where ~ is your user folder. Note, your Library folder is hidden by default. The best way to look in it is to go to the Finder and from the dropdowns select Go.... whilst holding down the alt key. If you do find a file called ErrorLog.txt, please email it to me.


    Best,


    Ben.


  • Hi Ben,

    when will the announced "3D Rotation Pro" Script be available?

    Regards from Germany!

    Hi Peter,

    Es tut mir leid, dass ich mich erst jetzt bei dir zurueckmelde! :-)

    I have been rather inundated with work lately, so 3D Rotation Pro is on hold. I think in the meantime that Mathias has produced a similar script. I'm hoping to have the full 3D Rotation Pro suite finished early in 2013.

    Best,

    Ben.
  • Hello!!! I'm looking for the 3D Rotation PRO too... will you make a bundle with all these tools?
    Illumination/Projection/3D Rotation
    Thanks for make our life easier! ;)
    Hi Robinson,

    Yep... a bundle's not out of the question.

    Best,

    Ben.
  • I wanted to test this ... but ... I followed the workflow and I can't choose any layer to project on, I still see "none".
    Hi Milan,

    To be able to select a layer as a projection layer, it needs to be a footage layer that has the same dimensions as the active composition. Only layers that match these criteria will be available in the drop down list. 

    If you're sure you should have some active layers, but are getting none, one way to test that the script is still running and hasn't crashed is to click the "?" button in the top right corner of the UI. If the info box comes up, it's still running.

    If you're still having problems, I'd ask you in the first place to send me a copy of your project over... just the .aep file will do. Please let me know, operating system, Ae version and Ae language too. I'll see if I can replicate the problem.

    Also have a look and see if your Projection copy has generated an error log file. On Mac, this can be found at the following location... (if you're running Lion, see my message above about how to make the Library folder visible)

    ~Library/Application Support/Adobe/Adobe After Effects CSX/Compositors Friend/ErrorLog.txt


    ...and on Windows, it's here...


    C:\Documents and Settings\username\Application Data\Adobe\Adobe After Effects CSX\Compositors Friend\ErrorLog.txt

    If this file exists, send it through too.

    Best,

    Ben.


  • I downloaded the trial but it doesn't seem to work I keep getting errors "Unable to execute script at line 130. undefined is not an object"

    I followed your tutorial/demo once I get to the point where you select the layer solid that you want to project etc - it gives me that error.  I would buy this if it worked but I've tried several times to make it work to no avail.  I'm using CS6.
    That's an odd one.... a specific line error. I'm not able to replicate the error though, I'm afraid.

    Can you let me know which operating system you're working on and which language your Ae is in? Also, it'd be great to know which version of the script you are running. To find this out, click the "?" button in the top right of the Script UI and you'll see version information. Another important thing for me to know is the name of the layer that you had selected when the problem occurs.

    Best,

    Ben.

     
  • Ben,

    I'm running CS6 version 11.0.1.12 and BR_Projection_1.0x28 - the script won't run and displays the error message -  "Unable to execute script at line 130. undefined is not an object"
  • error log
    txt
    txt
    ErrorLog.txt
    3K
  • Ben,

    I'm running CS6 version 11.0.1.12 and BR_Projection_1.0x28 - the script won't run and displays the error message -  "Unable to execute script at line 130. undefined is not an object"
    Hi Adrian, 

    Thanks for the feedback and the error log. Another error at line 130! I haven't been able to replicate it so far. With the log file, hopefully we'll be able to get to the bottom of this.

    Can you drop me an email and let me know which platform you're using in which language and if you have any other scripts open when you get the error message.

    Best,

    Ben.


  • Hi Adrian,

    Update: I've got your language and platform details from the error log. (similar set up to me, except I'm on OSX 10.8.2 and CS6 11.02.11)

    I've isolated the exact point where the script goes wrong, but I'm rather stuck understanding why it should go wrong there and why it's not replicable on my very similar set up. I've made a small test file for you so we can hopefully get to the bottom of it. If you get in touch (ben (at) benrollason (dot) com), then I'll send it over to you.

    Best,

    Ben.
  • Adrian's problem solved... the error at line 130 is to do with a conflict with Mathias's OrientWorld script. The solution for the moment is to close down this (and possibly other of Mathias's scripts) while using Projection.

    When I get a chance I'll run it by Mathias and try and get to the bottom of the problem.
  • This script looks very cool and useful.  Just wondering if you could use it to accomplish effects similar to DigiEffects Camera Mapper, ie adding depth to still images.
  • Hi Ben,

    it seems that the problem that occurs when multiple scripts panels are running is not only your problem. I got a report that strange things happend when my script Locations.jsx was running together with elementary. After closing down all scripts and an AE restart everytinhg went fine. Did you find a solution for that problem?  
    would be great to hear from you. Write me here or at hello [at] fabiantheblind [dot] info 
    Cheers
    Fabian
     
  • Ben, is that error at line 130 situated in a for (var k in obj) loop by any chance?
  • @Fabian,

    I'm not sure what the problem is, but I haven't had time to really go deeply into it yet. I'll drop you a line though.
  • @Kevin,

    No, it's not that. What makes you think it might be that, though? You thinking a pesky invalidated object or something? :-)

  • @Ben Kevin helped me solve the problem. @Kevin thanks again. It was a for(var k in obj) loop used on an array. Kevin is using Array Prototype functions. So the for(var key in ARRAY) loop got messed up in my script (I've been reading a bit and it is considered bad programming to use this with Arrays because things like this can happen). 
    I managed to fix it using only for(var i = 0; i < array.length;i++) on Arrays and by encapsulating in associative loops with hasOwnProperty()  following this example at stackoveflow 
  • Hi Fabian,

    No, it's not that. I very often add an indexOf funtion to the Array prototype myself, so I rarely use a for x in Array to loop through an array
  • PS How are you writing the code in Courier?
  • Hi Ben. Thanks for the info. I'm also following the "scripts-incompatibilities" discussion. No need to reply here.
    Cheers
    Fabian
  • PS How are you writing the code in Courier?
    You can change the font in the Comment editor. Second group first tiny "T" :)
  • Hi Just wondering if I am missing something here ..but when I create a projection its always a fair bit softer than the original ??
    any thoughts on if I am doing something wrong
    using cs6 on a Mac
  • Hi John,

    What lens does your tracked camera show in After Effects? (FOV)

    There's a fundamental limitation in After Effects Classic 3D about the Shadow Map Resolution of a composition. This is rarely a problem for shadows, but for light projections, it's a different matter. There's a maximum of 4000 horizontal samples (so many more in 3D) and these are arranged in a hypothetical sphere around the projecting light. If you use a camera with a more telephoto lens, then it has a smaller angle of view and takes in less of the samples, so the longer the lens you use, the softer the projection will become. I've put in a feature request at Adobe for them to up this, as it's been the same since 3D was introduced and After Effects was a 32 bit program.

    However, for Projection, the vast majority of 3D tracked cameras use a wide angle lens - somewhere between 15mm and 50mm, because otherwise the camera wobble is too intense. With these lenses, and an HD composition, the softness that you see is manageable. At the 15mm end, there's minimal loss of quality, at the 50mm end, the softness is beginning to become rather apparent, but in many cases can still be brought into line perceptually with some sharpening. Beyond 50mm, it is noticeably softer and until Adobe turn the maximum Shadow Map resolution up, there's no real solution. It's not something you can workaround with clever comp sizes. The Shadow Map resolution is independent of the composition size. 

    I've been looking for a solution using Ray-traced, but so far I haven't been able to make light projections work in a ray-traced comp. I should get some time to have another look at it over Christmas.


  • By the way, I'll post a quick ray-traced fix for this over the weekend, but there are still some oddities I need to work out before I build it into the script.
  • Hi John,

    Update: Things too busy around Christmas and I'm still looking for a way to even out the diffuse light projection in Ray-traced mode. I'll have a look again after Christmas.

    In the meantime, you can set the Projection Base composition to Raytraced. Quality 3, Anti-Aliasing - None is fine. Then change the color of layer 3 to white, change its Specular Intensity to 0% and its Diffuse to 100%. This will give you a sharp ray-traced projection. 

    The problem is that you'll need to manually adjust the light intensity, and whatever you do, there will be a slight light gradient across the layer, so it won't sit perfectly in the shot (can be sorted out with a soft mask, but that's not ideal). This is solved in the Classic 3D Renderer with a little Specular anomaly, but that doesn't exist in ray-traced.

    What I'm working on at the moment is some kind of cunning workaround to even out the gradient created by diffuse ray-traced lighting / projection. I'm getting close, but it needs some more work.

    Ben.
  • I've just updated Projection with version 1.01x44. It's a free upgrade for those with a valid licence. 


    In Projection 1.0x28, some users were having issues with softness when using telephoto lenses. 

    By and large, shots to match-move are created with wider angle lenses, in order to minimize the amplifying effect that long lenses have on vibrations and camera shake, so the softness problem was something that only a small number of users were experiencing. However, for a full HD composition, Projection 1.0x28 was generally fine up to about a 40-50mm lens, and then started to get noticeably softer than the original for lenses longer than that. 

    Technically speaking, the problem is to do with After Effects internal limit on the maximum shadow map resolution. The new Projection (when used with CS6) gets around this problem by having two different modes - Classic 3D and Ray-traced 3D. 

    There's also a third "Automatic" mode, that analyses your shot and decides on the optimal mode for you. The Ray-traced projection will always be sharp, but at the expense of a little more processing/previewing time, so in many circumstances, a Classic 3D Projection is favourable. You can of course manually override the automatic estimation, if you want.

    I'm releasing this as a public beta for the moment, to get it out there earlier. I'd very much like to hear feedback from users about how they get on with it. For the moment, the old version of Projection (v1.0x28) is still included in the download too.

    -Ben.


  • Hi!
    Any news on when the 3D rotation pro will be released?
  • Hi Göran...

    Soon, I hope. I'm spending all my time working on scripts at the moment.

    Ben.
  • Hey,

    the script works fine in your test project with the 3d Tracker Camera that's being created by after effects.
    But when I try to look at the projection plane from a new angle with another camera, projection just won't lock to the plane! It's as if lock would be turned off even though it's on.

    So let's say I dont have a tracked scene but just a still image of a room and want to do a projection on a 3d floor layer to then be able to move around the virtual camera, that won't work. Am I doing something wrong? This must be possible with the script?!
  • Hi Christoph,

    Actually, because the script is designed with a very specific purpose in mind it doesn't have this ability. Projection is designed to continue looking at the scene from the originally shot angle, and as such the projection is based entirely on the active camera.

    It's certainly possible to add this functionality into the script. I could add an option to "lock to current camera" or something. I'll take a look at it in the next update. I'd like to think of a way to implement it without cluttering the interface.

    In the meantime, you can do a bit of manual hacking!  Go into the Projection Base comp. There are three expressions that you can alter to achieve what you want to achieve: they are the Orientation expression on the layer Projection Light, the Position expression on the layer Projection Light and the Position expression on the layer Projected Layer (the bottom layer - make sure you're looking at layer name, not source name.).

    In each of these three expressions, you simply need to replace C.activeCamera with C.layer("3D Tracker Camera").... or whatever your projection camera is called.

    Hope that helps.

    Ben. 
  • Hey Ben, it would be super awesome if you could implement that into the script! Would be absolutely helpful and make after effects so much more powerful for so many purposes! I would have never thought when buying it that this wouldn't be possible because it didn't make any sense for me.

    Also, strangely enough, when I leave the active camera and just look at it from the "custom view1-3" in the viewer window, I can see it from other angles, but not if I just add a new, or move the current camera. Very weird ;) Please add this :) 
  • Let's say in the Projection Light Orientation:


    Projection");T=time+(time-L.sourceTime(time));try{glOr(C.activeCamera,T)}catch(e){[0,0,0]}


    is that the C.activeCamera you're refering to?


    so if my Camera in the main comp would be called "camera 1", how would the expression have to look like? If I just do


    Projection");T=time+(time-L.sourceTime(time));try{glOr(C.layer(Camera 1),T)}catch(e){[0,0,0]}

    it gives me an error. Sorry I'm not that good with the expression syntax..

  • A custom view, doesn't count as an active camera. That's why a custom view doesn't have the same effect as creating a new camera.

    I'll work this into the next update of Projection. Hopefully in the next couple of weeks.

    As for the workaround, yes.. you just need to replace any instance of C.activeCamera with C.layer("camera 1"). Don't forget the quotes around the name - and note also that you need to make sure the case matches. "My Camera 1" is not the same as "my camera 1".


  • Hi.
    I wonder if this one works with CC?
    I saw that it just says CS6, cs5.5, CS5,
    someone tryed?

    /Niklas
  • Hi Ben,

    I just got your script, I bet this will save me a ton of time. I'm having a problem though.

    I've tracked my footage and created a camera & solid.
    Whenever I select the [Track Solid 1] and selected the layer (1280x720, same as the comp) I want to project from the dropdown (at this point everything seems fine). 
    But when I hit 'GO' the layer selector dropdown reverts to 'None' and an error pops up saying "there is no layer to project selected, please select a layer to project and try again.'

    I'm using version 1.01x44 and no error log has been created by the script.

    -Also, sometimes when I move my cursor NEAR the dropdown it flips between my footage layer & None, without any clicking at all....
  • Hi Edward,

    That sounds very strange - I don't think I've heard that one before. I'm not able to look at this for a couple of days, but if you post a copy of your project file and details about your After Effects version and OS, I'll see if I can replicate the problem. Also, I'd be interested to know if you have any other Script UIs open at the same time. They can occasionally interfere with one another.

    -Ben.
  • Is there a CC Version available? Can't get the demo to work in CC....
    Awesome script BTW
  • Is there a CC Version available? Can't get the demo to work in CC....
    Awesome script BTW
    What issue are you having?  Please open a support ticket for direct help and include screenshots.
  • The script works well over 5 minutes, after that ae crashes. I'm using ae CC. If I try to do the same in CS6 works well, but the CS6 ae camera tracker can't solver the camera of my project as CC camera tracker does. I'm stuck, I need to erase things in over 20 steadycam shots. Any idea?
  • Hi Ismael,

    It's very hard to say with a program crash. After Effects shouldn't crash, and if it does, it's a bug in After Effects. That said, these things do sometimes happen and they're very tricky to reproduce or debug, or even ascertain if or what part of my script is causing the crash. The best I can offer in these circumstances is a workaround.

    I would make sure that Projection is the only script that you're running, and then restart Ae. Since Projection is a script that you run once and it creates a set-up that then works without the need for the script to be open, I'd create your projections one at a time, saving your project after each one. That way, you'll be able to make the projection(s) for each of your 20 shots and then work on without the script open.

    If you're finding that you don't have this problem in CS6, the other alternative would be to create your camera tracks in Ae CC, then back-save to CS6, then use Projection.

    Best, Ben.
  • Hi Ben,

    Interested in purchasing this script, hoping you can confirm wether or not it works on mac. 

    Thanks.