Browse Source

record on awake

main
Cailean Finn 9 months ago
parent
commit
d2ac8b441e
  1. 6
      Assets/10_URPEquirectangularCamera/CubeMapMat.mat
  2. 4
      Assets/10_URPEquirectangularCamera/Scripts/ShaderManiuplation.cs
  3. 107
      Assets/6_Scenes/Beep.unity
  4. 12
      Assets/7_Scripts/Recording/RenderText.cs
  5. 2
      Assets/ML-Agents/Timers/Beep_timers.json

6
Assets/10_URPEquirectangularCamera/CubeMapMat.mat

@ -108,10 +108,10 @@ Material:
- _DivideY: 3.5
- _DstBlend: 0
- _EnvironmentReflections: 1
- _EquiRotation: 4.5
- _EquiRotation: 3.5
- _EquiRotationY: 0.85
- _FOVScale_X: 1.5
- _FOVScale_Y: 0.2
- _FOVScale_X: 0.9
- _FOVScale_Y: 0.3
- _FocalLength: 2.73
- _GlossMapScale: 0
- _Glossiness: 0

4
Assets/10_URPEquirectangularCamera/Scripts/ShaderManiuplation.cs

@ -15,6 +15,8 @@ using UnityEngine.Windows.WebCam;
[ExecuteInEditMode]
public class ShaderManiuplation : MonoBehaviour
{
public GameObject parent;
public enum EquilateralDirection
{
Forward,
@ -177,7 +179,7 @@ public class ShaderManiuplation : MonoBehaviour
m_ShaderList.Add(Shader.Find("Conversion/CubemapToEquirectangularSqueeze"));
m_ShaderList.Add(Shader.Find("Conversion/CubemapToEquirectangularGnomic"));
mat.shader = m_ShaderList[1];
m_CubeMapPrefab = GameObject.Find("360 Projection Center");
m_CubeMapPrefab = parent;
}
}

