This commit is contained in:
2023-11-28 11:38:59 +05:30
commit ce059d4bf6
2742 changed files with 618089 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0a5206cd53b21be4588ef635952929e9
timeCreated: 1445011372
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,64 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!850595691 &4890085278179872738
LightingSettings:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LipSync_DemoSettings
serializedVersion: 4
m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_RealtimeEnvironmentLighting: 1
m_BounceScale: 1
m_AlbedoBoost: 1
m_IndirectOutputScale: 1
m_UsingShadowmask: 0
m_BakeBackend: 0
m_LightmapMaxSize: 1024
m_BakeResolution: 40
m_Padding: 2
m_LightmapCompression: 3
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAO: 0
m_MixedBakeMode: 1
m_LightmapsBakeMode: 1
m_FilterMode: 1
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_RealtimeResolution: 2
m_ForceWhiteAlbedo: 0
m_ForceUpdates: 0
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_FinalGatherFiltering: 1
m_PVRCulling: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 2
m_PVREnvironmentMIS: 0
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_PVRTiledBaking: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 232b30efb71f50040b9f278c440dce2b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4890085278179872738
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a59ddab39a70b984f94af4f1ceb261d2
folderAsset: yes
timeCreated: 1445015254
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,42 @@
using UnityEngine;
public class EnableSwitch : MonoBehaviour
{
public GameObject[] SwitchTargets;
/// <summary>
/// Sets the active GameObject
/// </summary>
/// <returns><c>true</c>, if active was set, <c>false</c> otherwise.</returns>
/// <param name="target">Target.</param>
public bool SetActive<T>(int target) where T : MonoBehaviour
{
if((target < 0) || (target >= SwitchTargets.Length))
return false;
for (int i = 0; i < SwitchTargets.Length; i++)
{
SwitchTargets[i].SetActive(false);
// Disable texture flip or morph target
OVRLipSyncContextMorphTarget lipsyncContextMorph =
SwitchTargets[i].GetComponent<OVRLipSyncContextMorphTarget>();
if (lipsyncContextMorph)
lipsyncContextMorph.enabled = false;
OVRLipSyncContextTextureFlip lipsyncContextTexture =
SwitchTargets[i].GetComponent<OVRLipSyncContextTextureFlip>();
if (lipsyncContextTexture)
lipsyncContextTexture.enabled = false;
}
SwitchTargets[target].SetActive(true);
MonoBehaviour lipsyncContext = SwitchTargets[target].GetComponent<T>();
if (lipsyncContext != null)
{
lipsyncContext.enabled = true;
}
return true;
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 50cd36abe38c57646bcd09be2353f905
timeCreated: 1445017324
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,88 @@
/************************************************************************************
Filename : LipSyncDemo_Control.cs
Content : LipSync Demo controls
Created : July 11, 2018
Copyright : Copyright Facebook Technologies, LLC and its affiliates.
All rights reserved.
Licensed under the Oculus Audio SDK License Version 3.3 (the "License");
you may not use the Oculus Audio SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
https://developer.oculus.com/licenses/audio-3.3/
Unless required by applicable law or agreed to in writing, the Oculus Audio SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LipSyncDemo_Control : MonoBehaviour {
[Tooltip("Key used to rotate the demo object up to 45 degrees to the left.")]
public KeyCode rotateLeftKey = KeyCode.LeftArrow;
[Tooltip("Key used to rotate the demo object up to 45 degrees to the right.")]
public KeyCode rotateRightKey = KeyCode.RightArrow;
[Tooltip("Key used to reset demo object rotation.")]
public KeyCode resetRotationKey = KeyCode.DownArrow;
private float resetRotation = 180.0f;
private float rotationAmount = 20.0f;
private float rotationMax = 45.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKey(rotateLeftKey))
{
RotateObject(rotationAmount);
}
else if (Input.GetKey(rotateRightKey))
{
RotateObject(-rotationAmount);
}
else if (Input.GetKey(resetRotationKey))
{
RotateObject(resetRotation, true);
}
}
void RotateObject(float amountDegrees, bool absolute = false)
{
GameObject target = GameObject.Find("LipSyncMorphTarget_Female");
if (target == null)
{
// Try for other scene object
target = GameObject.Find("RobotHead_TextureFlip");
}
if (target)
{
if (absolute)
{
float deltaRotate = amountDegrees - target.transform.eulerAngles.y;
target.transform.Rotate(Vector3.up * deltaRotate);
}
else
{
float deltaRotate = Time.deltaTime * amountDegrees;
if (deltaRotate + target.transform.eulerAngles.y >= resetRotation - rotationMax &&
deltaRotate + target.transform.eulerAngles.y <= resetRotation + rotationMax)
{
target.transform.Rotate(Vector3.up * deltaRotate);
}
}
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8a6c32d06b48d244b9c65729404d2afe
timeCreated: 1531249571
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,199 @@
/************************************************************************************
Filename : LipSyncDemo_SetCurrentTarget.cs
Content : Update LipSync Demo current target
Created : July 11, 2018
Copyright : Copyright Facebook Technologies, LLC and its affiliates.
All rights reserved.
Licensed under the Oculus Audio SDK License Version 3.3 (the "License");
you may not use the Oculus Audio SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
https://developer.oculus.com/licenses/audio-3.3/
Unless required by applicable law or agreed to in writing, the Oculus Audio SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************************/
using UnityEngine;
#if UNITY_2019_1_OR_NEWER
using UnityEngine.XR;
#endif
using System.Collections;
using System.Collections.Generic;
public class LipSyncDemo_SetCurrentTarget : MonoBehaviour
{
public EnableSwitch[] SwitchTargets;
private int targetSet = 0;
private int maxTarget = 6;
private bool XRButtonBeingPressed = false;
// Use this for initialization
void Start ()
{
// Add a listener to the OVRTouchpad for touch events
OVRTouchpad.AddListener(LocalTouchEventCallback);
// Initialize the proper target set
targetSet = 0;
SwitchTargets[0].SetActive<OVRLipSyncContextMorphTarget>(0);
SwitchTargets[1].SetActive<OVRLipSyncContextMorphTarget>(0);
}
// Update is called once per frame
// Logic for LipSync_Demo
void Update ()
{
if (Input.GetKeyDown(KeyCode.Alpha1))
{
targetSet = 0;
SetCurrentTarget();
}
else if (Input.GetKeyDown(KeyCode.Alpha2))
{
targetSet = 1;
SetCurrentTarget();
}
else if (Input.GetKeyDown(KeyCode.Alpha3))
{
targetSet = 2;
SetCurrentTarget();
}
else if (Input.GetKeyDown(KeyCode.Alpha4))
{
targetSet = 3;
SetCurrentTarget();
}
else if (Input.GetKeyDown(KeyCode.Alpha5))
{
targetSet = 4;
SetCurrentTarget();
}
else if (Input.GetKeyDown(KeyCode.Alpha6))
{
targetSet = 5;
SetCurrentTarget();
}
// Close app
if (Input.GetKeyDown (KeyCode.Escape))
{
Application.Quit();
}
// VR controllers: primary buttons scrolls forward, secondary backwards
#if UNITY_2019_1_OR_NEWER
var inputDevices = new List<InputDevice>();
#if UNITY_2019_3_OR_NEWER
InputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.HeldInHand, inputDevices);
#else
InputDevices.GetDevicesWithRole(InputDeviceRole.RightHanded, inputDevices);
#endif
var primaryButtonPressed = false;
var secondaryButtonPressed = false;
foreach (var device in inputDevices)
{
bool boolValue;
if (device.TryGetFeatureValue(CommonUsages.primaryButton, out boolValue) && boolValue)
{
primaryButtonPressed = true;
}
if (device.TryGetFeatureValue(CommonUsages.secondaryButton, out boolValue) && boolValue)
{
secondaryButtonPressed = true;
}
}
if (primaryButtonPressed && !XRButtonBeingPressed)
{
targetSet++;
if (targetSet >= maxTarget)
{
targetSet = 0;
}
SetCurrentTarget();
}
if (secondaryButtonPressed && !XRButtonBeingPressed)
{
targetSet--;
if (targetSet < 0)
{
targetSet = maxTarget - 1;
}
SetCurrentTarget();
}
XRButtonBeingPressed = primaryButtonPressed || secondaryButtonPressed;
#endif
}
/// <summary>
/// Sets the current target.
/// </summary>
void SetCurrentTarget()
{
switch(targetSet)
{
case(0):
SwitchTargets[0].SetActive<OVRLipSyncContextMorphTarget>(0);
SwitchTargets[1].SetActive<OVRLipSyncContextMorphTarget>(0);
break;
case(1):
SwitchTargets[0].SetActive<OVRLipSyncContextTextureFlip>(0);
SwitchTargets[1].SetActive<OVRLipSyncContextTextureFlip>(1);
break;
case(2):
SwitchTargets[0].SetActive<OVRLipSyncContextMorphTarget>(1);
SwitchTargets[1].SetActive<OVRLipSyncContextMorphTarget>(2);
break;
case(3):
SwitchTargets[0].SetActive<OVRLipSyncContextTextureFlip>(1);
SwitchTargets[1].SetActive<OVRLipSyncContextTextureFlip>(3);
break;
case(4):
SwitchTargets[0].SetActive<OVRLipSyncContextMorphTarget>(2);
SwitchTargets[1].SetActive<OVRLipSyncContextMorphTarget>(4);
break;
case(5):
SwitchTargets[0].SetActive<OVRLipSyncContextTextureFlip>(2);
SwitchTargets[1].SetActive<OVRLipSyncContextTextureFlip>(5);
break;
}
OVRLipSyncDebugConsole.Clear();
}
/// <summary>
/// Local touch event callback.
/// </summary>
/// <param name="touchEvent">Touch event.</param>
void LocalTouchEventCallback(OVRTouchpad.TouchEvent touchEvent)
{
switch(touchEvent)
{
case(OVRTouchpad.TouchEvent.Left):
targetSet--;
if(targetSet < 0)
targetSet = maxTarget - 1;
SetCurrentTarget();
break;
case(OVRTouchpad.TouchEvent.Right):
targetSet++;
if(targetSet >= maxTarget)
targetSet = 0;
SetCurrentTarget();
break;
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c62f9b5ef85d22f449e72c67c610059d
timeCreated: 1445018007
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: