当前位置:网站首页>ue4 换装系统 2.换装系统的场景捕捉
ue4 换装系统 2.换装系统的场景捕捉
2022-07-24 05:22:00 【真的没事鸭】
第二节:换装系统的场景捕捉
ue4换装系统 1.换装系统的基本原理_灰猪皮皮的博客-CSDN博客_ue4换装
这节课我们实现场景捕捉的效果
类似于这种效果,但是是低配版

我们在材质和纹理那里选择渲染目标,命名为Target。这是一个2D渲染目标纹理源,这个渲染目标可以存储颜色,法线以及AO等信息。渲染目标可以看做一个摄像机,我们可以让一个scene capture组件指向某处,并将图像存储到一个渲染目标上。然后让渲染目标显示在模型上。我们可以用这个技术实现类似监控摄像机的效果。我们这里实现监控人物模型的效果

所以我们在人物蓝图,添加一个场景捕获组件,将捕获到的人物模型显示在渲染目标上面

调整一下场景捕获组件2D的位置,放到角色模型正前方

然后场景捕捉的内容我们存到我们创建的渲染目标上

把这个渲染目标大小改为800*1000

然后在InitSkeletalMesh函数里面设置一下场景捕捉2D只显示角色

现在渲染目标就有了内容,可以看到我们的人物模型就在里面,然后我们根据这个渲染目标创建一个材质

这个材质我们要用到UI上,所以我们进入这个材质,把这个材质改为用户界面(User Interface),混合方式改为半透明,将A通道翻转一下连到不透明度,为什么要翻转一下呢,因为我们去到渲染目标那里,打开Alpha角色变透明,关闭Alpha角色变为不透明,说明a通道的值为1时是透明,为0时是不透明,而材质节点中透明是0,不透明是1,所以需要翻转一下

接着我们创建一个控件蓝图,加一个Border,全屏,不透明度为0.2,加一个sizebox,sizebox下面加一个image,修改一下size box的大小,锚点设置为左边
然后把image的内容修改为上面我们创建的材质

然后我们在关卡蓝图创建这个控件

创建之后我们发现人物模型没有动,这是因为我们没有把角色加入到场景中,我们把角色加入到场景中就可以发现UI里面的人物会动了

ue4萌新,错误地方还请指正,有疑问的地方可以在评论区问我。
边栏推荐
- Yolov5 learning summary (continuously updated)
- Native JS magnifying glass effect
- day6-jvm
- day4-jvm
- JDBC advanced -- learning from Shang Silicon Valley (DAO)
- [MYCAT] MYCAT sets up read-write separation
- MySQL foundation - constraints
- Demo of UDP communication applied to various environments
- String methods and instances
- Traditional K-means implementation
猜你喜欢

JUC并发编程基础(6)--Lock锁
![[MYCAT] Introduction to MYCAT](/img/26/8911fe9e1fb104d7185dda0881804b.png)
[MYCAT] Introduction to MYCAT

常见AR以及MR头戴显示设备整理

STM32 standard peripheral Library (Standard Library) official website download method, with 2021 latest standard firmware library download link

【数据库系统原理】第四章 高级数据库模型:统一建模语言UML、对象定义语言ODL

Hit the wall record (continuously updated)

Conversion of world coordinate system, camera coordinate system and image coordinate system

Use QT to connect to MySQL and create table numbers, write data, and delete data

String methods and instances

使用Qt连接MySql并创建表号、写入数据、删除数据
随机推荐
Better CV link collection (dynamic update)
使用Keras实现 基于注意力机制(Attention)的 LSTM 时间序列预测
Foundation of JUC concurrent programming (1) -- related basic concepts
信号与系统:希尔伯特变换
Qt新建工程简介
Qt 使用纯代码画图异常
Write the list to txt and directly remove the comma in the middle
day4-jvm
String methods and instances
Openpose2d转换3d姿态识别
Yolov5 learning summary (continuously updated)
day1-jvm+leetcode
Day-7 JVM end
JUC并发编程基础(4)--线程组和线程优先级
How to solve the problem of large distribution gap between training set and test set
[activiti] gateway
Common features of ES6
Lunix命令入门 - 用户及文件权限(chmod 详解)
QT novice entry level calculator addition, subtraction, multiplication, division, application
In GCC__ attribute__ ((constructor) and__ attribute__ ((destructor)).