Browse Source

camera adj

audio
Cailean Finn 5 months ago
parent
commit
89bc001bb9
  1. 152
      Assets/5_Scenes/DreconDemo.unity
  2. 2
      Assets/8_Scripts/1_Managers/CameraManager.cs
  3. 2
      Assets/8_Scripts/2_General/Scriptable Objects/Camera/ActutationsCamera.asset
  4. 2
      Assets/8_Scripts/2_General/Scriptable Objects/Camera/PoseCamera.asset
  5. 38
      Assets/LensOscillate.cs
  6. 11
      Assets/LensOscillate.cs.meta
  7. 2
      Assets/ML-Agents/Timers/DreconDemo_timers.json

152
Assets/5_Scenes/DreconDemo.unity

@ -919,22 +919,22 @@ LineRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: -338.17535, y: -21.955078, z: -296.69977}
- {x: -117.49461, y: -21.955078, z: -296.69977}
- {x: -117.49461, y: -21.955078, z: -83.861465}
- {x: -338.17535, y: -21.955078, z: -83.861465}
- {x: -338.17535, y: -21.955078, z: -296.69977}
- {x: -338.17535, y: 423.14645, z: -296.69977}
- {x: -117.49461, y: 423.14645, z: -296.69977}
- {x: -117.49461, y: -21.955078, z: -296.69977}
- {x: -117.49461, y: 423.14645, z: -296.69977}
- {x: -117.49461, y: 423.14645, z: -83.861465}
- {x: -117.49461, y: -21.955078, z: -83.861465}
- {x: -117.49461, y: 423.14645, z: -83.861465}
- {x: -338.17535, y: 423.14645, z: -83.861465}
- {x: -338.17535, y: -21.955078, z: -83.861465}
- {x: -338.17535, y: 423.14645, z: -83.861465}
- {x: -338.17535, y: 423.14645, z: -296.69977}
- {x: -336.35178, y: -23.040375, z: -264.943}
- {x: -128.76859, y: -23.040375, z: -264.943}
- {x: -128.76859, y: -23.040375, z: -67.8672}
- {x: -336.35178, y: -23.040375, z: -67.8672}
- {x: -336.35178, y: -23.040375, z: -264.943}
- {x: -336.35178, y: 422.16306, z: -264.943}
- {x: -128.76859, y: 422.16306, z: -264.943}
- {x: -128.76859, y: -23.040375, z: -264.943}
- {x: -128.76859, y: 422.16306, z: -264.943}
- {x: -128.76859, y: 422.16306, z: -67.8672}
- {x: -128.76859, y: -23.040375, z: -67.8672}
- {x: -128.76859, y: 422.16306, z: -67.8672}
- {x: -336.35178, y: 422.16306, z: -67.8672}
- {x: -336.35178, y: -23.040375, z: -67.8672}
- {x: -336.35178, y: 422.16306, z: -67.8672}
- {x: -336.35178, y: 422.16306, z: -264.943}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
@ -1268,7 +1268,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 62178361}
serializedVersion: 2
m_LocalRotation: {x: 0.12400306, y: -0.09265334, z: 0.011630276, w: 0.9878782}
m_LocalRotation: {x: 0.12400308, y: -0.092653364, z: 0.011630281, w: 0.9878782}
m_LocalPosition: {x: 24.371735, y: 51, z: -83.27547}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -2053,7 +2053,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 153031623}
serializedVersion: 2
m_LocalRotation: {x: -0.000010763138, y: 0.9982297, z: 0.059476644, w: -0.000077583616}
m_LocalRotation: {x: -0.000010763111, y: 0.9982297, z: 0.059476666, w: -0.000077584016}
m_LocalPosition: {x: 18.101631, y: 8.540332, z: 4.4995093}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -3856,6 +3856,7 @@ GameObject:
- component: {fileID: 320225264}
- component: {fileID: 320225265}
- component: {fileID: 320225266}
- component: {fileID: 320225267}
m_Layer: 0
m_Name: Actuations-Ortho
m_TagString: vc_Actuations
@ -3871,8 +3872,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 320225263}
serializedVersion: 2
m_LocalRotation: {x: 0.28226304, y: -0.69399333, z: 0.34734362, w: 0.5639621}
m_LocalPosition: {x: 157.60458, y: 326.77478, z: -328.9009}
m_LocalRotation: {x: -0.1099321, y: 0.80572003, z: -0.56010956, w: -0.15813781}
m_LocalPosition: {x: 146.21135, y: 328.14355, z: -324.69598}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -3900,8 +3901,8 @@ MonoBehaviour:
m_LookAt: {fileID: 453061649}
m_Follow: {fileID: 1683887270}
m_Lens:
FieldOfView: 9.13
OrthographicSize: 0.46
FieldOfView: 0.3993083
OrthographicSize: 0.4493446
NearClipPlane: 0.01
FarClipPlane: 5000
Dutch: 0
@ -3938,6 +3939,21 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_CameraSettings: {fileID: 11400000, guid: 3fb4b8e2fc7d5ce48888b95813dab32c, type: 2}
--- !u!114 &320225267
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 320225263}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2192701eda8335047b86c6af5a77cd53, type: 3}
m_Name:
m_EditorClassIdentifier:
m_VirtualCamera: {fileID: 320225265}
m_Speed: 0.1
m_FOV: 0
--- !u!1 &326736459
GameObject:
m_ObjectHideFlags: 0
@ -4176,9 +4192,9 @@ Camera:
height: 1
near clip plane: 0.01
far clip plane: 5000
field of view: 9.13
field of view: 0.3993083
orthographic: 1
orthographic size: 0.46
orthographic size: 0.4493446
m_Depth: -1
m_CullingMask:
serializedVersion: 2
@ -4202,8 +4218,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
serializedVersion: 2
m_LocalRotation: {x: 0.28226304, y: -0.69399333, z: 0.34734362, w: 0.5639621}
m_LocalPosition: {x: 157.60458, y: 326.77478, z: -328.9009}
m_LocalRotation: {x: -0.1099321, y: 0.80572003, z: -0.56010956, w: -0.15813781}
m_LocalPosition: {x: 146.21135, y: 328.14355, z: -324.69598}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -5288,13 +5304,13 @@ MonoBehaviour:
width: 0.2
m_Looped: 1
m_Waypoints:
- position: {x: 7.07333, y: 0, z: -2.9832458}
- position: {x: 3.5980759, y: 0, z: -0.043182373}
roll: 0
- position: {x: 5.410633, y: 0, z: 8.585724}
- position: {x: 1.3850021, y: 0, z: 4.030182}
roll: 0
- position: {x: -6.535309, y: 0, z: 4.4384766}
- position: {x: -3.48732, y: 0, z: 1.3222046}
roll: 0
- position: {x: -3.7983856, y: 0, z: -6.745453}
- position: {x: -0.95993805, y: 0, z: -3.2229004}
roll: 0
--- !u!1 &408004396
GameObject:
@ -10023,7 +10039,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: -40, z: 0}
m_TrackedObjectOffset: {x: 0, y: -60, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_LookaheadIgnoreY: 0
@ -11377,7 +11393,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 882491594}
serializedVersion: 2
m_LocalRotation: {x: 0.25553456, y: 0.66416013, z: -0.6526683, w: 0.2600339}
m_LocalRotation: {x: 0.25553492, y: 0.66415995, z: -0.65266806, w: 0.26003432}
m_LocalPosition: {x: 18.100853, y: 10.055965, z: -0.48116565}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -13835,8 +13851,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080996487}
serializedVersion: 2
m_LocalRotation: {x: 0.01672008, y: 0.8685767, z: -0.02937429, w: 0.49440077}
m_LocalPosition: {x: -34.512222, y: 103.98984, z: 42.69754}
m_LocalRotation: {x: -0.007323872, y: -0.33525646, z: -0.002606294, w: 0.94209486}
m_LocalPosition: {x: -214.38553, y: 91.33577, z: -55.74029}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -13859,7 +13875,7 @@ MonoBehaviour:
m_UpdateMethod: 0
m_PositionUnits: 1
m_Speed: 2
m_Position: 0.44758606
m_Position: 500
--- !u!4 &1082549878 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 9c26b1036545e1e478afe84464ba5588,
@ -14418,8 +14434,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 0.1
m_AmplitudeGain: 4.5
m_FrequencyGain: 0.05
mNoiseOffsets: {x: -933.8756, y: -486.32202, z: 1.2081909}
--- !u!114 &1111505392
MonoBehaviour:
@ -15480,8 +15496,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 0.1
m_AmplitudeGain: 4.5
m_FrequencyGain: 0.05
mNoiseOffsets: {x: -933.8756, y: -486.32202, z: 1.2081909}
--- !u!114 &1191875773
MonoBehaviour:
@ -15785,7 +15801,7 @@ Transform:
m_GameObject: {fileID: 1219864459}
serializedVersion: 2
m_LocalRotation: {x: -0.026052836, y: 0.7066267, z: -0.7066267, w: -0.026052836}
m_LocalPosition: {x: 68.48778, y: 154.98984, z: 116.69754}
m_LocalPosition: {x: -111.38552, y: 142.33577, z: 18.259708}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -18202,8 +18218,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1440085503}
serializedVersion: 2
m_LocalRotation: {x: -0.0065367697, y: 0.98346967, z: -0.17728452, w: -0.036262132}
m_LocalPosition: {x: 68.48778, y: 154.98984, z: 116.69754}
m_LocalRotation: {x: 0.07517407, y: 0.86466235, z: -0.1360704, w: 0.47769526}
m_LocalPosition: {x: -111.38552, y: 142.33577, z: 18.259708}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -18232,7 +18248,7 @@ MonoBehaviour:
m_Follow: {fileID: 1080996488}
m_Lens:
FieldOfView: 30.1
OrthographicSize: 26
OrthographicSize: 90
NearClipPlane: 0.1
FarClipPlane: 50000
Dutch: 0
@ -19500,8 +19516,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 0.1
m_AmplitudeGain: 4.5
m_FrequencyGain: 0.05
mNoiseOffsets: {x: -933.8756, y: -486.32202, z: 1.2081909}
--- !u!114 &1531711174
MonoBehaviour:
@ -20210,8 +20226,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1585336076}
serializedVersion: 2
m_LocalRotation: {x: -0.028847452, y: 0.71116596, z: -0.7020458, w: -0.023293788}
m_LocalPosition: {x: 68.48778, y: 154.98984, z: 116.69754}
m_LocalRotation: {x: 0.067322366, y: 0.8683727, z: -0.12075025, w: 0.47625202}
m_LocalPosition: {x: -111.38552, y: 142.33577, z: 18.259708}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -21511,7 +21527,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1634889327}
serializedVersion: 2
m_LocalRotation: {x: -0.2541521, y: 0.69070727, z: -0.61357707, w: -0.28610045}
m_LocalRotation: {x: -0.25950268, y: 0.6790122, z: -0.62649494, w: -0.28125605}
m_LocalPosition: {x: 11.361925, y: 9.244215, z: 7.779041}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -21540,7 +21556,7 @@ MonoBehaviour:
m_LookAt: {fileID: 1853480535}
m_Follow: {fileID: 1645504645}
m_Lens:
FieldOfView: 24.69
FieldOfView: 35
OrthographicSize: 0.53
NearClipPlane: 1
FarClipPlane: 5000
@ -22089,8 +22105,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1683887269}
serializedVersion: 2
m_LocalRotation: {x: -0, y: 0.023243474, z: -0, w: 0.9997299}
m_LocalPosition: {x: 8.465775, y: 0, z: 1.7690735}
m_LocalRotation: {x: -0, y: -0.6045008, z: -0, w: 0.7966046}
m_LocalPosition: {x: 1.6226807, y: 0, z: 3.9745789}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -23849,22 +23865,22 @@ LineRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: -82.87373, y: -19.819351, z: -251.72586}
- {x: 191.44746, y: -19.819351, z: -251.72586}
- {x: 191.44746, y: -19.819351, z: 20.282982}
- {x: -82.87373, y: -19.819351, z: 20.282982}
- {x: -82.87373, y: -19.819351, z: -251.72586}
- {x: -82.87373, y: 464.3335, z: -251.72586}
- {x: 191.44746, y: 464.3335, z: -251.72586}
- {x: 191.44746, y: -19.819351, z: -251.72586}
- {x: 191.44746, y: 464.3335, z: -251.72586}
- {x: 191.44746, y: 464.3335, z: 20.282982}
- {x: 191.44746, y: -19.819351, z: 20.282982}
- {x: 191.44746, y: 464.3335, z: 20.282982}
- {x: -82.87373, y: 464.3335, z: 20.282982}
- {x: -82.87373, y: -19.819351, z: 20.282982}
- {x: -82.87373, y: 464.3335, z: 20.282982}
- {x: -82.87373, y: 464.3335, z: -251.72586}
- {x: -93.83374, y: -17.741898, z: -244.3446}
- {x: 168.15671, y: -17.741898, z: -244.3446}
- {x: 168.15671, y: -17.741898, z: 18.026672}
- {x: -93.83374, y: -17.741898, z: 18.026672}
- {x: -93.83374, y: -17.741898, z: -244.3446}
- {x: -93.83374, y: 407.62787, z: -244.3446}
- {x: 168.15671, y: 407.62787, z: -244.3446}
- {x: 168.15671, y: -17.741898, z: -244.3446}
- {x: 168.15671, y: 407.62787, z: -244.3446}
- {x: 168.15671, y: 407.62787, z: 18.026672}
- {x: 168.15671, y: -17.741898, z: 18.026672}
- {x: 168.15671, y: 407.62787, z: 18.026672}
- {x: -93.83374, y: 407.62787, z: 18.026672}
- {x: -93.83374, y: -17.741898, z: 18.026672}
- {x: -93.83374, y: 407.62787, z: 18.026672}
- {x: -93.83374, y: 407.62787, z: -244.3446}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
@ -24798,7 +24814,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1955078056}
serializedVersion: 2
m_LocalRotation: {x: 0.7004391, y: -0.026122233, z: 0.025691757, w: 0.7127712}
m_LocalRotation: {x: 0.7004385, y: -0.026138667, z: 0.02570791, w: 0.7127705}
m_LocalPosition: {x: 18.102207, y: 11.040333, z: -0.5004903}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0

