Page 1 of 1
ASP camera movement in Blender
Posted: Sun Jun 19, 2011 2:50 pm
by shoepie
I've been trying to combine Anime Studio animations with Blender backgrounds for a while to get nice perspective backgrounds and I finally worked out how to do it.
http://www.vimeo.com/25306543
I can still only pan the camera, no zoom

( and I haven't worked out if it's possible to have shadows for the character because this is done with the compositor.
Blender has a new 2D camera tracker coming soon so hopefully that will make this process a lot easier as at the moment I'm manually lining up the Blender camera with the ASP camera in Blender's viewport. So linear interpolation is quite important!
Posted: Mon Jun 20, 2011 7:39 am
by rylleman
It would be nice to have full camera integration between AS and Blender.
I think it could be done by an external script (or possibly an ASpro script) that takes the camera info from the AS file and converts this to Blender camera info.
Regarding your test, wouldn't it be easier to make an AS-version without camera tracking and then add this to the Blender-scene and make the camera track there? (Make a wide scene where the whole run fits)
Posted: Mon Jun 20, 2011 8:25 am
by shoepie
A script would be great, I was hoping to find a Blender script to import the keyframe data from PonySmasher's export camera to AE script but no luck. I even tried keying in the data from it manually but got confused with pixels, blender units.
I also thought about rendering a wide scene, although that would have problems for massive scenes, if he were to jump a building say.
I think the workflow I have is pretty quick but I'm going to try some more tests and perhaps write it all up when I'm done.
Posted: Mon Jun 20, 2011 11:20 am
by ponysmasher
I don't have a lot of experiences with Blender (although I'm keen on learning it).
Do you have a camera file for Blender I could have a look at to see how it's put together?
Posted: Mon Jun 20, 2011 1:32 pm
by shoepie
ponysmasher wrote:I don't have a lot of experiences with Blender (although I'm keen on learning it).
Do you have a camera file for Blender I could have a look at to see how it's put together?
Not really, blender files are binary so you can't view them. How I imagine it to work would be AS exporting a Python script. Which could then be run in Blender. If that's what you meant then I will have a look at Blender's API tonight and see if I can knock up a simple example that moves a camera around. I know PHP but not Python so we'll see
I suspect I won't be able to move the camera X number of pixels though as Blender's coordinates system is in Blender units (which is equal to a metre).
Posted: Mon Jun 20, 2011 3:03 pm
by ponysmasher
shoepie wrote:I suspect I won't be able to move the camera X number of pixels though as Blender's coordinates system is in Blender units (which is equal to a metre).
That's not a problem since AS doesn't use pixels either. In my AStoAE script I had to convert the units to pixels by looking at the project dimensions settings.
I downloaded a script that exports camera data from AE to Blender and got this file:
http://animestudioscripts.com/temp/blendcam.py
Doesn't look too complicated at first glance, but the camera zoom wasn't exported and I'm not sure what to set the scale at when converting (maybe that would have to be something you set yourself when exporting).
How do you run these scripts in Blender?
Posted: Mon Jun 20, 2011 3:47 pm
by shoepie
Wow! nice find. To make things a little more complicated though, that script uses the old Blender API. so to run it you will need to download an older version of Blender, 2.49. I've ran it in 2.49 and it does indeed create a camera and move it around. The API probably hasn't changed that much in 2.5.
To run the script, sorry blender's UI is a bit difficult to explain and I'm not sure how much you know.
1) Open 2.49. Right click on the camera in the 3D window, hit delete.
2) At the top of Blender on the dark line between the header and the 3D window. right click on the dark line and you should get a dialog, Split Area. Do that.
3) Then in the new window created there is an icon in the bottom left, looks like a grid, click on that icon and change to text editor.
4) then the menu will say 'text', you can click that and it will allow you to open a file. Open the python file in the window and then hit ALT-P to run the script.
5) It will create a new camera and put you on frame 240. Hit the zero key to look through the camera viewfinder, and navigate back to frame zero using the cursor keys.
left arrow = back 1 frame
down arrow - back 10 frames
and vice versa for opposite directions.
Frame numbers are displayed in the bottom left of the 3D window.
Sorry, reading that back it looks like a mess. i hope it helps.
Posted: Mon Jul 11, 2011 1:00 am
by ponysmasher
Can blender import Maya files (.ma)?
Because I think I managed to write a script for that:
viewtopic.php?t=19354
Posted: Mon Jul 11, 2011 2:12 pm
by shoepie
It doesn't appear so. I will have a better look for scripts this evening.