在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → gamebryo3.2基础教程

gamebryo3.2基础教程

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:2.36M
  • 下载次数:0
  • 浏览次数:100
  • 发布时间:2020-09-18
  • 实例类别:一般编程问题
  • 发 布 人:robot666
  • 文件格式:.pdf
  • 所需积分:2
 

实例介绍

【实例简介】
通过例子介绍gamebryo3.2的使用,包括工具和代码实现。
g小m orld Buider lerman Game Feviscn Contrel. Ltilties Wndew Hel 汤递國國mht m ston DoCreaTe, os GbrdordModelbrory embrc wo snow Out a wangs omen oma" Path C:VEmegerf\ Labs'K dart 1-7 Dy bsamrVpplicnbonCataTectleveNieceww lack O RAIson Contol Figure 02: World Builder, the level editing tool in Toolbench Section 1: Level design We will start off by creating a level with white boxes. White boxing is a technology that allows you to prototype how a level would look like before you have actual art assets. We will export our whiteboxing Level to an fbx file that can be opened in autodesk 3ds max or maya by the artist to populate it with real art From the Windows Start menu, select emergent gamebryo lightspeed > tools toolbench. Open the day Dreamer game solution file(gsl ) this file contains all of the game content that was needed to create the day Dreamer demo. by default, this file is at the following location <kickstart install path> day Dreamer Application data day Dreamer. gsl After you open the solution file, you'll notice a Game Solution View on the left-hand panel of Toolbench as in Figure 02 above. Right click on the solution and select Add New Content. You will see a screen similar to Figure 03 New Content Content Types ErLily Model DeScription: Defines otit ea for a pcrticn of the game word Name:NewLev L block Figure 03 Select block Document and name the file: NewLevel"then press"oK". you will be prompted to create a directory with the same name. The World Builder plug-in will load the viewport in the middle; locate the grid by moving the camera around in the view port to navigate in world builder you can use the mouse (left- mouse click to look and keyboard ( wasd to move). For full documentation on how to navigate in World Builder check <LightSpeed install path>/Documentation/HTML/Tools World Builder /wb world camera navigation. htm Once you locate the grid, click on the Whitebox Creation Mode button R(the button on the left in the Whitebox toolbar). make sure that the whitebox Creation Mode is set to physXWhitebox or Spark PhysXWhitebox not a regular whitebox so we can have a physical box that the character can collide with. Using the mouse in the viewport, left click to create a whitebox on the grid as shown in Figure 04 On the right pane you will see the entity Editor tab click on Placeable and set the position to 0, 0-5) [Entity Editor> Placeable Position ile Eit Yew psbu World Eualdes Ierain Game Resion Cantrol Unities 中回义命,,忽失:,画”·-,兮品w,汤0涌國圆 PhystWhtebox Name Ptrrawhtetex i whitedaxl blod 1 EinpeLevel bock w Physx Nhitebtx D 01)Info n (o) wamings o (0)Eras:Fater 国o4s是 PhysPRop earp:: Pop Service to add Funtime NIF fle tc Figure o Now we are going to place an Avatar Spawn point on top of the whitebox we just created First click on the Palette View tab in the left panel s Game Solution o Palette View O Entity View Then double-click on GameMode/Library to open the Game ModelLibrary set of models Now double-click on the Avatar folder where you will find the Avatarspawn Point model. If you have a large number of models you can search within folders by typing in the filter box. You can also search all entity modeling projects by clicking on the search tab and then typing into the Name Includes textbox. Once you have selected the model click and drag the avatarspawn Point from the left panel into the viewport on top of the whitebox. on the right pane, set the position of the avatar spawn point to(0, 0, 0) [Entity editor placeable Position If we were to launch the game now it will be a dark level since we have not added any light sources From the palette tab search for light and add the main directionalshadow light to the viewport (the Light can be found in gameModelLibrary Lights). the directional light is the main shadowing light. We would need to rotate this light around until we get the desired lighting effects in the scene. other light types like the am bient light dont get affected by rotation or translation to add the main directional light, you would have to click and drag the light from the left pane into the viewport like we have done with the spawn point. Once you have added the light, change the position property of the light by changing the Entity Editor Placeable position to a value like(0,0, 20). this will position the light above the whitebox in the center of the grid while the light object is still selected press <ctrl+E> to activate the rotation gizmo or you could press the rotation gizmo button directly in the transtorm toolbar 」√兮畛当 You can configure all the keyboard shortcuts in toolbench by going to (Utilities Shortcuts Now to see what we created running in game first we have to make sure that toolbench knows the location of the game executable. Click on Utilities in the main title bar then click on Settings( Main title bar>Utilities Settings). Under the User tab click on World Builder as shown in Figure 05. Settings 回回区 LsEr DayDreamer g NewwLevel block Emerger f Code editor t Entity Modelin ng 曰 World builder External tools Entity Selection Undo False Game Solution tput v Export On Save Tr Script debugger Test content App Parameters Text editor Test Content App Path Content Dialogs toolbench Test Content App Working Folder E World Build Renderer elc Grid view Dort Entity Selection Unda [PerUser] Specifies whether entity selection changes are added to the undo stack Restore Defaults OK Cancel Apply Figure 05 Set the" Test Content App Path"to the day Dreamer Executable which is placed at <kickstart install path> Day Dreamer Application Win 32\Day Dreamer_ VC90exe Also set the"Test Content App Working Folder"to <kickstart install path>l DayDreamer Application Win 321 Click Apply and OK. Now click back in the viewport Now you can load the day Dreamer application by pressing <Alt+t> to load the game executable. You should see the game running as in Figure 06 AMMO J ②10:00 (EMERteNT Scaleform Wwise Phys STATUSo0 1 0 Figure 06 Note: Once running Day Dreamer will keep your mouse input. You will need to alt-tab to leave the application. The dayDreamer project has several models that we can drop into the level to make it more interesting Before we add any more objects into the scene make sure that you set the snap to surface button (i) or Align to Surface button(>). We could also add a few small whiteboxes that are dv objects. to set a whitebox to be dynamically simulated on the right pane click on the Entity Editor tab and change the DynamicallySimultate property to True as shown in Figure 07. At this stage, we encourage you to create a few white boxes and change their transforms(rotation and translation) to simulate level creation PhysxWhitebox Density 1 Dyramicallysimulate Fas Fiction True False Figure 07 While the Day Dreamer executable is still running, go to the palette view and search for tree"(you can also go directly to the palette view GamePresetlibrary >Props> trees and click and drag a few tree objects into the viewport then save the block file. You should be able to see the trees in the game executable as soon as you saved the block file. In Figure o8 below, we used the tree& model to add some trees to the block file Newl evelblock Figure 08 Now let's add more whiteboxes to our level to make look like a real level the art assets for day Dreamer were modeled in meters, so we have to make sure that units match in toolbench click on utilities in the main title bar then click on Settings (Main title bar >Utilities> Settings). In the Settings window, click on the NewLevel block tab, expand World Builder and change the snap point stickniess radius to 0.25 as shown in Figure 09 User DayAr sl NewLevelblod d World builder 国分口 Lights 日 Snap points Snap poirt Enabled True Precision Snap poirt Stickiness Radius 0.25 Snappily Snap polnt enabled [PerContent] Enable snapping of position from " Snap Point"scene graph hildren objects. Restore defaults Cance Apply Figure 09 Now we can create a few whiteboxes in the level of varying sizes and locations in the level You can also use the Whitebox Edit Mode button(k)to align whiteboxes to each other using whitebox snap points Select the edge of the whitebox that you are creating and align its snap point with another whitebox snap point. You can check the Designer Track Video to see how whitebox snap points work in the tool Feel free to create a full level of white boxes in any way you want. also using the transform toolbar iDE492 Worid you can translate, rotate, and scale entities in world or local space. All the changes that you have done to the level should be reflected im mediately in the running game executable upon saving, which automatically triggers an export of the block used by the game. At this point you can shut down the game executable We have pre created a level using white boxes similar to the level used in the day Dreamer game Application and shown in Figure 10 below. To show this whitebox level, we have to explain a concept in World builder called layers a layer is an added scene file containing its own entities that is included in a primary block file. While you work in World Builder you might find that you have a large number of entities in your level block To make the job of managing these entities easier, you can divide them into smaller groupings that are known as layers layer ). You can create an empty layer, or you can create one from a selection in World builder Layers serve to break up a scene into multiple files that are combined together. The primary use of layers is to facilitate multiple user support Breaking up a scene into layers allows multiple people to be working within their own layer file and contributing to the overall scene creation at the same time PhysXModeiL bery, tmtpro. F SparkLibaryem时 meModelLibraryemtp可 DesignerTutcrial.ibraryemtpro's Testees tomainandeey Errorness Dasgne Tu:cria whites Layer Ambienticht Figure 1 In Toolbench, go to the game Solution tab on the left pane and click on the testLevel block'file Toolbench will ask you to confirm closing the current content and switching to a different block file Please confirm and once you have the testlevel open the camera needs to be adjusted to focus on the level. the easiest way to adjust the camera is to go to the entity view and double click the blground entity. Your viewport should show something similar to Figure 11 below ∠ PhysXMsdelLibray, emts甲bm中 melAodellibraryemtpr时上 Designer Tutoria Library emtprejTestLevelbbck Figure 11 see the various layers used in the level as shown in Figure 1? sht pane, click on the layer editor tab to Now let's explore the various layers used in this level On the ri 【实例截图】
【核心代码】

标签:

实例下载地址

gamebryo3.2基础教程

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警