Graphics Reference
In-Depth Information
Figure 8-19 Sensor, controller, and Ipo actuator setup
4. Experiment with combining this setup with the setup from the previous section. Try to set up a flipper-
style controller to swing at a falling cube, knocking it into space before it hits the plane. Note how the
cube interacts with Rigid Body objects such as the sphere from the previous section's example.
Rigid Body Simulation and F-Curves
You now know how to set up basic physics simulations in BGE. But if you're reading this topic, chances are
you're most interested in using these simulations in your rendered animations. For this, real-time simulation in
the game play mode of the game engine is not sufficient. You need a way to run the simulation in Blender's
animation system.
The traditional way to do this in Blender has been to bake game engine animations to F-Curves. Over the
years and versions, various tools have come and gone to make this easier and less unwieldy, but as of the cur-
rent version of Blender (2.64 is in pre-release testing as I write this), this is still the only way to do rigid body
simulation for animation in Blender.
This is likely to change in the near future. As I write this, Sergej Reich has successfully passed the midpoint
of his Google Summer of Code 2012 project, which involves full Bullet integration into the Blender anima-
tion system. This system is currently very much in development on a branch of its own and has not yet been
merged with the Blender trunk. As is always the case, large new features can be unpredictable in terms of when
they are stable enough to be merged with main Blender development. You can look for versions of this on
www.graphicall.org by searching for builds of the Bullet integration branch.
Baking Game F-Curves
You can save the movements of Dynamic objects in BGE by selecting Record Animation from the Game menu
intheUserPreferences/InformationheaderatthetopofyourBlenderworkspace,asshownin Figure8-20 . After
you exit from game play mode by pressing Esc, animation F-Curves will be associated with whatever objects
wereenabledasDynamicobjectsinthephysicssimulation.YoucanpressAlt+AorclickthePlaybuttononthe
timeline and play the animation like any other animation, and you can render it as you would anything else in
Blender.
 
 
Search WWH ::




Custom Search