In this Blender 2.5 tutorial we show you how to set up rigid body physic simulations using the Blender Game Engine and then go on to bake that simulation to keyframes. This allows the animation to be rendered or otherwise animated outside of the game engine.

You must be logged in to upload images. Register

Discussion

45 Responses to “Tip: Recording Game Physics to Keyframes”
  1. Jorge Gutierrez
    Posts: 4

    how did you do that golden material??? its the best one I’ve seen

    #
    1
    May 10, 2011 at 9:31 pm
    • Posts: 2951

      I rendered it in Cycles. It uses a Mix Closure that combines a blue velvet material and a yellow glossy material. I then added a sloping background and rendered with a single mesh light.

      -Jonathan

      #
      1.1
      May 10, 2011 at 10:02 pm
      • Jorge Gutierrez
        Posts: 4

        I liked cycles even better than luxrender, it makes the final render a bit more cleaner and less noisy

        #
        1.1.1
        May 10, 2011 at 10:24 pm
      • Timothy
        Posts: 4

        how do you get Cycles.I have tried Luxrender but got nowere.

        #
        1.1.2
        May 10, 2011 at 11:57 pm
      • Richard
        Posts: 73

        Timothy,
        You can find cycles builds on http://graphicall.org

        (http://graphicall.org/?keywords=cycles)

        #
        1.1.3
        May 11, 2011 at 8:38 pm
      • Timothy
        Posts: 4

        thanks Richard

        #
        1.1.4
        May 13, 2011 at 3:36 pm
  2. Posts: 22

    thanks :) would love to see a remake of the game engine game creation series you did a while back. But this time make it more complex, like say, a maze first person shooter zombie game :)

    #
    2
    May 10, 2011 at 9:54 pm
  3. Timothy
    Posts: 4

    Hi Jonathan I have a question .in blender 2.5 when I open the user preferences blender shuts down I would like some help and I think that it is really cool that you are getting in to basics of the game engine ROCK ON!!!

    #
    3
    May 10, 2011 at 11:46 pm
    • Posts: 235

      I had this problem at one time, when ever I tried to open the preferences inside a viewport window, so I just always open it from the top menu now. Hope maybe that helps.

      #
      3.1
      May 11, 2011 at 1:13 pm
      • Timothy
        Posts: 4

        Thanks after I wrote this I experimented around and found that it is the opposite for me. Thanks John

        #
        3.1.1
        May 11, 2011 at 5:56 pm
  4. joely-o
    Posts: 8

    i didn’t know that bit about simplify curves – i’d always wondered what that add-on was for, but never gave it enough though to actually look it up. thank you! i’ll be using that!

    i’m a little sad, though – i’ve never seen a tutorial that explained thoroughly enough how to record the game physics to IPOs without slowing down the physics simulation for 2.5x. like, it plays back real time in the game engine at 60 fps, right? but if you record that and want to integrate it into a 24fps animation, the simulation is slowed and it’s not really usable. is there a way to fix that when recording the simulation, without just having to scale the IPOs down afterward and try to eyeball the correct speed?

    #
    4
    May 11, 2011 at 12:20 am
    • chinwill
      Posts: 3

      what you can try to do is change the sync mode in your timeline from “no Sync” to “frame dropping” or “av sync”, it will give you less fps, but also it will give you a faster preview of your motion. another way would be to use the “render active viewport” tool witch is located in the header of your 3d view.

      #
      4.1
      May 11, 2011 at 2:57 am
    • Posts: 235

      I think all you have to do is double the frame rate up front to account for the loss mate. Record at 48 to get 24 or something like that. Not 100% sure on that but I think I know what you mean. Pretty sure BlenderNerd covered it a few months back.

      #
      4.2
      May 11, 2011 at 12:36 pm
      • joely-o
        Posts: 8

        thank you for the suggestion, i’ll experiment with that. i’ve never heard of BlenderNerd, i’ll have to google that!

        #
        4.2.1
        May 12, 2011 at 5:56 pm
    • snot_nose
      Posts: 2

      Hey joely, i was also wondering about this. it seems that it works out only when you go into the blender render and in render-dimensions-framerate to change it as well to 60fps, then the animation works fine.
      I tried to change the fps in the game engine, but with no sucesses.
      when you activate in the game engine the render-display-framerate and profile, it will show you the frame rate when u run the engine.
      so the result was that the framerate DID change but once i activate the animation recorder the frame rate is playing again 60 fps, even if i set it to 30 in the game engine.
      so i have no idea, maybe its a bug, maybe we are missing something, but for sure it’s something important that should have been covered in this tutorial.

      #
      4.3
      May 12, 2011 at 4:52 am
      • joely-o
        Posts: 8

        snot_nose (LOL, nice moniker!), i know that there was a script in 2.49 (and also i’d read in Tony Mullen’s “Bounce, Tumble and Splash” that you could just hit CTRL+ALT+SHIFT+P and it would automatically record the game engine physics to IPOs at the .blend file’s current animation frame rate without even entering game play mode – or at least that’s what i understood from what he was saying). so…maybe i have to set up my simulations in 2.5, open them up in 2.49, record the IPOs using the script or the CTRL+blahblahblah hotkey, and then re-open the blend file in 2.57??

        i’ve never tried either the script or the hotkey in 2.49, and that hotkey isn’t mapped by default to any action in 2.5…

        #
        4.3.1
        May 12, 2011 at 6:04 pm
  5. Martin Lindelöf
    Posts: 3

    worth mentioning is that when the bullet physics GSoC’10 project gets integrated (pretty soonish now when blender 2.57 is stable) we’ll have timeline physics and no need to bake from the BGE.

    #
    5
    May 11, 2011 at 2:46 am
  6. Lee
    Posts: 1

    Fantastic Tip Jonathan, just what I was after! woot!! Thanks! :)

    #
    6
    May 11, 2011 at 5:06 am
  7. PL
    Posts: 9

    THX for this tut, I just would like to know how to reset the animation curve after recording, lets say I want to get just the final scene with fallen monkeys on the plane but without game engine/rigid body/timeline data (so just the latter frame) how to do this?

    #
    7
    May 11, 2011 at 5:07 am
  8. Nate Wiebe
    Posts: 22

    @PL: Go into the curves editor and delete all of the keyframes before and after the frame that you want.

    #
    8
    May 11, 2011 at 6:19 am
    • PL
      Posts: 9

      thank you very much!

      #
      8.1
      May 12, 2011 at 10:40 am
  9. W
    Posts: 3

    Great work as usual!

    Can you make the Tips available for download on Vimeo?

    #
    9
    May 11, 2011 at 6:20 am
  10. Posts: 10

    Simplifying curves is an essential to working with these animations afterward, I’m surprised you didn’t link it yourself, Jonathan. ;D

    http://www.blendercookie.com/2010/07/26/tip-simplify-animation-curves/

    #
    10
    May 11, 2011 at 7:50 am
  11. Posts: 10

    Disregard that last message; I missed the last bit, working without headphones at the moment. >.<;

    #
    11
    May 11, 2011 at 7:53 am
  12. Posts: 3

    Thanks for hearing my suggestions and helping me out Jonathan and Wes

    #
    12
    May 11, 2011 at 9:13 am
  13. Posts: 169

    Cool :) can you make a tutorial on how to render realistic metal and such,and render in cycles? it seems a often requested topic :D
    anyhow great tutorial, as always I’ll add :P

    #
    13
    May 11, 2011 at 9:55 am
  14. Richard
    Posts: 73

    Instead of Shift-D -> move object -> confirm -> Shift+D… etc.
    You can you, after confirming the first move, press Shift+R to repeat the last action performed.

    With the duplicate example; it will make a duplicate and move it by the the same amount as the initial action.

    #
    14
    May 11, 2011 at 8:36 pm
  15. Posts: 228

    Lights take memory, in 2.49 you could adjust 3 spheres to control lighting in the user preferences, you can kinda do it in 2.5 but the spheres are gone :(

    #
    15
    May 12, 2011 at 4:08 am
  16. DimitrisC
    Posts: 11

    I’ d love a cycles material making tutorial BTW.

    #
    16
    May 12, 2011 at 9:09 am
  17. doug rowland
    Posts: 8

    man i have been trying to figure this out forever!

    #
    17
    May 12, 2011 at 4:51 pm
  18. Simon Podolak
    Posts: 1
    #
    18
    May 15, 2011 at 9:25 am
  19. How did you do that keylogger?
    Im looking for it for a long time now

    #
    19
    Oct 10, 2011 at 12:05 pm
  20. Andy
    Posts: 1

    Hey
    Is there a way to record Softbody game physics to Keyframes ? Because “Record Animation” produces Keyframes with only Location and Rotation data ,no mesh distortion.

    Thanks

    #
    20
    Oct 23, 2011 at 9:07 am
  21. kesten
    Posts: 1

    I am doing a simple simulation with coneTwist constraints. What I find is that if i press play repeatedly, I get more or less the same simulation every time.
    However, if I tick the Game->Record Animation box then the simulation gets shorter and the objects don’t reset to their original position. After three or four re-plays, the simulation begins and ends in the equilibrium state. It’s like recording the f-curves somehow interferes with the initial conditions of the animation. Can anyone confirm or suggest how to avoid this?

    #
    21
    Jan 18, 2012 at 12:02 pm
  22. Flipper
    Posts: 2

    If I record an animation and cancel with “Esc”, the scene is ruined and has to be reloaded. Because next time I start the game engine, it starts from where I cancelled. There’s no way to delete the animation and go back to the original state. If I accidentaly save after recording, the only option is to start over from scratch. I wonder who decided that that’s good interface design.

    #
    22
    Feb 16, 2012 at 3:56 pm
    • Posts: 2951

      Sure there is, just press Shift + Left Arrow to go back to frame one in the time line. Is that what you’re looking for?

      #
      22.1
      Feb 16, 2012 at 5:49 pm
      • Flipper
        Posts: 2

        Thanks for answering. I’m probably being a complete idiot here, but here’s what I did:
        1. Set up scene
        2. P, Esc, tweak, P, Esc, tweak, etc.
        2. Record animation (check)
        3. P
        4. Esc
        5. Shift-Left (or another P)
        Kabloom. Scene all messed up.

        #
        22.1.1
        Feb 17, 2012 at 11:11 am
      • Posts: 2951

        When you say the scene is all messed up what do you mean exactly? Can you send over a screenshot?

        #
        Feb 17, 2012 at 12:14 pm
  23. Posts: 1

    The ground should be set, in Physics, to type: Static, Actor, and Create Obstacle I think. You’re note mentioning that!

    Tanks for the tutorial.

    #
    23
    Feb 29, 2012 at 5:32 am
  24. Posts: 71

    Great little reminder tip now that the new Voronoi Fracture addon is in Blender 2.64.

    #
    24
    Jul 21, 2012 at 1:44 pm
  25. Posts: 17

    I’m using blender 2.65a, and whenever I try to record animation, it doesent work. Thanks in advance.

    #
    25
    Feb 17, 2013 at 7:24 am
    • Posts: 454

      Can you be more specific as to which part is not working?
      -Alex

      #
      25.1
      Feb 17, 2013 at 7:41 pm

Leave a Comment

You must be logged in to post a comment.