2
Assets/8_Scripts/1_Managers/CameraManager.cs

@ -125,7 +125,7 @@ public class CameraManager : MonoBehaviour
m_Camera.cullingMask = m_Agent;
m_PoseCanvas.SetActive(false);
m_BrainPose.SetActive(false);
m_Rewards.SetActive(true);
m_Rewards.SetActive(false);
break;
case "vc_Body":
m_Camera.cullingMask = m_Bodies;

2
Assets/8_Scripts/2_General/Scriptable Objects/Camera/ActutationsCamera.asset

@ -14,4 +14,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
cameraWeight: 0.4
cameraLayer: 0
cut: 1
cut: 0

2
Assets/8_Scripts/2_General/Scriptable Objects/Camera/PoseCamera.asset

@ -14,4 +14,4 @@ MonoBehaviour:
m_EditorClassIdentifier:
cameraWeight: 0.4
cameraLayer: 0
cut: 0
cut: 1

38
Assets/LensOscillate.cs

@ -0,0 +1,38 @@
using Cinemachine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LensOscillate : MonoBehaviour
{
public CinemachineVirtualCamera m_VirtualCamera;
public float m_Speed;
[SerializeField]
private float m_FOV;
private float m_SineValue = 0;
private float m_Time;
// Update is called once per frame
void Update()
{
m_Time += Time.fixedDeltaTime;
m_SineValue = Mathf.Sin(m_Time * m_Speed);
m_FOV = Map(m_SineValue, -1, 1, 0.2f, 0.45f);
m_VirtualCamera.m_Lens.OrthographicSize = m_FOV;
}
private float Map(float x, float x1, float x2, float y1, float y2)
{
var m = (y2 - y1) / (x2 - x1);
var c = y1 - m * x1; // point of interest: c is also equal to y2 - m * x2, though float math might lead to slightly different results.
return m * x + c;
}
}

