UnrealEngine5实操--基础概念(持续补充)
UnrealEngine5实操--基础概念Unreal 术语UE5 上手指南关卡快速搭建视口标准按键操作
Editor 视角移动速度调节
Unreal Editor 快速测距Actor 操作相机操作运行和模拟、打包不同配置打包运行后saved文件夹路径unreal 像素流快速上手PIE运行ESCAPE键退出引擎默认单位UE 地形快速指引视口近裁面设置UE色彩管理伽马调节入口类型图片处理材质编辑器管理材质节点图UE推荐资产命名规则Decal 材质预览异常UE编辑器截屏顶点动画工具动画姿势快照混合Gameplay和Sequencer动画USD 使用Text 3D插件使用SplineUMG中新手必晕的ListView详解3D视频教程场景Scene 变体管理Geo地理信息UE5 OFPA[(One File Per Actor)](https://docs.unrealengine.com/5.0/en-US/one-file-per-actor-in-unreal-engine/)UE GameFeature界面UI编程
总览蓝图C++热更相关:UnrealAndroid
相机Android Camera pluginPackage 打包
命令终端Command Console编辑器Python使用
Unreal 术语
Unreal Engine Terminology
Actor: 可以放置在Level中的实体对象,比如摄像机、网格体、初始位置等;Pawn: 代表你或者AI控制的游戏对象,Actor的子类;Charactor: 玩家可控制的虚拟人物角色,Pawn的子类;Component: 可以挂在Actor上的特定功能组件;Player Controller: 获取玩家输入,与game交互;Player State: 游戏内参与者的状态;如name,当前地图,生命值等BluePrint: 蓝图,可视化脚本系统,俗称连连看;Game Mode:游戏运行机制;Game State :游戏状态,如游戏分数,多少玩家,开局时间等;
UE5 上手指南
Onboarding Guide for Games Licensees
硬件要求获取虚幻开发编译
关卡快速搭建
Level Designer Quick Start
视口标准按键操作
ControlActionW / Numpad8 / UpMoves the camera forward.S / Numpad2 / DownMoves the camera backward.A / Numpad4 / LeftMoves the camera left.D / Numpad6 / RightMoves the camera right.E / Numpad9 / Page UpMoves the camera up.Q / Numpad7 / Page DnMoves the camera down.Z / Numpad1Zooms the camera out (raises FOV).C / Numpad3Zooms the camera in (lowers FOV).Perspective透视图LMB + DragMoves the camera forward and backward and rotates left and right.RMB + DragRotates the viewport camera.LMB + RMB + Drag || MMBMoves up and down.Alt + LMB + DragTumbles the viewport around a single pivot or point of interest.Alt + RMB + DragDollies (zooms) the camera toward and away from a single pivot or point of interest.Alt + MMB + DragTracks the camera left, right, up, and down in the direction of mouse movement.Orthographic (Top, Front, Side)正交视图LMB + DragCreates a marquee selection box.RMB + DragPans the viewport camera.LMB + RMB + DragZooms the viewport camera in and out.Focusing快速定位FFocuses the camera on the selected object. This is essential to make the most out of tumbling the camera.Editor 视角移动速度调节
右上角调节速度为固定值
可在editor settings里设置use distance-scaled camera speed 为true。
Unreal Editor 快速测距
alt+J 顶视图,按住鼠标中键
Actor 操作
Outliner窗口中Shift连续多选,Ctrl点选合集;透视图中Ctrl+Alt+LMB,多选;三视图中 鼠标左键拖框选Actor打组GroupActor合并merge
相机操作
修改默认pawn 速度及加速度:Default Pawn 的movement component组件详细面板Floating Pawn Movement修改即可,
关闭默认运行启动鼠标捕获;
运行和模拟、打包
PIE or SIE
There are two ways to preview your game in Unreal Engine:
Play In Editor (PIE), which you can access from the Play button on the Main Toolbar.
Simulate In Editor (SIE), which you can access from the Play drop-down menu or by using the Alt + S on Windows keyboard shortcut (or Option + S on macOS).
The key difference between playing and simulating in the Editor is that playing will always start the game at the Player Start location and give you control of the player character. Simulating doesn’t move the Camera and doesn’t spawn a player character.
Packaging
设置默认地图
手动打包
[*]分发
Distribution
签名、加密
优化加载时间
压缩Pak
Pak资源打包顺序优化 Build and run the packaged game with the -fileopenlog command-line option, which causes the engine to log the order in which it opens files.
Exercise all major areas of the game. Load every level, every playable character, every weapon, every vehicle, and so on. Once everything has been loaded, quit the game.
There will be a file in your deployed game called GameOpenOrder.log that contains the information needed to optimize your .pak file order. For example, on Windows builds, the file will be found in WindowsNoEditor/(YourGame)/Build/WindowsNoEditor/FileOpenOrder/. Copy this file to your development directory under the /Build/WindowsNoEditor/FileOpenOrder/ path.
With the log file in place, rebuild the .pak file. This and all future .pak files produced will use the file order indicated in the log file.
不同配置打包运行后saved文件夹路径
unreal打包exe development打包,首次运行后saved文件夹在打包目录内,windows/{projectname}/Saved/config/windows/gameusersettings.ini 修改分辨率后,有效
ResolutionSizeX=540
ResolutionSizeY=960
LastUserConfirmedResolutionSizeX=540
LastUserConfirmedResolutionSizeY=960
WindowPosX=-1
WindowPosY=-1
FullscreenMode=2
shipping 打包 ,saved文件夹在c:/users/xxx/appdata/local/{projectname}/Saved;
或添加"-NotInstalled"运行,saved会保存在project文件夹内;(https://forums.unrealengine.com/t/how-can-i-change-the-directory-of-save-file-when-shipping-on-windows/476858)
unreal 像素流快速上手
1.ue 启用像素流插件,建快捷方式{alt+鼠标},属性加"-PixelStreamingIP=localhost -PixelStreamingPort=8888"
2.pixelstreaming服务端运行,管理员运行powershell,先platform_scripts/cmd/setup,然后 ,start_signallingserver.ps1;启动正常后运行ue exe。
PIE运行ESCAPE键退出
默认PIE运行时按esc键会退出运行模式,如果开发的程序有用到esc键,则不能测试功能,
unreal esc
select the ‘Edit’ menu >> ‘Editor Preferences’ >> ‘Keyboard shortcuts’ tab on the left >> Under General Keyboard Shortcuts, search for the 'Play World (PIE/SIE) drop down (or type ‘stop’ in the search), in there you will find a ‘Stop stop simulation’ key input. You can change or delete this key input
引擎默认单位
编辑->项目设置->编辑器->外观界面->Units,默认长度单位厘米,质量单位千克。
使用Blender验证:
blender 单位默认为米,参考; 默认box 边长为2m。
Unreal 默认cude (亮白)边长 1m, 为 blender box(灰)的一半。
UE 地形快速指引
Landscape Quick Start Guide
主要流程:创建–>塑形–>绘制
视口近裁面设置
编辑->项目设置->引擎->一般设置->设置->近剪切平面(默认10,可改1或5等)
r.SetNearClipPlane x 似乎项目设置界面里的值不会改变,但游戏视口里的相机近剪裁面会立刻变化,重启后会读取使用项目设置的值
UE色彩管理
OpenColorIO Quick StartColor Management with OpenColorIO
伽马调节入口
Tools->Debug->Debug Tools 设置编辑器全局gamma。
0.52.2=0.218;
0.2181/2.2=0.5;
PostProcessVolume’s Global Gamma
类型图片处理
Albedo > srgb,相当于照片?使用sRGBroughness/metal/anything black/white or grayscale > rgb (其他使用线性Linear?)combined masks in rgb channels > rgb
材质编辑器
教程
节点鼠标操作
ControlAction翻译RMB drag on backgroundPan Material expression graphLMB drag on backgroundBox selectRotate Mouse WheelZoom in and outLMB + RMB dragZoom in and outLMB click on objectSelect expression/commentCtrl + LMB on objectToggle selection of expression/commentLMB click + dragMove current selection/commentCtrl + LMB dragBox select (add to current selection)LMB drag on connectorCreate connection (release on connector)Ctrl + LMB drag from connectionMove connection (release on same type connector)Shift + single-click LMB on connectorMarks the connector. Performing the action again with a connector marked will create connection between the two connectors. This is a quick way of making connections over large distances.RMB on backgroundBring up New Expression menuRMB on objectBring up Object menuRMB on connectorBring up Object menuAlt + LMB on connectorBreak all connections to connectorAlt+鼠标左键 切断连线Ctrl + LMB on connectorAdd a new node along connector
键盘快捷键
ControlAction翻译Ctrl + BFind in Content BrowserCtrl + CCopy selected expressionsCtrl + SSave MaterialCtrl + VPasteCtrl + DDuplicate selected objects复制对象Ctrl + YRedoCtrl + ZUndoDeleteDelete selected objectsSpacebarForce update all Material expression previews强制刷新所有预览Enter(same as clicking apply)HotkeyExpression按下热键,然后配合单击鼠标左键使用AAddBBumpOffsetCCommentDDivideEPowerFMaterialFunctionCallIIfLLinearInterpolateMMultiplyNNormalizeOOneMinusPPannerRReflectionVectorSScalarParameterTTextureSampleUTexCoordVVectorParameter矢量参数1Constant一维常数2Constant2Vector二维常数3Constant3Vector三维常数4Constant4Vector四维常数Shift + CComponentMask遮罩
管理材质节点图
Organizing a Material Graph介绍了常见的节点操作,包括
添加注释
路由节点
对齐排布
塌陷
UE推荐资产命名规则
___
AssetTypePrefix identifies the type of Asset, refer to the table below for details.AssetName is the Asset’s name.Descriptor provides additional context for the Asset, to help identify how it is used. For example, whether a texture is a normal map or an opacity map.OptionalVariantLetterOrNumber is optionally used to differentiate between multiple versions or variations of an asset.
Recommended Asset Prefixes
Decal 材质预览异常
待排查?
UE编辑器截屏
Taking Screenshots
普通2D:快速截屏F9,或高分辨率截屏Cmd(HighResShot +分辨率/倍数),或视口右上角菜单里的截图工具全景截图:
插件默认保存在c盘,可能会因权限保存失败
顶点动画工具
将复杂的动画数据存储在 2D 纹理中或网格 UV 中是在保持必要的动画外观和感觉前提下降低动画开销的好方法
动画姿势快照
设置骨架网格体的动画时,有时需要应用物理并让物理控制网格体(如角色进入布娃娃状态)。 应用物理后,借助 动画姿势快照(Animation Pose Snapshot) 功能,你可以在蓝图 中采集骨架网格体动作(保存所有骨骼变换数据)。 然后你可以在动画蓝图 中获得获取该信息,并使用保存的动作作为混合源(如下方的视频范例所示)。
混合Gameplay和Sequencer动画
在创建过场动画序列时,你可能希望将现有的游戏进程动画与包含在关卡序列中的动画混合在一起。例如,一个可操作的角色在游戏过程中走到一扇门前,你想要Sequencer显示该角色的动画并打开这扇门。或者玩家在第三人称射击游戏中控制他们的角色绕过一个死角,而你想要混入一个死亡的过场动画序列。通过使用Sequencer、蓝图和动画蓝图的组合,你可以将你的角色所处的任何游戏姿势与Sequencer定义的 插槽(Slot) 动画混合在一起。
USD 使用
USD Stage Editor Quick Start
Unreal 通过USD Stage 处理USD 格式,需启用usd 的两个插件。
Text 3D插件使用
启用引擎内置插件,使用及添加字体动画
默认不支持中文,导入中文字体替换即可
Spline
什么是spline input key?
spline point 索引 0 ,1,2…
input key 相当于线段直接的lerp 插值 ,0-1之间中点为0.5,1-2之间中点为1.5;
UMG中新手必晕的ListView详解
参考
3D视频教程
Media Framework Quick StartMedia Framework Tutorials
场景Scene 变体管理
Variant Manager Template Overview 允许创建多个场景变体,方便通过蓝图进行切换。
Geo地理信息
Georeferencing a Level
CRS Coordinate Reference Systems 坐标参考系ECEF Earth-Centered, Earth-FixedGeographic CRS 用经纬度表示BLH,点在球面上的坐标,如WGS84;Geocentric CRS 地心坐标系,用XYZ值表示,原点在地心;Projected CRS 投影坐标系,如Mercator projection墨卡托投影,UTM通用墨卡托;
UE5 OFPA(One File Per Actor)
UE5 引入OFPA,开启后,支持level map里的actor 对应本地文件,可方便团队分工处理不同actor,不过对git可能还是不友好。
UE GameFeature
UE5:Game Feature 预研Game Features and Modular Gameplay
界面UI
UMG UI Designer Quick Start Guide
编程
总览
Unreal ArchitectureGameplay FrameworkGeneral Mobile Development
蓝图
快速指引蓝图快捷操作蓝图调试添加断点F9Mobile Patch UtilityLevelBlueprintHow to Create a Simple FPS in Unreal Engine 4蓝图结构体
C++
Programming Quick Start编码规范
命名注释nullptrautoc++ 11 Range-Based for匿名表达式lambdaenumnamespace头文件引入 #pragma once
TArrayTSubclassOfGamePlayTagsActor Lifecyclelive codingLambda ,Lambda使用Header Issue
VS 头文件报错The Solution to Intellisense Not Finding Generated Header Files in Unreal Engine 未测试
SubSystemGameFeature :《InsideUE5》GameFeatures架构
热更相关:
Implementing ChunkDownloader IngameChunkDownloader解释Build Operations: Cook, Package, Deploy, and RunUE UnrealPakUE4 原生热更实现方案跟我用TypeScript做一个FPS游戏Puerts安装和调试
复制puerts插件puerts目录打开命令行执行:node enable_puerts_module.js根目录执行命令行:npm init
UnrealAndroid
相机Android Camera plugin
调用摄像头
Package 打包
SDK、NDK、Java 设置,使用android studio 安装默认参数;Unreal 4.27.2 最好(验证通过)sdk build-tools 29.0.2;ndk 21.1.6352462, graddle 默认;build 打包失败,提示 webviewcontrol.java 122 ,123 ,125 乱码错误:ue4官方java 文件内使用了websettings旧 api,导致编译失败,参考websettings1 ,websettingsAPI,修改Engine\Build\Android\Java\src\com\epicgames\ue4\webviewcontrol.java源文件,打包会自动覆盖,成功打包。
unreal打包生成 android manifest 文件 函数 路径/地址
命令终端Command Console
查看所有支持的cmd命令,Type help and press Enter to open a list of available console commands in your browser
编辑器Python使用
Scripting-the-unreal-editor-using-python
Unreal Python API
[*]文件形式import unreal
unreal.log("hello")shift+enter输入多行,或一行一行输入
py+文件似乎不行
pip安装
在unreal 内嵌log命令行里不能运行pip(安装包)等命令,可在文件浏览器定位至附带python目录(如C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\ThirdParty\Python3\Win64)处cmd执行pip命令,参考Plotting Graphs with Matplotlib and Unreal Engine PythonPython(REPL)What is REPL? REPL is the language shell, the Python Interactive Shell. The REPL acronym is short for Read, Eval, Print and Loop.
没搞明白与上面的有啥区别…好像有些交互的命令又用不了
页:
[1]