Merge branch 'main' of https://kindnick-git.duckdns.org/kindnick/Streamingle_URP
This commit is contained in:
commit
a2e080414f
@ -9,6 +9,8 @@ Material:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: hat 1_Copy
|
m_Name: hat 1_Copy
|
||||||
m_Shader: {fileID: 4800000, guid: b4f674f383806e5419ee221e39445de0, type: 3}
|
m_Shader: {fileID: 4800000, guid: b4f674f383806e5419ee221e39445de0, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
m_ValidKeywords:
|
m_ValidKeywords:
|
||||||
- _ALPHAOVERRIDEMAP
|
- _ALPHAOVERRIDEMAP
|
||||||
- _BASEMAP_STACKING_LAYER1
|
- _BASEMAP_STACKING_LAYER1
|
||||||
@ -24,9 +26,11 @@ Material:
|
|||||||
m_LightmapFlags: 4
|
m_LightmapFlags: 4
|
||||||
m_EnableInstancingVariants: 0
|
m_EnableInstancingVariants: 0
|
||||||
m_DoubleSidedGI: 0
|
m_DoubleSidedGI: 0
|
||||||
m_CustomRenderQueue: 2499
|
m_CustomRenderQueue: 2000
|
||||||
stringTagMap: {}
|
stringTagMap: {}
|
||||||
disabledShaderPasses: []
|
disabledShaderPasses:
|
||||||
|
- NiloToonOutline
|
||||||
|
m_LockedProperties:
|
||||||
m_SavedProperties:
|
m_SavedProperties:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
@ -631,7 +635,7 @@ Material:
|
|||||||
- _DissolveThresholdMapTilingY: 1
|
- _DissolveThresholdMapTilingY: 1
|
||||||
- _DitherFadeoutAmount: 0
|
- _DitherFadeoutAmount: 0
|
||||||
- _DitherFadeoutNormalScaleFix: 1
|
- _DitherFadeoutNormalScaleFix: 1
|
||||||
- _DstBlend: 10
|
- _DstBlend: 0
|
||||||
- _DstBlendAlpha: 0
|
- _DstBlendAlpha: 0
|
||||||
- _DynamicEyeFinalBrightness: 2
|
- _DynamicEyeFinalBrightness: 2
|
||||||
- _DynamicEyePupilDepthScale: 0.4
|
- _DynamicEyePupilDepthScale: 0.4
|
||||||
@ -876,7 +880,7 @@ Material:
|
|||||||
- _RenderCharacter: 1
|
- _RenderCharacter: 1
|
||||||
- _RenderFaceGroup: 0
|
- _RenderFaceGroup: 0
|
||||||
- _RenderFacePreset: 2
|
- _RenderFacePreset: 2
|
||||||
- _RenderOutline: 1
|
- _RenderOutline: 0
|
||||||
- _RenderScreenSpaceOutline: 0
|
- _RenderScreenSpaceOutline: 0
|
||||||
- _RenderScreenSpaceOutlineV2: 0
|
- _RenderScreenSpaceOutlineV2: 0
|
||||||
- _ScreenSpaceOutlineDepthSensitivity: 1
|
- _ScreenSpaceOutlineDepthSensitivity: 1
|
||||||
@ -936,7 +940,7 @@ Material:
|
|||||||
- _SpecularReactToLightDirMode: 0
|
- _SpecularReactToLightDirMode: 0
|
||||||
- _SpecularShowInShadowArea: 0
|
- _SpecularShowInShadowArea: 0
|
||||||
- _SpecularUseReplaceBlending: 0
|
- _SpecularUseReplaceBlending: 0
|
||||||
- _SrcBlend: 5
|
- _SrcBlend: 1
|
||||||
- _SrcBlendAlpha: 1
|
- _SrcBlendAlpha: 1
|
||||||
- _StencilComp: 0
|
- _StencilComp: 0
|
||||||
- _StencilGroup: 0
|
- _StencilGroup: 0
|
||||||
@ -945,7 +949,7 @@ Material:
|
|||||||
- _StencilRef: 0
|
- _StencilRef: 0
|
||||||
- _SupportClothDynamics: 0
|
- _SupportClothDynamics: 0
|
||||||
- _Surface: 0
|
- _Surface: 0
|
||||||
- _SurfaceTypePreset: 2
|
- _SurfaceTypePreset: 1
|
||||||
- _UIDisplayMode: 100
|
- _UIDisplayMode: 100
|
||||||
- _UV0RotateSpeed: 0
|
- _UV0RotateSpeed: 0
|
||||||
- _UV0RotatedAngle: 0
|
- _UV0RotatedAngle: 0
|
||||||
@ -1171,3 +1175,4 @@ Material:
|
|||||||
- _UV3ScrollSpeed: {r: 0, g: 0, b: 0, a: 0}
|
- _UV3ScrollSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||||
- _ZOffsetMaskMapChannelMask: {r: 0, g: 1, b: 0, a: 0}
|
- _ZOffsetMaskMapChannelMask: {r: 0, g: 1, b: 0, a: 0}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
|||||||
@ -63,7 +63,7 @@ Material:
|
|||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _BaseMap:
|
- _BaseMap:
|
||||||
m_Texture: {fileID: 2800000, guid: d0647b58bfed0c04ea3d4214a95eb884, type: 3}
|
m_Texture: {fileID: 2800000, guid: 243bd60d4768bd8419ef636d217a1bec, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _BaseMapStackingLayer10MaskTex:
|
- _BaseMapStackingLayer10MaskTex:
|
||||||
|
|||||||
BIN
Assets/ResourcesData/Etc/Fake Shadow/Fake Shadow_Pos.prefab
(Stored with Git LFS)
BIN
Assets/ResourcesData/Etc/Fake Shadow/Fake Shadow_Pos.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/ResourcesData/Project/251201_문모모_최똥_방송/251201_문모모_최또_방송.unity
(Stored with Git LFS)
BIN
Assets/ResourcesData/Project/251201_문모모_최똥_방송/251201_문모모_최또_방송.unity
(Stored with Git LFS)
Binary file not shown.
@ -38,6 +38,7 @@ namespace KindRetargeting
|
|||||||
private float hipsOffsetZ = 0f; // 캐릭터 기준 앞뒤 (항상 Forward 방향)
|
private float hipsOffsetZ = 0f; // 캐릭터 기준 앞뒤 (항상 Forward 방향)
|
||||||
|
|
||||||
[HideInInspector] public float HipsWeightOffset = 1f;
|
[HideInInspector] public float HipsWeightOffset = 1f;
|
||||||
|
[HideInInspector] public float ChairSeatHeightOffset = 0f; // 의자 좌석 높이 오프셋 (월드 Y 기준)
|
||||||
|
|
||||||
// 축 매핑: 월드 방향(Right/Up/Forward)을 담당하는 로컬 축을 저장
|
// 축 매핑: 월드 방향(Right/Up/Forward)을 담당하는 로컬 축을 저장
|
||||||
// 예: localAxisForWorldRight = (0, 0, 1) 이면 로컬 Z축이 월드 Right 방향을 담당
|
// 예: localAxisForWorldRight = (0, 0, 1) 이면 로컬 Z축이 월드 Right 방향을 담당
|
||||||
@ -164,6 +165,8 @@ namespace KindRetargeting
|
|||||||
public List<RotationOffsetData> fingerCloseRotationsCache;
|
public List<RotationOffsetData> fingerCloseRotationsCache;
|
||||||
// 소스 머슬 캘리브레이션 데이터
|
// 소스 머슬 캘리브레이션 데이터
|
||||||
public List<MuscleCalibrationData> sourceMuscleCalibrationCache;
|
public List<MuscleCalibrationData> sourceMuscleCalibrationCache;
|
||||||
|
// 의자 앉기 높이 오프셋 (LimbWeightController)
|
||||||
|
public float chairSeatHeightOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
@ -624,6 +627,10 @@ namespace KindRetargeting
|
|||||||
muscleCalibrationCache.Add(new MuscleCalibrationData(kvp.Key, kvp.Value.open, kvp.Value.close));
|
muscleCalibrationCache.Add(new MuscleCalibrationData(kvp.Key, kvp.Value.open, kvp.Value.close));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LimbWeightController에서 의자 높이 오프셋 가져오기
|
||||||
|
var limbController = GetComponent<LimbWeightController>();
|
||||||
|
float chairOffset = limbController != null ? limbController.chairSeatHeightOffset : 0.05f;
|
||||||
|
|
||||||
var settings = new RetargetingSettings
|
var settings = new RetargetingSettings
|
||||||
{
|
{
|
||||||
hipsOffsetX = hipsOffsetX,
|
hipsOffsetX = hipsOffsetX,
|
||||||
@ -647,6 +654,7 @@ namespace KindRetargeting
|
|||||||
fingerOpenRotationsCache = fingerOpenCache,
|
fingerOpenRotationsCache = fingerOpenCache,
|
||||||
fingerCloseRotationsCache = fingerCloseCache,
|
fingerCloseRotationsCache = fingerCloseCache,
|
||||||
sourceMuscleCalibrationCache = muscleCalibrationCache,
|
sourceMuscleCalibrationCache = muscleCalibrationCache,
|
||||||
|
chairSeatHeightOffset = chairOffset,
|
||||||
};
|
};
|
||||||
|
|
||||||
string json = JsonUtility.ToJson(settings, true);
|
string json = JsonUtility.ToJson(settings, true);
|
||||||
@ -740,6 +748,13 @@ namespace KindRetargeting
|
|||||||
// Mingle 캘리브레이션 완료 여부 확인
|
// Mingle 캘리브레이션 완료 여부 확인
|
||||||
isMingleCalibrated = fingerOpenRotations.Count > 0 && fingerCloseRotations.Count > 0;
|
isMingleCalibrated = fingerOpenRotations.Count > 0 && fingerCloseRotations.Count > 0;
|
||||||
|
|
||||||
|
// LimbWeightController에 의자 높이 오프셋 적용
|
||||||
|
var limbController = GetComponent<LimbWeightController>();
|
||||||
|
if (limbController != null)
|
||||||
|
{
|
||||||
|
limbController.chairSeatHeightOffset = settings.chairSeatHeightOffset;
|
||||||
|
}
|
||||||
|
|
||||||
//너무 자주 출력되어서 주석처리
|
//너무 자주 출력되어서 주석처리
|
||||||
//Debug.Log($"설정을 로드했습니다: {filePath}");
|
//Debug.Log($"설정을 로드했습니다: {filePath}");
|
||||||
}
|
}
|
||||||
@ -1601,6 +1616,9 @@ namespace KindRetargeting
|
|||||||
// 4. 바닥 높이 추가 (월드 Y축 - 바닥은 항상 월드 기준)
|
// 4. 바닥 높이 추가 (월드 Y축 - 바닥은 항상 월드 기준)
|
||||||
adjustedPosition.y += floorHeight;
|
adjustedPosition.y += floorHeight;
|
||||||
|
|
||||||
|
// 5. 의자 좌석 높이 오프셋 추가 (월드 Y축 - 로컬 보정과 별개)
|
||||||
|
adjustedPosition.y += ChairSeatHeightOffset;
|
||||||
|
|
||||||
targetHips.position = adjustedPosition;
|
targetHips.position = adjustedPosition;
|
||||||
|
|
||||||
// 6. IK 타겟에도 동기화
|
// 6. IK 타겟에도 동기화
|
||||||
|
|||||||
@ -20,6 +20,7 @@ namespace KindRetargeting
|
|||||||
SerializedProperty footHeightMaxThreshold;
|
SerializedProperty footHeightMaxThreshold;
|
||||||
SerializedProperty enableLeftArmIK;
|
SerializedProperty enableLeftArmIK;
|
||||||
SerializedProperty enableRightArmIK;
|
SerializedProperty enableRightArmIK;
|
||||||
|
SerializedProperty chairSeatHeightOffset;
|
||||||
|
|
||||||
private bool showDistanceSettings = true;
|
private bool showDistanceSettings = true;
|
||||||
private bool showWeightSettings = true;
|
private bool showWeightSettings = true;
|
||||||
@ -28,6 +29,7 @@ namespace KindRetargeting
|
|||||||
private bool showGroundHipsSettings = true;
|
private bool showGroundHipsSettings = true;
|
||||||
private bool showFootHeightSettings = true;
|
private bool showFootHeightSettings = true;
|
||||||
private bool showIKActivationSettings = true;
|
private bool showIKActivationSettings = true;
|
||||||
|
private bool showChairSeatSettings = true;
|
||||||
|
|
||||||
protected override void OnEnable()
|
protected override void OnEnable()
|
||||||
{
|
{
|
||||||
@ -50,6 +52,7 @@ namespace KindRetargeting
|
|||||||
footHeightMaxThreshold = serializedObject.FindProperty("footHeightMaxThreshold");
|
footHeightMaxThreshold = serializedObject.FindProperty("footHeightMaxThreshold");
|
||||||
enableLeftArmIK = serializedObject.FindProperty("enableLeftArmIK");
|
enableLeftArmIK = serializedObject.FindProperty("enableLeftArmIK");
|
||||||
enableRightArmIK = serializedObject.FindProperty("enableRightArmIK");
|
enableRightArmIK = serializedObject.FindProperty("enableRightArmIK");
|
||||||
|
chairSeatHeightOffset = serializedObject.FindProperty("chairSeatHeightOffset");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,6 +173,15 @@ namespace KindRetargeting
|
|||||||
EditorGUI.indentLevel--;
|
EditorGUI.indentLevel--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.Space(5);
|
||||||
|
showChairSeatSettings = EditorGUILayout.Foldout(showChairSeatSettings, "의자 앉기 높이 설정", true);
|
||||||
|
if (showChairSeatSettings)
|
||||||
|
{
|
||||||
|
EditorGUI.indentLevel++;
|
||||||
|
EditorGUILayout.PropertyField(chairSeatHeightOffset, new GUIContent("좌석 높이 오프셋", "의자에 앉을 때 엉덩이가 좌석면에서 떠있는 높이 (월드 Y 기준)"));
|
||||||
|
EditorGUI.indentLevel--;
|
||||||
|
}
|
||||||
|
|
||||||
EditorGUILayout.Space(5);
|
EditorGUILayout.Space(5);
|
||||||
showReferences = EditorGUILayout.Foldout(showReferences, "참조 설정", true);
|
showReferences = EditorGUILayout.Foldout(showReferences, "참조 설정", true);
|
||||||
if (showReferences)
|
if (showReferences)
|
||||||
|
|||||||
@ -295,6 +295,24 @@ public class RetargetingControlWindow : EditorWindow
|
|||||||
EditorGUILayout.Slider(hipsOffsetZProp, -1f, 1f,
|
EditorGUILayout.Slider(hipsOffsetZProp, -1f, 1f,
|
||||||
new GUIContent("← 앞뒤 →", "캐릭터 기준 뒤(-) / 앞(+)"));
|
new GUIContent("← 앞뒤 →", "캐릭터 기준 뒤(-) / 앞(+)"));
|
||||||
|
|
||||||
|
// 의자 앉기 높이 설정 (월드 Y 기준)
|
||||||
|
EditorGUILayout.Space(5);
|
||||||
|
var limb = script.GetComponent<LimbWeightController>();
|
||||||
|
if (limb != null)
|
||||||
|
{
|
||||||
|
var serializedLimb = new SerializedObject(limb);
|
||||||
|
serializedLimb.Update();
|
||||||
|
var chairSeatHeightOffset = serializedLimb.FindProperty("chairSeatHeightOffset");
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
EditorGUILayout.Slider(chairSeatHeightOffset, -1f, 1f,
|
||||||
|
new GUIContent("의자 앉기 높이", "의자에 앉을 때 엉덩이 높이 조정 (월드 Y 기준)"));
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
{
|
||||||
|
serializedLimb.ApplyModifiedProperties();
|
||||||
|
EditorUtility.SetDirty(limb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EditorGUI.indentLevel--;
|
EditorGUI.indentLevel--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,11 @@ namespace KindRetargeting
|
|||||||
[SerializeField] public bool enableLeftArmIK = true; // 왼팔 IK 활성화 여부
|
[SerializeField] public bool enableLeftArmIK = true; // 왼팔 IK 활성화 여부
|
||||||
[SerializeField] public bool enableRightArmIK = true; // 오른팔 IK 활성화 여부
|
[SerializeField] public bool enableRightArmIK = true; // 오른팔 IK 활성화 여부
|
||||||
|
|
||||||
|
[Header("의자 앉기 높이 설정")]
|
||||||
|
[Tooltip("의자에 앉을 때 엉덩이 높이 조정 (월드 Y 기준, +: 위로, -: 아래로)")]
|
||||||
|
[SerializeField, Range(-1f, 1f)]
|
||||||
|
public float chairSeatHeightOffset = 0.05f;
|
||||||
|
|
||||||
private FullBodyInverseKinematics_RND fbik;
|
private FullBodyInverseKinematics_RND fbik;
|
||||||
|
|
||||||
private CustomRetargetingScript crs;
|
private CustomRetargetingScript crs;
|
||||||
@ -60,6 +65,10 @@ namespace KindRetargeting
|
|||||||
List<float> hipsWeights = new List<float>();
|
List<float> hipsWeights = new List<float>();
|
||||||
private float MasterHipsWeight = 1f;
|
private float MasterHipsWeight = 1f;
|
||||||
|
|
||||||
|
// 의자 좌석 높이 오프셋 (월드 Y 기준)
|
||||||
|
private float currentChairSeatOffset = 0f;
|
||||||
|
private float targetChairSeatOffset = 0f;
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
//손의 거리를 기반으로한 가중치 적용
|
//손의 거리를 기반으로한 가중치 적용
|
||||||
@ -297,18 +306,35 @@ namespace KindRetargeting
|
|||||||
if (hipsTransform != null && props != null)
|
if (hipsTransform != null && props != null)
|
||||||
{
|
{
|
||||||
float minDistance = float.MaxValue;
|
float minDistance = float.MaxValue;
|
||||||
|
bool foundChair = false;
|
||||||
|
|
||||||
foreach (Transform prop in props)
|
foreach (Transform prop in props)
|
||||||
{
|
{
|
||||||
PropTypeController ptc = prop.GetComponent<PropTypeController>();
|
PropTypeController ptc = prop.GetComponent<PropTypeController>();
|
||||||
if (ptc != null && ptc.propType == EnumsList.PropType.Chair)
|
if (ptc != null && ptc.propType == EnumsList.PropType.Chair)
|
||||||
{
|
{
|
||||||
float distance = Vector3.Distance(hipsTransform.position, prop.childCount > 0 ? prop.GetChild(0).position : prop.position);
|
float distance = Vector3.Distance(hipsTransform.position, prop.childCount > 0 ? prop.GetChild(0).position : prop.position);
|
||||||
minDistance = Mathf.Min(minDistance, distance);
|
if (distance < minDistance)
|
||||||
|
{
|
||||||
|
minDistance = distance;
|
||||||
|
foundChair = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float t = Mathf.Clamp01((minDistance - hipsMinDistance) / (hipsMaxDistance - hipsMinDistance));
|
float t = Mathf.Clamp01((minDistance - hipsMinDistance) / (hipsMaxDistance - hipsMinDistance));
|
||||||
hipsWeights[0] = t; // 직접 HipsWeightOffset 수정 대신 배열에 저장
|
hipsWeights[0] = t; // 직접 HipsWeightOffset 수정 대신 배열에 저장
|
||||||
|
|
||||||
|
// 의자 좌석 높이 오프셋 계산 (가까울수록 더 적용) - 캐릭터별 설정 사용
|
||||||
|
if (foundChair)
|
||||||
|
{
|
||||||
|
// t가 0에 가까울수록 의자에 가까움 → 좌석 오프셋 더 적용
|
||||||
|
targetChairSeatOffset = chairSeatHeightOffset * (1f - t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetChairSeatOffset = 0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,10 +388,18 @@ namespace KindRetargeting
|
|||||||
weightSmoothSpeed * deltaTime
|
weightSmoothSpeed * deltaTime
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 의자 좌석 높이 오프셋 스무딩 (월드 Y 기준)
|
||||||
|
currentChairSeatOffset = Mathf.Lerp(
|
||||||
|
currentChairSeatOffset,
|
||||||
|
targetChairSeatOffset,
|
||||||
|
weightSmoothSpeed * deltaTime
|
||||||
|
);
|
||||||
|
|
||||||
// CustomRetargetingScript에 최종 가중치 전달
|
// CustomRetargetingScript에 최종 가중치 전달
|
||||||
if (crs != null)
|
if (crs != null)
|
||||||
{
|
{
|
||||||
crs.HipsWeightOffset = MasterHipsWeight;
|
crs.HipsWeightOffset = MasterHipsWeight;
|
||||||
|
crs.ChairSeatHeightOffset = currentChairSeatOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ public class CameraInfoUI : MonoBehaviour
|
|||||||
private CameraManager cameraManager;
|
private CameraManager cameraManager;
|
||||||
private CameraControlSystem cameraControlSystem;
|
private CameraControlSystem cameraControlSystem;
|
||||||
private float lastUpdateTime;
|
private float lastUpdateTime;
|
||||||
private bool isUIVisible = true;
|
private bool isUIVisible = false;
|
||||||
private Coroutine flashCoroutine;
|
private Coroutine flashCoroutine;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
@ -109,6 +109,9 @@ public class CameraInfoUI : MonoBehaviour
|
|||||||
flashRect.anchoredPosition = Vector2.zero;
|
flashRect.anchoredPosition = Vector2.zero;
|
||||||
|
|
||||||
flashPanel.SetActive(false);
|
flashPanel.SetActive(false);
|
||||||
|
|
||||||
|
// UI 기본 상태: 꺼짐
|
||||||
|
uiPanel.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateInfoText(string label, out Text textComponent, int index)
|
private void CreateInfoText(string label, out Text textComponent, int index)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user