I face a really odd thing When rendering a scene the output AVI file is very different from the animation I see inside blender. The script is looping over a function which create the scene:

    def main(self):
        for i in range(self.n_scenes):
            valid_scene = False
            while not valid_scene:
                valid_scene = self.create_scene()
            if len(os.listdir(self.output_path)):

For example the initial position of the objects is really different from what I see in blender, in addition from the 2nd frame the locations are different from the first frame. Before rendering I bake all the objects using bpy.ops.ptcache.bake_all() and for cleaning the scene after each render using the following funciton:

    def clean_scene(self):

What am I doing wrong? Is there any why to reset the scene? why there is a difference between played animation over blender and the rendered one?


Found the solution! After completing the rendering of the scene you should free the bake of the objects by using: bpy.ops.ptcache.free_bake_all()

Hope that help to other ones as well.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.