Automatic Texture Baking?

Hi! Im working on a 2d game and using blender for the graphics and unfortunetly i have a little problem in my workflow. I have to outrender the shadow of an object seperatly (for example a tree) so i have two files, one with the tree and one with its shadow. At the moment im using Texture Baking and Alpha on an extra plane for this and it works fine but now i have to animate an object with more then 5 frames and this is very very time consuming for me to manually bake the shadow, tweaking the material, render it etc. for every frame exspecially because im also use ambient occlusion for nice soft shadows around the objects.

http://mitglied.lycos.de/theschnappi/BlenderRender/GameGraphic.jpg

As you can see on this screenshot, this works really really well and now i have to render an gate that opens but because of the extreme time consuming aspect i would like to know if there is a possibility to somehow automaticly outrender the shadows?

The best thing you could do is to have different renderlayers, one with the object itself and other with the shadow. Then you press Do Composite and you won’t have to worry about tweaking it again since you already did…

Take a look at this: http://wiki.blender.org/index.php/Manual/Render_Layers+

EDIT: I’ve never used blender to make a game so I don’t know if render layers will work…

Well the main problem is that i need the shadows as an seperate Alpha texture or value. Render Layers would work if i could somehow get a material become less transperent where a shadow is, thats why i bake the shadows on a texture and use this texture as an alpha value but thats not very appropriate for animations because as much as i know i have to do it for every frame manually.

Btw. im not using the blender engine, only blender as 3d modelling and rendering device

Well, don’t know about shadow alphas, but with render layers you don’t need to set up every frame, you set it up for the whole scene independently from the frame.

Well ok, i outrendered the shadows with the render layer but now i have to tweak it in an image editor, well at least this is faster then doing it manually :wink: