Sei sulla pagina 1di 7

Nystic 2.

0
A Blender Community.
Skip to content
Search… Search
Advanced search

[Tutorial] Rendering Game Physics


Moderators: Yodaman921, Gabriel
Write comments
Search this topic… Search
4 posts • Page 1 of 1

[Tutorial] Rendering Game Physics (#p95314)


by billymcguffin » Tue Oct 12, 2010 6:51 pm

There are a few steps necessary to render out a physics simulation from the game engine. This tutorial will cover those steps.

Step One:
Set up your physics simulation. For right now, we'll just have the default cube falling with gravity.
Go to the top bar on your screen and click the box that says “Blender Render”. From the list, choose “Blender Game”
img01.png (52.01 KiB) Viewed 1505 times

Now we can head over to the physics tab and get the physics set up. In this case, it's as simple as changing “Static” to “Dynamic”. All
this does is make the object react to normal physics (gravity, collisions, etc.).
img02.png (40.5 KiB) Viewed 1505 times
Now if you press “P” to play the simulation, you'll see that the cube accelerates downward.

Step Two:
It is now time to record the physics that's being displayed in the game engine. Essentially what this does is transfer the physics from the
game engine to the F-Curves of the object, which displays the animations and such.

To do this, we have to change some settings and enable others. The first thing we want to do is make sure that the frames per second
that the GE will record at and the FPS that we will render at is the same.

While in Game Engine mode (unless you changed it, you should still be there), go to the render buttons and change the “FPS” value to
25.

img03.png (22.39 KiB) Viewed 1505 times

Now do the same in Render Mode.


img04.png (33.76 KiB) Viewed 1505 times

Now, switch back to Game Engine mode and click on the “Game” menu at the top of the screen. From the menu, check “Record
Animation”. If we press “P” now, Blender will record everything that happens in the Game Engine while it's still playing.

If you press Alt+A after exiting the game engine, you'll see the cube falling downwards.

Step Three:
Now we'll clean up the keyframes made by the Game Engine, because they're unnecessarily complex as they are now, since it records the
rotation and position for every object on every frame.

Split the screen and change the window type to Graph Editor. If you have a lot of objects, this will take a long time to do, because of
the sheer number of keyframes. Do not attempt to do any editing of the f-curves for now; it probably will freeze up pretty bad.
Change the 3D view to the User Preferences window and switch to the addons tab. Along the left side of the screen, choose “Curves”
and then enable “Simplify Curves”. Back in the Graph Editor, press Space (with the cursor over the Graph Editor), then type Simplify F-
Curves. An option should show up in the pop-up called Simplify F-Curves. Click it. Initially, not much will happen. However, if you press
F6 and turn up the Error value (a value of 1 typically works well, but it depends on if you have any sharp turns and such), it should
reduce the number of keyframes, but keep the correct shape.

We're Done!

Tips:
If you're gonna be editing the simulation after having recorded animation, make sure that you have record animation off before you
start testing your new setup.

Thank you for reading! If you have questions on this tutorial, post 'em here.

Last edited by billymcguffin (./memberlist.php?mode=viewprofile&u=2501) on Sat Oct 23, 2010 3:24 pm, edited 1 time in total.
Top
4D Virtual Builder for SU 4D Visualisation View the full construction process. www.4dvirtualbuilder.com
Novo Seguro de Saúde Inclui serviços médicos sem limite. Adira já online, desde 8,25€/mês! SaudePrime.pt
3d Cad Search Thousands of Catalogs for 3d Cad www.globalspec.com

Re: [Tutorial] Rendering Game Physics - Part 1 - The Basics (#p95330)


by chelle » Wed Oct 13, 2010 4:16 am

Thanks Billy, it never came to me that this was possible.

Top

Re: [Tutorial] Rendering Game Physics (#p101588)


by t89472 » Thu Apr 21, 2011 4:14 pm

Thank you very much! I've been trying to figure out how to do this for a couple of days. Really easy to follow tutorial thanks for
posting!! Very appreciated.

Top
Re: [Tutorial] Rendering Game Physics (#p101589)
by billymcguffin » Thu Apr 21, 2011 4:39 pm

No problem

Top

Display posts from previous: All posts Sort by Post time Ascending Go
Write comments
4 posts • Page 1 of 1
Return to User Tutorials
Jump to: User Tutorials Go

Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Potrebbero piacerti anche