|
|
(21 intermediate revisions by 11 users not shown) |
Line 1: |
Line 1: |
| | {{LanguageBar|title = 添加道具}} |
| | |
| {{first room menu:zh-cn}} | | {{first room menu:zh-cn}} |
| | 道具模型是一种由与{{L|XSI Mod Tool}}类似的模型制作工具创建的几何文件。你可以想给电影添加道具一样把这些道具模型添加到地图中。 |
|
| |
|
| Prop models are geometry files created in a modeling program such as [[XSI Mod Tool]]. You can place these prop models in maps like adding props to a movie set.
| | 有三种最基本的道具类型: |
| | | * ''静态'' 此类道具将永远在地图中不会产生变化。 |
| There are basically three types of props:
| | * ''动态'' 此类道具可以播放动画或者与其他对象一起移动。 |
| * ''Static'' props will always be stationary in the map. | | * ''物理'' 此类道具可以被随意摆弄(遵循物理规则,如重力)。 |
| * ''Dynamic'' props are props that can be animated and/or move with another object. | |
| * ''Physics'' props are props that can be tossed about (obeying physics like gravity). | |
|
| |
|
| You will learn how to place and position two of these types in this tutorial.
| | 在此教程中你将学习如何放置其中两种类型并了解它们的作用范围。 |
|
| |
|
| <br clear="both">
| | {{clr}} |
|
| |
|
| [[Image:hammer_pickpropstatic.jpg |thumb|left|200px|从下拉列表里选择[[prop_static]]。]] | | [[File:hammer_pickpropstatic.png|thumb|left|200px|从下拉列表里选择{{L|prop_static}}。]] |
| [[Image:hammer_placepropstatic.jpg |thumb|right|200px|在三维视图中点击,将''prop_static''实体放到地板上。]] | | [[File:hammer_placepropstatic.png|thumb|right|200px|在三维视图中点击,将''prop_static''实体放到地板上。]] |
|
| |
|
| 我们将先从添加静态道具开始。 | | 我们将先从添加静态道具开始。 |
Line 19: |
Line 20: |
| 所有道具都是实体,操作也相同,因此再切换回'''实体工具'''。 | | 所有道具都是实体,操作也相同,因此再切换回'''实体工具'''。 |
|
| |
|
| 接着在'''对象工具栏'''的实体列表中选择[[prop_static]]。 | | 接着在'''对象工具栏'''的实体列表中选择{{L|prop_static}}。 |
|
| |
|
| 在三维视图中点击鼠标将''prop_static''放到地板笔刷之上。 | | 在三维视图中点击鼠标将''prop_static''放到地板固体之上。 |
|
| |
|
| 会出现一只红色小盒子。这是因为我们现在还没决定这个道具将会是什么样子的。 | | 会出现一只红色小盒子。这是因为我们现在还没决定这个道具将会是什么样子的。 |
Line 27: |
Line 28: |
| 为此我们要给这样道具选择一只模型。 | | 为此我们要给这样道具选择一只模型。 |
|
| |
|
| <br clear="both">
| | {{clr}} |
| | |
| [[Image:hammer_pickworldmodel.gif |thumb|right|500px| 切换到外界模型项。]]
| |
| | |
| Switch to the Selection Tool and double-click the ''prop_static'' to bring up its properties.
| |
|
| |
|
| # Click the '''World Model''' field in the '''Object Properties''' dialog.
| | [[File:hammer_pickworldmodel.png|thumb|right|500px| 切换到外界模型项。]] |
| # Click the '''Browse...''' button and wait patiently while the '''Model Browser''' list populates. (You will only have to wait once; after that, the list will be cached for future searches.)
| |
|
| |
|
| {{note|There are currently two types of model browsers in Hammer, depending of whether the ''Use VGUI model browser'' flag is checked in the Hammer options. This tutorial will only focus on the new and default VGUI model browser. The older browser functions a lot like a normal Windows file explorer does.}}
| | 切换至选取工具并双击''prop_static''打开属性页。 |
|
| |
|
| <br clear="both">
| | # 在'''对象属性'''对话框中点击'''外部模型'''项。 |
| | # 点击'''浏览...'''按钮并耐心等待'''模型浏览器'''中的列表准备完。(你只需等待一次;因为列表已经为未来的搜索创建了缓存。) |
|
| |
|
| [[Image:Hammer_ModelBrowser_PickFolder.jpg |thumb|right|400px| Click a folder to change to that sub-directory.]]
| | {{Note|目前Hammer的模型浏览器有两种,取决于是否在Hammer的选项中勾选了''使用图形化模型浏览器''标签。本教程主要以新的图形化模型浏览器讲解。老版本的浏览器就和普通的文件窗口差不多。}} |
|
| |
|
| Don't worry that it says “ERROR” in big red letters in the preview window of the Model Browser. That’s just because we haven't chosen any model to preview yet.
| | {{clr}} |
|
| |
|
| Click the ''props_c17'' folder in the model browser to list the models in it in the lower right window.
| | [[File:Hammer_ModelBrowser_PickFolder.jpg|thumb|right|400px|点击一只文件夹可以转换到子目录。]] |
|
| |
|
| <br clear="both">
| | 虽然模型浏览器的预览窗口中有大大的红色“ERROR”字样,但请不要担心。那只是因为我们现在还没选定要预览的模型。 |
|
| |
|
| [[Image:Hammer_ModelBrowser_PickFence.jpg |thumb|right|400px| Click the ''fence01a'' model to select it, and then click ''OK'' to close the browser.]]
| | 点击模型浏览器里的''props_c17''文件夹,列出其下的模型。 |
|
| |
|
| There are a lot of models in this folder, so instead of scrolling through the entire list, we can simply filter the content like we did with the texture browser, by typing in "<code>fence</code>" in the text box just beneath the list.
| | {{clr}} |
|
| |
|
| Click the model file <code>fence01a.mdl</code> to select it.
| | [[File:Hammer_ModelBrowser_PickFence.jpg|thumb|right|400px| 点选模型''fence01a'',并点击''确认''关闭浏览器。]] |
|
| |
|
| A preview of the model will be displayed in the preview window. You can drag your mouse in that window to freely rotate the model if you want.
| | 此文件夹下的模型非常多,但是我们不必滚动整个列表寻找目标,只需在列表下面的文本框中键入"<code>fence</code>"过滤出我们需要的内容,就像之前在纹理浏览器中做的那样。 |
|
| |
|
| When you're done with inspecting the preview, confirm your choice of the model by clicking ''OK''.
| | 点选模型文件 <code>fence01a.mdl</code> 。 |
|
| |
|
| The Model Browser will close and the ''fence01a'' model will be selected as the model for the ''prop_static'' entity.
| | 预览窗口中将显示此模型的预览。如果你愿意,可以在窗口中拖拽鼠标随意地旋转模型。 |
|
| |
|
| [[Image:hammer_pickapply_sm.jpg |thumb|right|400px| Click the ''Apply'' button to confirm your changes.]]
| | 等你查看完预览模型后,点击''确认''确定你的选择。 |
|
| |
|
| Click the ''Apply'' button to commit the changes.
| | 模型浏览器将关闭,而''fence01a''将成为你为''prop_static''实体所选定的模型。 |
|
| |
|
| The ''prop_static'' will now change into displaying the fence model you selected in the 3D view.
| | [[File:hammer_pickapply_sm.png|thumb|right|400px|点击''应用''按钮完成修改。]] |
|
| |
|
| You can also change the direction the fence faces by changing the pitch yaw and roll settings or using the angle circle and typing in a value of 0 to 360.
| | 点击''应用''按钮完成修改。 |
|
| |
|
| | 原先三维视图中的''prop_static''将转为显示你所选的防护围栏模型。 |
|
| |
|
| <br clear="both">
| | 你也可以修改倾斜/偏转/滚动设置或者使用角度罗盘来改变防护围栏的方向。 |
|
| |
|
| [[Image:hammer_pickpropphysics.jpg |thumb|left|100px| Choose the appropriate physics prop entity.]]
| | {{clr}} |
| [[Image:hammer_placepropphysics.jpg |thumb|right|200px| Place the physics prop entity by clicking the floor in the 3D view.]]
| |
|
| |
|
| We will now add a prop model with physics properties.
| | [[File:hammer_pickpropphysics.jpg|thumb|left|100px| 选择一个合适的物理模型实体。]] |
| | [[File:hammer_placepropphysics.png|thumb|right|200px| 点击三维视图将物理模型实体放置于地面上。]] |
|
| |
|
| Switch to the '''Entity Tool'''.
| | 我们现在添加有物理性的道具模型。 |
|
| |
|
| The type of prop_physics entity we are going to choose depends on what game your map is for.
| | 切换到'''实体工具'''。 |
|
| |
|
| * If you are mapping for [[Half-Life 2]]: Single Player, choose the [[prop_physics]] entity.
| | 选择什么类型的prop_physics实体取决与你要为什么游戏制作地图。 |
| * If you are mapping for [[Half-Life 2: Deathmatch]], choose the [[prop_physics_multiplayer]] entity.
| |
|
| |
|
| Choose the appropriate entity from the entity list in the ''Object Toolbar''.
| | * 如果你要为{{L|Half-Life 2|半条命2}}:单人游戏制作地图,请选{{L|prop_physics}}实体。 |
| | * 如果你要为{{L|Half-Life 2: Deathmatch|半条命2:死亡模式}}制作地图,请选{{L|prop_physics_multiplayer}}实体。 |
|
| |
|
| Place the physics prop entity somewhere on the floor of the room.
| | 从''对象工具栏''的实体列表中选择一种合适的实体。 |
|
| |
|
| Re-open the '''Object Properties''' dialog if you've closed it, to display the properties of the physics prop. Otherwise the dialog will automatically have changed to display its properties.
| | 将物理道具实体放到房间地面上。 |
|
| |
|
| <br clear="both">
| | 为了显示物理道具的属性,如果你关闭了'''对象属性'''对话框那么请再次打开。 否则对话框将自动转为显示它的属性。 |
|
| |
|
| [[Image:Hammer_ModelBrowser_PickOildrum.jpg |thumb|right|400px| After having opened the browser, search for <code>oildrum</code>, choose the ''oildrum001'' model, and click ''OK''.]]
| | {{clr}} |
|
| |
|
| Again click the '''Browse...''' button in the '''World Model''' field in the '''Object Properties''' dialog to load up the model browser.
| | [[File:Hammer_ModelBrowser_PickOildrum.jpg|thumb|right|400px| 打开浏览器后,搜索<code>oildrum</code>,选择模型''oildrum001'',之后点击''确认''。]] |
|
| |
|
| # Instead of "<code>fence</code>", search for "<code>oildrum</code>".
| | 再次点击'''对象属性'''对话框中'''外界模型'''项目里的'''浏览...'''按钮,打开模型浏览器。 |
| # Pick the <code>oildrum001.mdl</code>.
| |
| # Close the browser with ''OK''.
| |
|
| |
|
| <br clear="both"> | | # 搜索"<code>oildrum</code>"而不是"<code>fence</code>"。 |
| | # 选中<code>oildrum001.mdl</code>。 |
| | # 点击''确认''关闭浏览器。 |
|
| |
|
| [[Image:hammer_pickapply_sm2.jpg |thumb|right|400px| Click ''Apply'' to make the change and update the 3D view.]]
| | {{clr}} |
|
| |
|
| Click the '''Apply''' button to confirm your changes, and the physics prop will change to the barrel model you selected.
| | [[File:hammer_pickapply_sm2.png|thumb|right|400px| 点击''应用''更改并更新三维视图。]] |
|
| |
|
| <br clear="both">
| | 点击'''应用'''按钮使更改生效后物理道具将变成你所选的油桶的样子。 |
|
| |
|
| [[Image:hammer_closeprop.jpg |thumb|right|200px| Close the '''Object Properties''' dialog.]]
| | {{clr}} |
|
| |
|
| Close the '''Object Properties''' dialog.
| | [[File:hammer_closeprop.png|thumb|right|200px| 关闭'''对象属性'''对话框。]] |
|
| |
|
| <br clear="both">
| | 关闭'''对象属性'''对话框。 |
|
| |
|
| == Moving objects ==
| | {{clr}} |
| [[Image:hammer_pickselect.jpg |thumb|left|200px| Switch to the Selection Tool.]]
| |
| [[Image:hammer_selectfence_sm.jpg |thumb|right|400px| Select the fence model in the 3D view by clicking it, and then click and drag the fence in one of the lower views to move it.]]
| |
|
| |
|
| You may have noticed that the fence model is stuck half-way into the floor. We are going to move it up now.
| | == 移动对象 == |
| | [[File:hammer_pickselect.png|frame|right| 切换至选取工具。]] |
|
| |
|
| Entities are moved just like brushes are:
| | 你应该注意到防护围栏的模型有一半是陷在了地板里。我们现在就把它升上来。 |
|
| |
|
| Switch to the '''Selection Tool''' and click on the fence to select it.
| | 实体的移动与固体相同: |
|
| |
|
| Then select the fence model by clicking on it in the 3D view.
| | 切换到'''选取工具'''。 |
|
| |
|
| A box will appear around the model in all the views, showing that it has been selected.
| | 然后在三维视图中点选防护围栏模型。 |
|
| |
|
| To move something along the z axis (up or down), you’ll need to move it in one of the lower views (named ''front (y/z)'' or ''side (x/z)'').
| | 此模型会在所有视图中一个方框框中,代表其已被选中。 |
|
| |
|
| Click inside the red bounding box in one of these 2D views, and then drag the fence upward until it’s closer to the floor.
| | 要使某样东西在Z轴(上下)上移动,你必须在一种下级视图(称为''前视图(y/z)''或''侧视图(x/z)'')中移动它。 |
|
| |
|
| <br clear="both">
| | 在任意二位试图中的红色边框内点击,然后向上拖拽防护围栏直到它紧贴地板。 |
|
| |
|
| [[Image:hammer_movefence_sm.jpg |thumb|right|400px| Decrease the size of the grid so the objects can be moved in finer steps.]] | | [[File:hammer_selectfence_sm.png|thumb|left|400px| 在三维视图中点击并选中防护围栏模型,然后在下级视图中点击并拖拽此模型将其移动。]] |
|
| |
|
| You may find that you can’t quite line up the bottom of the model with the floor because the current size of the grid prevents it. It won’t matter that much if the fence sticks somewhat into the floor, but if you want it exactly aligned you will need to decrease the grid size:
| | {{clr}} |
|
| |
|
| # Click the '''Smaller Grid''' button in the grid toolbar in the upper left corner of the Hammer window.
| | [[File:hammer_picksmgrid.png|frame|right|减少网格大小使对象可以微小的间隔移动。]] |
| {{note|Alternatively, you can use the shortcut key '''[''' to decrease the grid size, or the ''']''' key to increase the grid size}}
| |
| # Zoom in a bit on where the fence meets the floor, so that you can see better.
| |
| # Adjust the height of the fence.
| |
| # Repeat steps 1-3 until you're satisfied. (For a perfect fit, you will need to decrease the grid size to 2.)
| |
|
| |
|
| [[Image:hammer_picksmgrid.jpg |thumb|left|400px| With the grid size smaller, the fence can be lined up with the floor.]]
| | 你应该会发现,模型底部很难与地板对齐,这是因为目前的网格大小使你无法做到这点。防护围栏有点陷在地里其实也没多大问题,但是你要是想让它更加整齐那就必须减小网格大小: |
|
| |
|
| <br clear="both">
| | # 点击Hammer窗口左上角网格工具栏里的'''缩小网格'''按钮。 |
| | {{Note|你可以用快捷键'''['''减少网格大小或是用''']'''键加大网格大小。}} |
| | # 放大防护围栏与地面相交的地方,这样才能看得更清楚。 |
| | # 调节防护围栏的高度。 |
| | # 重复步骤1-3直到你觉得满意为止。(如果想天衣无缝,你要把网格大小减到2才行。) |
|
| |
|
| You are finally done with the blueprints for this map.
| | [[File:hammer_movefence_sm.png|thumb|left|400px| 只有更小的网格才能让防护围栏与地面对齐。]] |
|
| |
|
| {{NavBar|Adding Light:zh-cn|Your First Map:zh-cn|Saving and Compiling:zh-cn}} | | {{clr}} |
|
| |
|
| {{otherlang:zh-cn}}
| | 你终于完成这张地图的设计草图了。 |
| {{otherlang:zh-cn:en|Adding Prop Models}}
| |
|
| |
|
| [[Category:Level Design Tutorials]]
| | {{Navbar|Adding Light|Your First Map|Saving and Compiling}} |
| [[Category:Chinese]]
| | {{ACategory|Level Design}} |
| | {{ACategory|Tutorials}} |
道具模型是一种由与XSI Mod Tool(en)类似的模型制作工具创建的几何文件。你可以想给电影添加道具一样把这些道具模型添加到地图中。
有三种最基本的道具类型:
- 静态 此类道具将永远在地图中不会产生变化。
- 动态 此类道具可以播放动画或者与其他对象一起移动。
- 物理 此类道具可以被随意摆弄(遵循物理规则,如重力)。
在此教程中你将学习如何放置其中两种类型并了解它们的作用范围。
在三维视图中点击,将
prop_static实体放到地板上。
我们将先从添加静态道具开始。
所有道具都是实体,操作也相同,因此再切换回实体工具。
接着在对象工具栏的实体列表中选择prop_static(en)。
在三维视图中点击鼠标将prop_static放到地板固体之上。
会出现一只红色小盒子。这是因为我们现在还没决定这个道具将会是什么样子的。
为此我们要给这样道具选择一只模型。
切换至选取工具并双击prop_static打开属性页。
- 在对象属性对话框中点击外部模型项。
- 点击浏览...按钮并耐心等待模型浏览器中的列表准备完。(你只需等待一次;因为列表已经为未来的搜索创建了缓存。)
注意:目前Hammer的模型浏览器有两种,取决于是否在Hammer的选项中勾选了使用图形化模型浏览器标签。本教程主要以新的图形化模型浏览器讲解。老版本的浏览器就和普通的文件窗口差不多。
虽然模型浏览器的预览窗口中有大大的红色“ERROR”字样,但请不要担心。那只是因为我们现在还没选定要预览的模型。
点击模型浏览器里的props_c17文件夹,列出其下的模型。
此文件夹下的模型非常多,但是我们不必滚动整个列表寻找目标,只需在列表下面的文本框中键入"fence
"过滤出我们需要的内容,就像之前在纹理浏览器中做的那样。
点选模型文件 fence01a.mdl
。
预览窗口中将显示此模型的预览。如果你愿意,可以在窗口中拖拽鼠标随意地旋转模型。
等你查看完预览模型后,点击确认确定你的选择。
模型浏览器将关闭,而fence01a将成为你为prop_static实体所选定的模型。
点击应用按钮完成修改。
原先三维视图中的prop_static将转为显示你所选的防护围栏模型。
你也可以修改倾斜/偏转/滚动设置或者使用角度罗盘来改变防护围栏的方向。
我们现在添加有物理性的道具模型。
切换到实体工具。
选择什么类型的prop_physics实体取决与你要为什么游戏制作地图。
从对象工具栏的实体列表中选择一种合适的实体。
将物理道具实体放到房间地面上。
为了显示物理道具的属性,如果你关闭了对象属性对话框那么请再次打开。 否则对话框将自动转为显示它的属性。
打开浏览器后,搜索
oildrum
,选择模型
oildrum001,之后点击
确认。
再次点击对象属性对话框中外界模型项目里的浏览...按钮,打开模型浏览器。
- 搜索"
oildrum
"而不是"fence
"。
- 选中
oildrum001.mdl
。
- 点击确认关闭浏览器。
点击应用按钮使更改生效后物理道具将变成你所选的油桶的样子。
关闭对象属性对话框。
移动对象
切换至选取工具。
你应该注意到防护围栏的模型有一半是陷在了地板里。我们现在就把它升上来。
实体的移动与固体相同:
切换到选取工具。
然后在三维视图中点选防护围栏模型。
此模型会在所有视图中一个方框框中,代表其已被选中。
要使某样东西在Z轴(上下)上移动,你必须在一种下级视图(称为前视图(y/z)或侧视图(x/z))中移动它。
在任意二位试图中的红色边框内点击,然后向上拖拽防护围栏直到它紧贴地板。
在三维视图中点击并选中防护围栏模型,然后在下级视图中点击并拖拽此模型将其移动。
减少网格大小使对象可以微小的间隔移动。
你应该会发现,模型底部很难与地板对齐,这是因为目前的网格大小使你无法做到这点。防护围栏有点陷在地里其实也没多大问题,但是你要是想让它更加整齐那就必须减小网格大小:
- 点击Hammer窗口左上角网格工具栏里的缩小网格按钮。
注意:你可以用快捷键[减少网格大小或是用]键加大网格大小。
- 放大防护围栏与地面相交的地方,这样才能看得更清楚。
- 调节防护围栏的高度。
- 重复步骤1-3直到你觉得满意为止。(如果想天衣无缝,你要把网格大小减到2才行。)
你终于完成这张地图的设计草图了。