UnrealEngine5实操--基础概念(持续补充)

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

视口标准按键操作

ControlAction
W / 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 操作

相机操作

  • 修改默认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

  • 主要流程:创建–>塑形–>绘制

视口近裁面设置

  1. 编辑->项目设置->引擎->一般设置->设置->近剪切平面(默认10,可改1或5等)请添加图片描述
  2. r.SetNearClipPlane x 似乎项目设置界面里的值不会改变,但游戏视口里的相机近剪裁面会立刻变化,重启后会读取使用项目设置的值

UE色彩管理

伽马调节入口

  1. Tools->Debug->Debug Tools 设置编辑器全局gamma。
    0.52.2=0.218;
    0.2181/2.2=0.5;
    在这里插入图片描述
  2. PostProcessVolume’s Global Gamma
    在这里插入图片描述

类型图片处理

  • Albedo > srgb,相当于照片?使用sRGB
  • roughness/metal/anything black/white or grayscale > rgb (其他使用线性Linear?)
  • combined masks in rgb channels > rgb

材质编辑器

教程
在这里插入图片描述

  • 节点鼠标操作
ControlAction翻译
RMB drag on backgroundPan Material expression graph
LMB drag on backgroundBox select
Rotate Mouse WheelZoom in and out
LMB + RMB dragZoom in and out
LMB click on objectSelect expression/comment
Ctrl + LMB on objectToggle selection of expression/comment
LMB click + dragMove current selection/comment
Ctrl + 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 menu
RMB on objectBring up Object menu
RMB on connectorBring up Object menu
Alt + LMB on connectorBreak all connections to connectorAlt+鼠标左键 切断连线
Ctrl + LMB on connectorAdd a new node along connector
  • 键盘快捷键
ControlAction翻译
Ctrl + BFind in Content Browser
Ctrl + CCopy selected expressions
Ctrl + SSave Material
Ctrl + VPaste
Ctrl + DDuplicate selected objects复制对象
Ctrl + YRedo
Ctrl + ZUndo
DeleteDelete selected objects
SpacebarForce update all Material expression previews强制刷新所有预览
Enter(same as clicking apply)
HotkeyExpression按下热键,然后配合单击鼠标左键使用
AAdd
BBumpOffset
CComment
DDivide
EPower
FMaterialFunctionCall
IIf
LLinearInterpolate
MMultiply
NNormalize
OOneMinus
PPanner
RReflectionVector
SScalarParameter
TTextureSample
UTexCoord
VVectorParameter矢量参数
1Constant一维常数
2Constant2Vector二维常数
3Constant3Vector三维常数
4Constant4Vector四维常数
Shift + CComponentMask遮罩

管理材质节点图

Organizing a Material Graph介绍了常见的节点操作,包括

  • 添加注释
    在这里插入图片描述
  • 路由节点
    在这里插入图片描述
    在这里插入图片描述
  • 对齐排布
    在这里插入图片描述
  • 塌陷
    在这里插入图片描述

UE推荐资产命名规则

[AssetTypePrefix]_[AssetName]_[Descriptor]_[OptionalVariantLetterOrNumber]

  • 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视频教程

场景Scene 变体管理

Variant Manager Template Overview 允许创建多个场景变体,方便通过蓝图进行切换。

Geo地理信息

Georeferencing a Level

  • CRS Coordinate Reference Systems 坐标参考系
  • ECEF Earth-Centered, Earth-Fixed
  • Geographic 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

界面UI

UMG UI Designer Quick Start Guide

编程

总览

蓝图

  • 在这里插入图片描述

C++

热更相关:

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

  1. 文件形式
    import unreal
    unreal.log("hello") 
    
  2. shift+enter输入多行,或一行一行输入
    在这里插入图片描述
  3. 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 Python
  • Python(REPL)

    What is REPL? REPL is the language shell, the Python Interactive Shell. The REPL acronym is short for Read, Eval, Print and Loop.
    没搞明白与上面的[Python]有啥区别…好像有些交互的命令又用不了
    在这里插入图片描述

报错解决

UE5 生成工程默认只能使用VS2019(如果本机2019 v143 小于14.34,则报错无法生成),卸载2019仅保留2022(v143 14.36+最新)也不行!解决
Engine/Saved/UnrealBuildTool/BuildConfiguration.xml
User Folder/AppData/Roaming/Unreal Engine / UnrealBuildTool/ BuildConfiguration.xml
My Documents/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<VCProjectFileGenerator>
		<Version>VisualStudio2022</Version>
	</VCProjectFileGenerator>
	<WindowsPlatform>
		<Compiler>VisualStudio2022</Compiler>
	</WindowsPlatform>
</Configuration>
  • 5
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值