【UE4】在 Dedicate Server 上刷新一帧骨骼 Mesh Pose

问题描述

  在 UE4 中,为了性能优化,常会在 Dedicate Server 上把 Mesh 的 Tick 关掉(即 OnlyTickMontagesWhenNotRendered),使其在在服务器上保持 TPose,只在客户端上实时刷新 Mesh Pose(即 AlwaysTickPoseAndRefreshBones)。

if (GetNetMode() == NM_DedicatedServer && GetMesh())
{
   
   
	GetMesh()->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::OnlyTickPoseWhenRendered;
}

  这样会导致一个问题:当需要在服务器上知道 Mesh Pose 的时候(比如计算 Socket 位置的时候),如在服务器上释放一个法球,法球出生 Transform 为法师特定时刻手的 Transform,那就会计算出错(因为服务器上是 TPose)。
  简单的解决方案就是根据 Root 点配置偏移,通过偏移达到从手的位置释放法球的效果,但是这样的实现方式下,无论什么姿势,什么动作,法球 Spawn 位置固定,表现会不好。
  最好的方法还是在服务器是 Spawn 法球之前,Tick 一次 Mesh Pose,也就是从 TPose 变成正确的(和客户端一致)Pose。参考 UE4 AnswerHub,Tick 方法如下:

if (GetMesh())
{
   
   
	GetMesh()->TickPose(0.f, false);
	GetMesh()->RefreshBoneTransforms();
}

  从表现上看,确实可以达到计算服务器当前帧的 Pose 的目的,但是也发现了新的问题(TriggerAnimNotifi

### Dedicated Wrapper Cell in IT Context In the context of integrated circuit testing, dedicated wrapper cells serve a specific role within the design-for-test (DFT) architecture. Unlike shared wrapper cells that can be reused from existing flip-flops or other sequential elements, dedicated wrapper cells are specifically designed and inserted into the scan chain solely for test purposes[^1]. These cells facilitate efficient boundary-scan testing by providing direct access to internal signals at the boundaries between different blocks. The insertion process involves creating separate input and output wrapper chains based on predefined conditions. Commands such as `set_wrapper_analysis_options` and `analyze_wrapper_cells` help identify which scan cells should function as input or output wrappers. Subsequently, these identified cells get connected through the use of the `insert_test_logic` command to form distinct input and output wrapper chains[^2]. For scenarios where advanced pattern retargeting is not required, using unwrapped cores may suffice; however, when enhanced controllability and observability are necessary—especially during complex system-on-chip (SoC) tests—the inclusion of dedicated wrapper cells becomes crucial[^3]. #### Example Code Snippet Demonstrating Configuration ```tcl # Setting up options before analyzing potential wrapper candidates set_wrapper_analysis_options -setup ... # Analyzing available scan cells to determine suitable ones for wrapping analyze_wrapper_cells # Inserting actual logic including newly created dedicated wrapper cells insert_test_logic ... ``` --related questions-- 1. What advantages do dedicated wrapper cells offer over shared wrapper cells? 2. How does one configure set_wrapper_analysis_options effectively? 3. Can you provide an example scenario requiring both types of wrapper cells? 4. In what situations might it be preferable to avoid adding dedicated wrapper cells? 5. Are there any tools or scripts automating this setup process?
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值