Page 1 of 2 12 LastLast
Results 1 to 20 of 36
  1. #1

    Stereo Camera Python Script for Blender 2.5


    I just updated my Stereoscopic Camera Script for Blender 2.6, it is stable and works very well so far. Comments are welcome.

    Blender 2.6 Script (Update: Apr/2/2012):

    Video tutorial:



    Last edited by noeol; 11-Apr-12 at 08:47.

  2. #2
    Donating Member arexma's Avatar
    Join Date
    Jul 2008
    I tried your skript for 2.49
    Basically it is great, also your page is awesome holds lot of useful information.
    I used your script some time ago, sadly it didnīt satisfy my needs.

    Its static, not working for animations, I canīt change the zeroplane via animation.
    Also I sometimes got objects too close, so divergent looking would be needed, so I would need to get the zeroplane near in the animation and thus lessen the eye seperation.
    Also linking the cameras is not what I like in animated scenes, I like them in one scene and then render one eye with the farm, check the animation for glitches, then render the other eye.
    not output them via compositor which is not working with e.g. loki and rendering L/R each pass to find out I can redo it because of a glitch :P

    Another problem is, if you got vast exterior scenes and you got to shrink your scene by 0.1 to avoid zbuffer issues it gets messy with the shiftX (i know its the approximated version, but satisfyable) the values get too small =)

    Maybe youīd like to adapt it to a camera constraint =) Thats what I was working on but I had to stop due to a lack of time =(

    Great would be a constraint similar to the track to constraint on a center camera, which controls the 2 stero cams, aiming at an empty representing the zeroplane.
    You can select an intended default eye seperation (i mostly use 6.5cm) and the shiftX gets calculated based on the distance of the target object. so you can animate the targetobject and the shift gets adapted accordingly, and if the zeroplane gets too near, the eye seperation lessens to ensure convergent looking.

    At least thats the idea.

    Another question. Do you know anything about "ghostbusting"?
    I ran in the problem that I barely found any papers or informations on how to do it. And with Cineplexx Digital Cinemas its a huge problem... the good cinema projectors automatically adapt the images to prevent ghosting between the stereo images... The Digital servers in the Cineplexx cinemas all over europe use another tech and donīt have it.

    And yes, there is a stereo 3D spot running in the constantine film group cinemas, that was actually done with Blender, at least in Austria =) As you are from Germany, you might have seen it too on Pro7.


    I just wonder how long it is until they finally proof that stereo 3D is rather unhealthy... =)

    Still, all my nagging aside, for stills your skript is *the best* there is unless you want to get your calculator out
    My superpower? Common sense. It seems so rare these days, it has to be a superpower..
    "Computers are like Old Testament gods; lots of rules and no mercy.” - Joseph Campbell

  3. #3
    thanks for your reply,
    it's right, you can't anim the stereo camera itself (focal dist, cam separation), but this doesn't mean that you only can do stills. I just want to make that clear for the other readers, of course you can create stereo animations in Blender with this script.

    Adding keyframes to anim the stereo parameters is possible (in 2.49b) but I couldn't find a comfortable to use and easy way to implement this in my old script, so I decided to focus only on the 2.5 version.

    A lot changed in Blender 2.5 and anim the parameters (properties) is much more easier. But everything in Blender 2.5 (and the Python API) is still ALPHA, so programing is sometimes a little frustrating, but there are more and more good examples to understand the new concept.

    How ever, I still working on my script and to anim the stereo parameters is my main goal.

    Here is the last result/test:

    Script: (only for Blender 2.5 ALPHA!)

    Note: only works with a Build >= r28503 (Download at:

    Video: (Flash or H.264)

    In this script version it is possible to animate the parameters, but it is not very handy yet (the user has to set the keyframes manually) and I think this is not the best/right way to do so. But it works ;-)

    Does anybody know how to trigger a python function (or operator) every single frame at the render process???

    Last edited by noeol; 04-Sep-10 at 11:04.

  4. #4
    Member mythcat's Avatar
    Join Date
    Aug 2006
    not working on Blender 2.5 beta

  5. #5

    download the new Blender 2.5.3 beta version:

    or for Blender 2.5.4 beta

    This version can be register as an Blender Add-On and
    shows the near and far plane parallax in pixel or degree.
    Last edited by noeol; 13-Sep-10 at 17:40.

  6. #6
    Member PKHG's Avatar
    Join Date
    Sep 2009
    Thanks for your great demonstration how to make red-blue stereo film!

  7. #7
    Hello Noeol Thanks for updating this script, I use it a lot and was hoping to be able to use it in 2.5, now I can ! Great work.

  8. #8
    How can I blend the two images and generate a 3d anaglyph video on MacOSX 10.6.4 ?

  9. #9
    Hi Jenifer, it's actually very easy, but I hope this will work in 10.6.4, because I only have MacOS 10.5.8

    Take a look at this demo blend file:

    If you hit Animation, Blender will create an uncompressed 100 frames quicktime video in the same directory as the blend file. This file is about 27 MB. If you want to compress an anaglyph video, be carefull, because a bad compression will destroy the stereo effect. The best way is to use the Quicktime Animation Codec.

    The demo blend file contains also a workflow to create side-by-side images. Just connect the File Output Node instead the Viewer Node to save the png images in the same directory as the blend file. (Note to understand the side-by-side calculation: final side-by-side output = 1440px = left/right image width = 720px = Translation: 720/2 = +/-360px)

    To do the whole render process for both views in one operation, I linked all objects into two new Blender Scenes, one for the Left-Camera with this camera as the active one and one for the Right-Camera with that as the active one ... in the compositor you can then take the left- and right-scene as different render-inputs ... see the blend file above.

  10. #10
    Member ndee's Avatar
    Join Date
    Jan 2008
    hey noel,
    great script so far!! I have a question.. Is it possible that those left and right cameras copy the depth of field distance value of the main camera? I think this is important if you use dof in your videos!
    Nevertheless, great work!

  11. #11
    Hi ndee,

    thanks for the hint.

    The new script (same version, same link) has four more lines, which copies the 'dof_distance' and 'dof_object' values of the center-camera.

  12. #12
    Member ndee's Avatar
    Join Date
    Jan 2008
    wow!! that was quick!! thanks for your response!!

    Playing around with the stereoscopic effect!! This looks great!!!
    Is it possible to key the offset of the left and right camera?
    Or do I always have to press the button "set stereo camera" ?

  13. #13
    Hi ndee,

    yes it's possible, look at the vimeo video tutorial at 4:50

    Press 'Set Stereo Camera' then set a (first) keyframe for:
    1. the 'Stereo Window' (LocSize)
    2. Left and Right Camera (Loc)
    3. ShiftX for the Left and Right Camera (with the mouse over the input and press 'i')

    Go some frames ahead, change the Stereo Parameter (Camera Separartion or/and Focal Distance)
    and press again 'Set Stereo Camera' then set the next keyframe for 1.-3. and so on ...

  14. #14
    Is it possible to use this script for 3d other than analglyphs?
    "When all the world falls to ruin, can you still cling to hope in the wake of the end?"

  15. #15
    Originally Posted by gnomestudios View Post
    Is it possible to use this script for 3d other than analglyphs?
    of course!

    the analgyph part was just an example, because everyone can see this result

    in the compositor you can combine the left and right image to a side-by-side or over-under etc. output

  16. #16
    I posted a question today about whether or not it is possible to have side-by-side stereo editing windows (not anaglyph).


    Long ago someone made a Blender script for this but I can't find it, and also can't recall if it was really what I was looking for. That aside, let me know if I can get this setup somehow.

  17. #17
    The new script (v1.6.7) comes now with some stereoscopic Node-presets (Side-by-Side, Side-by-Side squashed, Above-Under, Red-Cyan, Amber-Blue and Interlaced) I hope this helps with the compositing.


    Web: (incl. Video)
    Last edited by noeol; 11-Apr-12 at 08:48.

  18. #18
    Member PKHG's Avatar
    Join Date
    Sep 2009
    Hallo noeol, missing a link to v1.6.4 ? Or add comment above?

  19. #19
    Join Date
    Jun 2011
    Sydney, Australia
    Fantastic camera rig, Sebastian, exactly what I was looking for. Test this in Cycles:

    Would it be possible to setup environment/desktop where L and R camera are side by side and rendering LIVE in Cycles? Anyhow, your compositing preset is brilliant.

    - Jimmy Gunawan

  20. #20
    Member Reidh's Avatar
    Join Date
    Feb 2009
    earth 01


    You are damned good.
    even I can almost follow your video. Really clear, really communicative. Thank you.
    Blender Regels Alle

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts