Introduction
::引言 时间

The Blender Game Engine is an interesting feature of Blender. It is basically a 3D environment in which 3D objects move around and react to each other upon contact. One common application is to recreate 3D architectural tours.
::混合动力游戏引擎是混合动力的一个有趣的功能.它基本上是一个3D环境,其中3D对象在接触时会移动并对彼此产生反应.一个常见的应用是重建3D建筑巡回.


In this tutorial, you will learn the basics of object collision within the Blender Game Engine (BGE). From Blender games to use in animations, the bullet physics engine offers a massive number of possibilities. The tutorials found within this wikibook on the subject of the BGE are generally focused on game creation, but the concepts taught within can be applied to a multitude of situations.
::在本教程中,您将学习Blender游戏引擎 (BGE) 中对象碰撞的基础知识.从Blender游戏到动画中的使用,子弹物理引擎提供了大量的可能性.本维基书中关于BGE的主题的教程通常集中在游戏创作上,但教导的概念可以应用于多种情况.


As a start, we will teach you to make a ball roll realistically down the hill using Blender's game engine. Note: Blender game engine doesn't exist now, so if you don't want to learn all this game engine part consider skipping the whole game engine section
::作为开始,我们将教你如何使用Blender的游戏引擎在山上逼真地滚球. 注意:Blender游戏引擎现在不存在,所以如果你不想学习所有游戏引擎部分,请考虑跳过整个游戏引擎部分

Adding the Hill
::增加山

First, make a plane, then switch to Edit mode ( TAB ), and multi-subdivide it with 2 cuts ( WKEY  →  Subdivide Multi  → 2). Next, enter face select mode ( CTRL+TAB  →  Faces ) to drag the center face up, in order to form a rough outline of a hill. Add a subsurf modifier (in the edit buttons) to about 3, then apply. You should now have a serviceable, but small, hill. Scale the hill up ( SKEY ) by about 10 times, and we're ready to add the ball.
::首先,做一个平面,然后切换到编辑模式 (TAB),并通过2个切割进行多次分区 (WKEY → Subdivide Multi → 2).接下来,输入面部选择模式 (CTRL+TAB → Faces) 将中心面向上拉,以形成一个山丘的粗略轮. 添加一个下面的修饰器 (在编辑按中) 到大约3,然后应用. 现在你应该有一个可用的,但小的山丘. 将山丘 (SKEY) 缩小大约10倍,我们准备好添加球.

Noob note:
::没有人注意到:

  1. You can also use a 3*3 grid.
    ::您也可以使用3*3的网格.
  2. Delete the original cube first.
    ::首先删除原始的立方体.
  3. The subsurf modifier is not essential.
    ::表面下变量不必使用.

Creating the Ball
::创造球

Now, add an icosphere ( SPACE  →  Add  →  Icosphere ) and relocate it to be just above the hilltop ( GKEY  or use the translate widget by pressing  CTR+ALT+G ). Let's change the color of the sphere so we can differentiate it from the plane. Go to the material buttons (with the sphere selected) and click on the white panel beside the COL value. In the color selection wiget that appears, change its color to a bright red.
::现在,添加一个生态圈 (SPACE → Add → Icosphere) 并将其移动到山顶上方 (GKEY或使用翻译小程序按CTR+ALT+G). 让我们改变球的颜色,以便我们可以将其与平面区分开来. 进入材料按 (选择球) 并点击 COL 值旁边的白色面板. 在显示的颜色选择窗口中,将其颜色更改为明亮的红色.

Next we need to make the Physics engine iterate over it. With the sphere selected, go to the logic buttons (the little purple Pacman-icon).  NOTE: In Blender 2.5 and above the Logic Buttons are gone. In order to have the 'Actor' button, click on the button showing 'Blender Render', and select 'Blender Game' Engine. Then go to the physics tab in the buttons menu. There you will see the 'Actor' Button.  You will see a button in the top left that says  Actor . Press it. Now select from the selection box beside of the "Actor" button  Rigid Body . This makes the ball roll, instead of staying completely upright the entire time. You will see a bunch of settings available now. Change  Radius  to 2. This changes size the physics engine  thinks  the ball is. You notice a dotted circle around the object; this is the boundary. Now change the  Radius  back to 1. You now have your first Blender game ready to go.
::接下来我们需要让物理引擎在上面代. 选择了球,进入逻辑按 (小紫色的Pacman图标). 注意:在Blender 2.5及以上,逻辑按已经消失了. 要获得"Actor"按,点击显示"Blender Render"的按,然后选择"Blender Game"引擎. 然后进入按菜单中的物理选项卡. 在那里你会看到"Actor"按. 你会看到左上方的按,上面写着"Actor". 按下它. 现在选择"Actor"按旁边的选择框"刚性体". 这使球滚动,而不是一直保持完全直立. 你会看到一堆可用的设置. 改变到半径2. 这种尺寸的物理引擎认为球是圆形. 你

Noob Note:
::没有注意:

  1. Make sure you are in object mode first before you add any object.
    ::确保您在添加任何对象之前先处于对象模式.
  2. F4KEY  is the shortcut to the logic panel.
    ::F4KEY是逻辑面板的快捷方式.

Testing your game
::测试你的游戏

Now the time has come for the first test of our game.
::现在是游戏的第一次测试的时候了.

  1. Add a light source well above the hill ( SHIFT+AKEY  →  Lamp  →  Lamp ). Align in front view ( NUM1 )
    ::在山坡上方添加一个光源 (SHIFT+AKEY → Lamp → Lamp). 在前视线 (NUM1) 排列
  2. Press  NUM5  to switch to Perspective mode, which gives a realistic view, rather than a view in which objects stay the same size with distance (be sure to switch back to Orthographic view when you are editing again using  NUM5 )
    ::按下NUM5转换到视角模式,它提供了一个现实的视图,而不是一个视图,其中对象保持相同的大小与距离 (请确保转换回正写视图当你再次使用NUM5编辑)
  3. Enter textured mode ( ALT+ZKEY  -- press  ZKEY  to switch back to solid view mode)
    ::进入纹理模式 (ALT+ZKEY - 按ZKEY重新切换到固体视图模式)
  4. Switch into side view ( NUM3 ) and press  NUM8  several times to get a good perspective on the ball.
    ::切换到侧视图 (NUM3) 并按NUM8几次以获得球的良好视角.
  5. Press  PKEY  to play the game (Make sure you are in Object mode ( TAB )
    ::按PKEY来玩游戏 (确保您在对象模式 (TAB)
  6. Press  P  to start testing the game. You should see the red ball drop onto the hill.
    ::按P开始测试游戏. 你应该看到红色球落在山上.
  7. Press  ESC  to quit testing the game
    ::按ESC停止测试游戏

Rolling ball tutorial screen capture

Video capturing your game
::视频捕捉您的游戏

When you press the PKEY or click  game, start play , Blender will play it using the 3D view. Many rendering features are not shown in this 3D Window and it does not render the view in order to get good pictures with textures and lighting. You must capture your object that keep on changing(the actor) so that it can be animated.
::当你按下PKEY或点击游戏,开始播放时,Blender将使用3D视图播放它.许多染功能在这个3D窗口中没有显示,它不会染视图以获得良好的图片和纹理和照明.你必须捕捉你的对象,不断改变 (演员),以便它可以动画.

View  -> click View button , -> next step / -> alternative step RMB -> right mouse button IKEY -> press the I key on keyboard
::查看 -> 点击查看按 , -> 下一步 / -> 另类步骤人民币 -> 鼠标右键 IKEY -> 按键上 I 键

Split window,  IPO Curve Editor  View,  Game, Record Game Physics to IPO ,
::游戏,记录游戏物理到IPO,

object mode , RMB(select actor), IKEY/ select key frame Loc (location of actor object only),
::对象模式,人民币 (选择行为者),IKEY/选择键框,Loc (仅对象行为者的位置),

PKEY( play game), ESCKEY(stop game)
::游戏中的PKEY (玩游戏),ESCKEY (停止游戏)

scene (F10),  output , f:\animation\ball (your file name),  stamp, time, date, draw stamp, format, (choose your output format)
::场景(F10),输出,f:\animation\ball(你的文件名),印记,时间,日期,绘制印记,格式,(选择你的输出格式)

anim end (ending frame), 270,  step , 10(for testing),  ANIM/Render, Render Animation /CTRL F12
::动画,结束 (结束),270,步骤,10 (用于测试),ANIM/染,染动画/CTRL F12

Conclusion
::结论

With the knowledge acquired in this tutorial, there are many things you could accomplish within the Blender Game Engine, although the majority of them would require more knowledge. So read on, and work your way through the multitudinous seas of tutorials (That is, two).
::通过本教程所获得的知识,你可以在Blender游戏引擎中完成很多事情,尽管其中大多数需要更多的知识.所以继续阅读,并通过无数的教程海洋 (即两个) 进行工作.

Extra Tutorials
::其他教程

Making a Basic Game:  Link , The State Actuator:  Link , Blender Game Engine Mouse Follow:  Link , Blender Bullet Physics:  Link , Domino Game:  Link , Rag Doll:  Link
::制作一个基本游戏:链接,状态执行器:链接,混合器游戏引擎鼠标 关注:链接,混合器子弹物理:链接,多米诺游戏:链接,拉格玩偶:链接


最后修改: 2025年03月17日 星期一 13:56