improve live

This commit is contained in:
左右看
2023-07-06 17:34:17 +08:00
parent 22b1de6517
commit e9c0a7a428
6 changed files with 339 additions and 70 deletions
@@ -12,9 +12,11 @@ namespace Gallop.Live.Cutt
public LiveTimelineKeyFacialMouthData mouth; // 0x10
public LiveTimelineKeyFacialEyeData eyeCur; // 0x18
public LiveTimelineKeyFacialEyeData eyeNext; // 0x20
public LiveTimelineKeyFacialEyebrowData eyebrow; // 0x28
public LiveTimelineKeyFacialEyebrowData eyebrowCur; // 0x28
public LiveTimelineKeyFacialEyebrowData eyebrowNext; // 0x28
public LiveTimelineKeyFacialEyeTrackData eyeTrack; // 0x30
public LiveTimelineKeyFacialEarData ear; // 0x38
public LiveTimelineKeyFacialEarData earCur; // 0x38
public LiveTimelineKeyFacialEarData earNext; // 0x38
public LiveTimelineKeyFacialEffectData effect; // 0x40
public int faceKeyIndex; // 0x48
public int mouthKeyIndex; // 0x4C
@@ -113,6 +113,8 @@ namespace Gallop.Live.Cutt
if (facialDataList != null)
{
SetupFacialUpdateInfo_Eye(ref updateInfo, facialDataList.eyeKeys, liveTime);
SetupFacialUpdateInfo_Eyebrow(ref updateInfo, facialDataList.eyebrowKeys, liveTime);
SetupFacialUpdateInfo_Ear(ref updateInfo, facialDataList.earKeys, liveTime);
this.OnUpdateFacial(updateInfo, liveTime);
}
}
@@ -130,6 +132,32 @@ namespace Gallop.Live.Cutt
updateInfo.eyeKeyIndex = curKey.index;
}
private void SetupFacialUpdateInfo_Eyebrow(ref FacialDataUpdateInfo updateInfo, LiveTimelineKeyFacialEyebrowDataList keys, float time)
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKey liveTimelineKey2 = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
liveTimelineKey = curKey.key;
liveTimelineKey2 = curKey.nextKey;
updateInfo.eyebrowCur = liveTimelineKey as LiveTimelineKeyFacialEyebrowData;
updateInfo.eyebrowNext = liveTimelineKey2 as LiveTimelineKeyFacialEyebrowData;
updateInfo.eyebrowKeyIndex = curKey.index;
}
private void SetupFacialUpdateInfo_Ear(ref FacialDataUpdateInfo updateInfo, LiveTimelineKeyFacialEarDataList keys, float time)
{
LiveTimelineKey liveTimelineKey = null;
LiveTimelineKey liveTimelineKey2 = null;
LiveTimelineKeyIndex curKey = AlterUpdate_Key(keys, time);
liveTimelineKey = curKey.key;
liveTimelineKey2 = curKey.nextKey;
updateInfo.earCur = liveTimelineKey as LiveTimelineKeyFacialEarData;
updateInfo.earNext = liveTimelineKey2 as LiveTimelineKeyFacialEarData;
updateInfo.earKeyIndex = curKey.index;
}
public void AlterUpdate_LipSync(float liveTime)
{
var lipDataList = data.worksheetList[0].ripSyncKeys;
@@ -4,7 +4,7 @@ using UnityEngine;
namespace Gallop.Live.Cutt
{
[System.Serializable]
[System.Serializable]
public class LiveTimelineKeyFacialFaceData : LiveTimelineKey
{
public int facialId;
@@ -12,6 +12,7 @@ using static UnityEditor.Experimental.AssetDatabaseExperimental.AssetDatabaseCou
using System.Data;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using CriWare;
using static UmaViewerAudio;
namespace Gallop.Live
{
@@ -386,7 +387,7 @@ namespace Gallop.Live
var container = charaObjs[k].GetComponentInChildren<UmaContainer>();
if(container != null)
{
container.FaceDrivenKeyTarget.AlterUpdateAutoLip(keyData_, liveTime_);
container.FaceDrivenKeyTarget.AlterUpdateAutoLip(keyData_, liveTime_, ((int)keyData_.character >> k) % 2);
}
}
};