107
Assets/6_Scenes/Beep.unity

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 3835.3696, g: 3089.354, b: 2930.258, a: 1}
m_IndirectSpecularColor: {r: 3835.225, g: 3089.3696, b: 2930.1838, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -911,6 +911,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 834841056}
m_Modifications:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: parent
value:
objectReference: {fileID: 1632846901}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
@ -939,7 +944,7 @@ PrefabInstance:
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_4k
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -1152,6 +1157,12 @@ MonoBehaviour:
m_ModelName: Walker
m_Index: 18
m_Touched: 0
--- !u!1 &141036004 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
m_PrefabInstance: {fileID: 1048781252}
m_PrefabAsset: {fileID: 0}
--- !u!1 &155301397
GameObject:
m_ObjectHideFlags: 0
@ -1472,6 +1483,12 @@ MonoBehaviour:
m_ModelName: Walker
m_Index: 8
m_Touched: 0
--- !u!1 &180528381 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
m_PrefabInstance: {fileID: 784069414}
m_PrefabAsset: {fileID: 0}
--- !u!1 &193486228
GameObject:
m_ObjectHideFlags: 3
@ -5130,6 +5147,12 @@ MonoBehaviour:
m_ModelName: Walker
m_Index: 19
m_Touched: 0
--- !u!1 &530958629 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
m_PrefabInstance: {fileID: 1536237342}
m_PrefabAsset: {fileID: 0}
--- !u!1 &534976164
GameObject:
m_ObjectHideFlags: 0
@ -8104,6 +8127,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 834841056}
m_Modifications:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: parent
value:
objectReference: {fileID: 180528381}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
@ -8132,7 +8160,7 @@ PrefabInstance:
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_4k
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -10243,6 +10271,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 834841056}
m_Modifications:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: parent
value:
objectReference: {fileID: 141036004}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
@ -10271,7 +10304,7 @@ PrefabInstance:
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_4k
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -12400,6 +12433,12 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 8839643052404795280}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1362733860 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
m_PrefabInstance: {fileID: 1840885989}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1385574991
GameObject:
m_ObjectHideFlags: 0
@ -13453,6 +13492,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 834841056}
m_Modifications:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: parent
value:
objectReference: {fileID: 1503240172}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
@ -13473,6 +13517,11 @@ PrefabInstance:
propertyPath: m_SqueezedCameraHeight
value: -25
objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_SqueezedResolutionIndex
value: 15
objectReference: {fileID: 0}
- target: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Name
@ -13481,7 +13530,7 @@ PrefabInstance:
- target: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -13553,6 +13602,11 @@ PrefabInstance:
propertyPath: far clip plane
value: 5000
objectReference: {fileID: 0}
- target: {fileID: 933460690407818094, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_TargetDisplay
value: 1
objectReference: {fileID: 0}
- target: {fileID: 933460690407818094, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: near clip plane
@ -13563,10 +13617,15 @@ PrefabInstance:
propertyPath: orthographic size
value: 10
objectReference: {fileID: 0}
- target: {fileID: 933460690440954402, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_TargetDisplay
value: 1
objectReference: {fileID: 0}
- target: {fileID: 933460690440954431, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8431763121321237345, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -13584,6 +13643,12 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1503240170}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1503240172 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
m_PrefabInstance: {fileID: 1503240170}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1515290815
GameObject:
m_ObjectHideFlags: 0
@ -13736,6 +13801,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 834841056}
m_Modifications:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: parent
value:
objectReference: {fileID: 530958629}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
@ -13764,7 +13834,7 @@ PrefabInstance:
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_4k
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -14567,6 +14637,12 @@ MonoBehaviour:
m_ModelName: Stairs
m_Index: 5
m_Touched: 0
--- !u!1 &1632846901 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
m_PrefabInstance: {fileID: 127464394}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1633830348
GameObject:
m_ObjectHideFlags: 0
@ -15559,7 +15635,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1793470376
Transform:
m_ObjectHideFlags: 0
@ -15761,6 +15837,11 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 834841056}
m_Modifications:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: parent
value:
objectReference: {fileID: 1362733860}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
@ -15776,6 +15857,11 @@ PrefabInstance:
propertyPath: m_ProjectionType
value: 0
objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_SqueezedResolutionIndex
value: 15
objectReference: {fileID: 0}
- target: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Name
@ -15784,12 +15870,12 @@ PrefabInstance:
- target: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_4k
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
@ -17800,6 +17886,7 @@ MonoBehaviour:
texture: {fileID: 0}
m_ProjectionType: 2
m_Record: 0
m_RecordOnAwake: 0
m_RecordedFrames: 0
material: {fileID: 2100000, guid: 0fe1464735a8dbc4ab5d663da266238b, type: 2}
--- !u!4 &2081823901

12
Assets/7_Scripts/Recording/RenderText.cs

@ -21,6 +21,8 @@ public class RenderText : MonoBehaviour
public bool m_Record = false;
public bool m_RecordOnAwake = true;
int txt_W;
int txt_H;
@ -59,7 +61,11 @@ public class RenderText : MonoBehaviour
private void Start()
{
SetupFrameRateConfiguration();
if (m_RecordOnAwake)
{
m_Timestamp = DateTime.Now.ToString("yyyyMMddHHmmss");
m_Record = true;
}
}
private void Update()
@ -297,7 +303,7 @@ public class RenderText : MonoBehaviour
private void SetupFrameRateConfiguration()
{
frame = 0;
m_CubeMapPrefab = GameObject.Find("360 Projection Center");
m_CubeMapPrefab = this.transform.parent.gameObject;
Application.targetFrameRate = m_CaptureFrameRate;
QualitySettings.vSyncCount = 0;
Time.captureDeltaTime = 1.0f / m_CaptureFrameRate;
@ -305,7 +311,7 @@ public class RenderText : MonoBehaviour
private void ToggleRecording()
{
if (Input.GetKeyUp(KeyCode.R))
if (Input.GetKeyUp(KeyCode.R) && !m_RecordOnAwake)
{
m_Timestamp = DateTime.Now.ToString("yyyyMMddHHmmss");
m_Record = true;

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

@ -1 +1 @@
{"count":1,"self":112.70705919999999,"total":113.82729909999999,"children":{"InitializeActuators":{"count":1,"self":0,"total":0,"children":null},"InitializeSensors":{"count":1,"self":0.0010215,"total":0.0010215,"children":null},"AgentSendState":{"count":5153,"self":0.0872322,"total":0.2921342,"children":{"CollectObservations":{"count":1031,"self":0.026303299999999998,"total":0.026303299999999998,"children":null},"WriteActionMask":{"count":1031,"self":0.0010012,"total":0.0010012,"children":null},"RequestDecision":{"count":1031,"self":0.1775975,"total":0.1775975,"children":null}}},"DecideAction":{"count":5153,"self":0.7851876,"total":0.7902865,"children":{"RayPerceptionSensor.Perceive":{"count":1031,"self":0.0050989,"total":0.0050989,"children":null}}},"AgentAct":{"count":5153,"self":0.0367926,"total":0.0367926,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712743244","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\Gebruiker\\Documents\\BB_BeautyBeep\\git\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1712743358"}}
{"count":1,"self":23.26712,"total":23.3460714,"children":{"InitializeActuators":{"count":1,"self":0.0020068,"total":0.0020068,"children":null},"InitializeSensors":{"count":1,"self":0.0020066,"total":0.0020066,"children":null},"AgentSendState":{"count":26,"self":0.000505,"total":0.0030142999999999997,"children":{"CollectObservations":{"count":6,"self":0.0010073,"total":0.0010073,"children":null},"WriteActionMask":{"count":6,"self":0,"total":0,"children":null},"RequestDecision":{"count":6,"self":0.0015019999999999999,"total":0.0015019999999999999,"children":null}}},"DecideAction":{"count":26,"self":0.069383199999999992,"total":0.069383199999999992,"children":{"RayPerceptionSensor.Perceive":{"count":6,"self":0,"total":0,"children":null}}},"AgentAct":{"count":26,"self":0.0020315,"total":0.0020315,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712828782","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_03-Beep\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1712828805"}}
Loading…
Cancel
Save