11
Assets/LensOscillate.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2192701eda8335047b86c6af5a77cd53
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

2
Assets/ML-Agents/Timers/DreconDemo_timers.json

@ -1 +1 @@
{"count":1,"self":375.116928,"total":388.5971058,"children":{"InitializeActuators":{"count":1,"self":0.0009996,"total":0.0009996,"children":null},"InitializeSensors":{"count":1,"self":0.0020047,"total":0.0020047,"children":null},"AgentSendState":{"count":22517,"self":0.18474739999999998,"total":3.6917486999999998,"children":{"CollectObservations":{"count":11259,"self":3.4290239999999996,"total":3.4290239999999996,"children":null},"WriteActionMask":{"count":11259,"self":0.024067099999999998,"total":0.024067099999999998,"children":null},"RequestDecision":{"count":11259,"self":0.0539102,"total":0.0539102,"children":null}}},"DecideAction":{"count":22517,"self":5.6843895999999994,"total":5.6843895,"children":null},"AgentAct":{"count":22517,"self":4.1010268,"total":4.1010269,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1716824533","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId 4bf14d4b-7c60-4da5-a8cb-0bf3a524e7b4 -accessToken yEUCxkm6udBRi80_eZgDO3eFwEjAjoJ7-cRY-ZImu30005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1716824922"}}
{"count":1,"self":217.437696,"total":226.9797499,"children":{"InitializeActuators":{"count":1,"self":0.0015126999999999999,"total":0.0015126999999999999,"children":null},"InitializeSensors":{"count":1,"self":0.0015317,"total":0.0015317,"children":null},"AgentSendState":{"count":13204,"self":0.1104831,"total":2.555361,"children":{"CollectObservations":{"count":6602,"self":2.4018332,"total":2.4018330999999997,"children":null},"WriteActionMask":{"count":6602,"self":0.011765399999999999,"total":0.011765399999999999,"children":null},"RequestDecision":{"count":6602,"self":0.0312794,"total":0.0312794,"children":null}}},"DecideAction":{"count":13204,"self":4.2894679999999994,"total":4.2894679999999994,"children":null},"AgentAct":{"count":13204,"self":2.6926722,"total":2.6926722,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1716910697","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\drecon-unity -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-cail -hubSessionId 027d0021-ba81-4595-b0ef-efe85134d5fa -accessToken _RnpSRKkMsImb2bSPwhTsTP3Ja5N480tUu59C7A5i2Q005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1716910923"}}
Loading…
Cancel
Save