diff --git a/Assets/Material.mat b/Assets/Material.mat index d926dc8a1e1fb5f9fb4ee422202c006beb02f135..74dbe318627b394ba08bfe14d3ea3aa7126adbe2 100644 --- a/Assets/Material.mat +++ b/Assets/Material.mat @@ -8,18 +8,17 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Material - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: + m_ValidKeywords: [] + m_InvalidKeywords: - _SPECULAR_SETUP - m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 - m_CustomRenderQueue: 2000 - stringTagMap: - RenderType: Opaque + m_CustomRenderQueue: -1 + stringTagMap: {} disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: diff --git a/Assets/Models/downsampled_trafo.ply b/Assets/Models/downsampled_trafo.ply new file mode 100644 index 0000000000000000000000000000000000000000..c2314d27f9ebec8cb59763e03a5ac87b6d72c912 Binary files /dev/null and b/Assets/Models/downsampled_trafo.ply differ diff --git a/Assets/Models/downsampled_trafo.ply.meta b/Assets/Models/downsampled_trafo.ply.meta new file mode 100644 index 0000000000000000000000000000000000000000..df27501e6e97768519eeabe72e09975d35783b65 --- /dev/null +++ b/Assets/Models/downsampled_trafo.ply.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c7b1cfad85f3ac45ae8d1742bbe8fd7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} + _containerType: 1 diff --git a/Assets/Models/tetrahedron_downsampled_trafo.fbx.meta b/Assets/Models/tetrahedron_downsampled_trafo.fbx.meta index 3e4e5dd769aeb2634921932981d5e3adc0e7994b..35773a2798e7b0731fede408eb32b4a97cf99922 100644 --- a/Assets/Models/tetrahedron_downsampled_trafo.fbx.meta +++ b/Assets/Models/tetrahedron_downsampled_trafo.fbx.meta @@ -63,7 +63,7 @@ ModelImporter: maxBonesPerVertex: 4 minBoneWeight: 0.001 optimizeBones: 1 - meshOptimizationFlags: -1 + meshOptimizationFlags: 0 indexFormat: 0 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 diff --git a/Assets/Prefabs/Block.prefab b/Assets/Prefabs/Block.prefab index 5823e86e857073432b95844c7b79bebc37680670..8eac9356d570db1e87cd918a0c62579e04ccc7f1 100644 --- a/Assets/Prefabs/Block.prefab +++ b/Assets/Prefabs/Block.prefab @@ -102,6 +102,7 @@ MonoBehaviour: m_EditorClassIdentifier: deformAnchorPrefab: {fileID: 2720765159515821108, guid: 46377d8bcd3914149bbb7c475d721f56, type: 3} wrapDistance: 0.01 + isSelection: 0 --- !u!64 &3268846158774871891 MeshCollider: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/BlockSelect.prefab b/Assets/Prefabs/BlockSelect.prefab index f66899392de5da2af1b5b9c6aa4fe24d6ece7787..b87d38d04e2abd0a51223d346fc9c8470998e9c9 100644 --- a/Assets/Prefabs/BlockSelect.prefab +++ b/Assets/Prefabs/BlockSelect.prefab @@ -67,6 +67,7 @@ MeshRenderer: m_RendererPriority: 0 m_Materials: - {fileID: 2100000, guid: 7a723ecfb519e7945a7fa67bed0a57f1, type: 2} + - {fileID: 2100000, guid: 7095bbf67c8069448a5131a144a21d04, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -203,19 +204,7 @@ MonoBehaviour: m_Calls: [] m_SelectEntered: m_PersistentCalls: - m_Calls: - - m_Target: {fileID: -5980889118735951575} - m_TargetAssemblyTypeName: BlockSelect, Assembly-CSharp - m_MethodName: DeleteSelection - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 + m_Calls: [] m_SelectExited: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Prefabs/VertexPoint.prefab b/Assets/Prefabs/VertexPoint.prefab index a48fadfed519339815db96df0f5b39c2f01cdfbe..8bb203449e6cf774a57b06b3ccb218cfb686bb72 100644 --- a/Assets/Prefabs/VertexPoint.prefab +++ b/Assets/Prefabs/VertexPoint.prefab @@ -66,6 +66,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: + - {fileID: 2100000, guid: c359cf48bf292794a85c2ec4eef04976, type: 2} - {fileID: 2100000, guid: c07dd69158c788946aa2d944960f264d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 @@ -246,7 +247,7 @@ MonoBehaviour: m_SnapToColliderVolume: 1 m_ReinitializeDynamicAttachEverySingleGrab: 1 m_AttachEaseInTime: 0.15 - m_MovementType: 2 + m_MovementType: 1 m_VelocityDamping: 1 m_VelocityScale: 1 m_AngularVelocityDamping: 1 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 48e84956e0086ac8d772e0b09f139e0ec10c606a..1906e4d96d625819c9395dc91a0856a77d96c5ec 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -1915,7 +1915,7 @@ RectTransform: m_Children: - {fileID: 59790308} - {fileID: 1063501048} - m_Father: {fileID: 0} + m_Father: {fileID: 2046629159} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -4119,7 +4119,7 @@ PrefabInstance: serializedVersion: 2 m_Modification: serializedVersion: 3 - m_TransformParent: {fileID: 0} + m_TransformParent: {fileID: 1783572214} m_Modifications: - target: {fileID: -8679921383154817045, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} propertyPath: m_LocalScale.x @@ -4155,11 +4155,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -4177,6 +4177,10 @@ PrefabInstance: propertyPath: m_Name value: tetra_trafo_normals2 objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -4184,7 +4188,15 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} insertIndex: -1 addedObject: {fileID: 1565662008} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} + insertIndex: -1 + addedObject: {fileID: 1565662009} m_SourcePrefab: {fileID: 100100000, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} +--- !u!4 &291343768 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: cbd9713bd330c064b8c327427eb068e1, type: 3} + m_PrefabInstance: {fileID: 291343767} + m_PrefabAsset: {fileID: 0} --- !u!1 &295595497 stripped GameObject: m_CorrespondingSourceObject: {fileID: -4618025148844850862, guid: af3a609f3b06600409a356f4e8ba91ba, type: 3} @@ -14294,6 +14306,19 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7b54aaf8f9e28124eb09d6c4a9a7e85a, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &1163381655 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1163381647} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb0e1f5b1b7a6024d84dec7d94a02c24, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudData: {fileID: 7239065423396753691, guid: 6c7b1cfad85f3ac45ae8d1742bbe8fd7, type: 3} --- !u!1001 &1165990525 PrefabInstance: m_ObjectHideFlags: 0 @@ -14320,11 +14345,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1d38bbb85fb049347b6bf6b167e94d22, type: 3} propertyPath: m_LocalPosition.y - value: 1.782 + value: 1.74 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1d38bbb85fb049347b6bf6b167e94d22, type: 3} propertyPath: m_LocalPosition.z - value: -0 + value: 0.69 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 1d38bbb85fb049347b6bf6b167e94d22, type: 3} propertyPath: m_LocalRotation.w @@ -14373,6 +14398,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 1d38bbb85fb049347b6bf6b167e94d22, type: 3} insertIndex: -1 addedObject: {fileID: 1163381651} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 1d38bbb85fb049347b6bf6b167e94d22, type: 3} + insertIndex: -1 + addedObject: {fileID: 1163381655} m_SourcePrefab: {fileID: 100100000, guid: 1d38bbb85fb049347b6bf6b167e94d22, type: 3} --- !u!1 &1171193545 GameObject: @@ -19093,6 +19121,19 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7b54aaf8f9e28124eb09d6c4a9a7e85a, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &1565662009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1565662007} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb0e1f5b1b7a6024d84dec7d94a02c24, type: 3} + m_Name: + m_EditorClassIdentifier: + pointCloudData: {fileID: 7239065423396753691, guid: 6c7b1cfad85f3ac45ae8d1742bbe8fd7, type: 3} --- !u!114 &1567186874 MonoBehaviour: m_ObjectHideFlags: 0 @@ -19350,67 +19391,6 @@ MonoBehaviour: m_MinimumScaleRatio: 0.25 m_MaximumScaleRatio: 2 m_ScaleMultiplier: 0.25 ---- !u!1001 &1583744429 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 8126816444565180231, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_Name - value: BlockSelect - objectReference: {fileID: 0} - - target: {fileID: 8126816444565180231, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalPosition.x - value: -16.156 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalPosition.y - value: 0.463 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalPosition.z - value: -12.138 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8768384242894696311, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 3b99d8d78d9c2d64f8e27cb4198fca94, type: 3} --- !u!1 &1592953571 GameObject: m_ObjectHideFlags: 0 @@ -20259,67 +20239,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1645451340} m_CullTransparentMesh: 1 ---- !u!1001 &1646569489 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalPosition.x - value: 4.837848 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalPosition.y - value: 1.0005002 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalPosition.z - value: -1.5502453 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071067 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalRotation.x - value: -0.7071068 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_Name - value: vertex-cube - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} --- !u!1 &1666143803 GameObject: m_ObjectHideFlags: 0 @@ -21280,7 +21199,7 @@ GameObject: m_Component: - component: {fileID: 1783572214} m_Layer: 0 - m_Name: Environment + m_Name: Point Clouds m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -21303,6 +21222,7 @@ Transform: - {fileID: 2125541157} - {fileID: 1671653061} - {fileID: 2102629069} + - {fileID: 291343768} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!224 &1784190229 stripped @@ -24227,6 +24147,7 @@ Transform: - {fileID: 692397218} - {fileID: 807051348} - {fileID: 1614792280} + - {fileID: 140882063} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2064529225 @@ -27965,10 +27886,6 @@ SceneRoots: - {fileID: 1783572214} - {fileID: 1565887663878291441} - {fileID: 1703568386} - - {fileID: 1646569489} - {fileID: 704002919} - {fileID: 1165990525} - {fileID: 426651920} - - {fileID: 140882063} - - {fileID: 1583744429} - - {fileID: 291343767} diff --git a/Assets/Scrips/Components/Block/BlockDeform.cs b/Assets/Scrips/Components/Block/BlockDeform.cs index eac6053e6ab4353f9fe735a12030b62bc655eafc..2bb62a7099c9fac3c38651b560c2dad95040c0e5 100644 --- a/Assets/Scrips/Components/Block/BlockDeform.cs +++ b/Assets/Scrips/Components/Block/BlockDeform.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine; +using UnityEngine.XR.Interaction.Toolkit; public class BlockDeform : MonoBehaviour { @@ -14,6 +15,8 @@ public class BlockDeform : MonoBehaviour private bool loadedType = false; + private XRSimpleInteractable _xrSimpleInteractable; + private bool IsPointOnPlane(Vector3 point, Vector3 normal, Vector3 pointOnPlane, double epsilon) { double d = Vector3.Dot(normal, pointOnPlane); @@ -72,8 +75,6 @@ public class BlockDeform : MonoBehaviour UpdateDeformAnchors(); } - - private void UpdateDeformAnchors() { // collect vertices on the same plane as the anchor @@ -106,6 +107,25 @@ public class BlockDeform : MonoBehaviour private void Awake() { _mesh = this.GetComponent<MeshFilter>().mesh; + _xrSimpleInteractable = this.GetComponent<XRSimpleInteractable>(); + _xrSimpleInteractable.selectEntered.AddListener(SelectEnterHandler); + } + + private void SelectEnterHandler(SelectEnterEventArgs arg0) + { + if (EditState.Instance.ActiveEditState != EditState.EditType.Delete) + { + return; + } + + if (isSelection) + { + SelectPointsController.Instance.RemoveSelection(this.gameObject); + } + else + { + ProgramController.Instance.DeleteBlock(this.gameObject); + } } // Start is called before the first frame update diff --git a/Assets/Scrips/Components/Quad/FittedQuad.cs b/Assets/Scrips/Components/Quad/FittedQuad.cs index 37ee8bfc99e95492bbf647ddb4942b2fe33c8217..50070b724f2e390b58197559e9d6818917130626 100644 --- a/Assets/Scrips/Components/Quad/FittedQuad.cs +++ b/Assets/Scrips/Components/Quad/FittedQuad.cs @@ -9,10 +9,22 @@ public class FittedQuad : MonoBehaviour public GameObject vertexPointPrefab; private Mesh _mesh; private readonly GameObject[] _vertexAnchors = new GameObject[4]; + private XRGrabInteractable _xrGrabInteractable; private void Awake() { _mesh = this.GetComponent<MeshFilter>().mesh; + _xrGrabInteractable = this.GetComponent<XRGrabInteractable>(); + _xrGrabInteractable.selectEntered.AddListener(SelectEnterHandler); + } + + private void SelectEnterHandler(SelectEnterEventArgs arg0) + { + EditState.EditType mode = EditState.Instance.ActiveEditState; + if (mode == EditState.EditType.Delete) + { + ProgramController.Instance.DeleteQuad(this.gameObject); + } } private void Start() @@ -35,7 +47,7 @@ public class FittedQuad : MonoBehaviour anchor.SetActive(mode == EditState.EditType.Deform); } - this.GetComponent<XRGrabInteractable>().enabled = mode == EditState.EditType.Deform; + _xrGrabInteractable.trackPosition = mode == EditState.EditType.Deform; } private void InitAnchors() diff --git a/Assets/Scrips/Components/Selection/BlockSelect.cs b/Assets/Scrips/Components/Selection/BlockSelect.cs index 18330a627625d74d3af74856b16880daecdb5fff..58b788d3289c2c54e83aec586b89152bd49ff395 100644 --- a/Assets/Scrips/Components/Selection/BlockSelect.cs +++ b/Assets/Scrips/Components/Selection/BlockSelect.cs @@ -10,22 +10,17 @@ public class BlockSelect : MonoBehaviour private XRSimpleInteractable _xrSimpleInteractable; - private void Awake() - { - _xrSimpleInteractable = this.GetComponent<XRSimpleInteractable>(); - } + // private void Awake() + // { + // _xrSimpleInteractable = this.GetComponent<XRSimpleInteractable>(); + // _xrSimpleInteractable.selectEntered.AddListener(SelectEnterHandler); + // } - public void DeleteSelection() - { - if (EditState.Instance.ActiveEditState == EditState.EditType.Delete) - { - selectPointsController.RemoveSelection(this.gameObject); - } - } - - - private void OnDestroy() - { - selectPointsController.RemoveSelection(this.gameObject); - } + // private void SelectEnterHandler(SelectEnterEventArgs arg0) + // { + // if (EditState.Instance.ActiveEditState == EditState.EditType.Delete) + // { + // selectPointsController.RemoveSelection(this.gameObject); + // } + // } } diff --git a/Assets/Scrips/Controllers/ProgramController.cs b/Assets/Scrips/Controllers/ProgramController.cs index a480726f7136497622b08b268e1a66405d86036a..eb0fdc8839ad3b7ef5894d581565f06288780996 100644 --- a/Assets/Scrips/Controllers/ProgramController.cs +++ b/Assets/Scrips/Controllers/ProgramController.cs @@ -5,22 +5,17 @@ using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using UnityEngine; -using UnityEngine.InputSystem; using UnityEditor.Formats.Fbx.Exporter; using Autodesk.Fbx; public class ProgramController : MonoBehaviour { + public static ProgramController Instance { get; private set; } + private SpawnBlockEvent spawnBlockEvent; private SelectPointsController selectPointsController; public Transform UserTransform; - // public InputActionReference saveEventAction; - // public InputActionReference loadEventAction; - - private InputLoader _inputSave; - private InputLoader _inputLoad; - private readonly List<GameObject> _spawnedBlocks = new(); private readonly List<GameObject> _spawnedQuads = new(); @@ -30,12 +25,19 @@ public class ProgramController : MonoBehaviour private void Awake() { + if (Instance != null && Instance != this) + { + Destroy(this); + } + else + { + Instance = this; + } + spawnBlockEvent = this.GetComponent<SpawnBlockEvent>(); selectPointsController = this.GetComponent<SelectPointsController>(); this._savePath = Application.persistentDataPath + "/program.save"; - // _inputSave = new(saveEventAction, SaveProgram); - // _inputLoad = new(loadEventAction, LoadProgram); _surrogateSelector = new(); _surrogateSelector.AddSurrogate(typeof(Vector3), new StreamingContext(StreamingContextStates.All), new Vector3SerializationSurrogate()); @@ -49,11 +51,29 @@ public class ProgramController : MonoBehaviour _spawnedBlocks.Add(block); } + public void DeleteBlock(GameObject block) + { + if (_spawnedBlocks.Contains(block)) + { + _spawnedBlocks.Remove(block); + Destroy(block); + } + } + public void RegisterQuad(GameObject quad) { _spawnedQuads.Add(quad); } + public void DeleteQuad(GameObject quad) + { + if (_spawnedQuads.Contains(quad)) + { + _spawnedQuads.Remove(quad); + Destroy(quad); + } + } + private Save CreateSave() { Save save = new(); diff --git a/Assets/Scrips/Controllers/SelectPointsController.cs b/Assets/Scrips/Controllers/SelectPointsController.cs index eeab8790087a0c975ba2892e285c2d98c3c81126..35b080a5fc698c672e9b528b9d71465c0ceb271a 100644 --- a/Assets/Scrips/Controllers/SelectPointsController.cs +++ b/Assets/Scrips/Controllers/SelectPointsController.cs @@ -6,9 +6,12 @@ using UnityEngine.InputSystem; using MathNet.Numerics.LinearAlgebra.Factorization; using MathNet.Numerics.LinearAlgebra; using Unity.Mathematics; +using static PointCloudDataReader; public class SelectPointsController : MonoBehaviour { + public static SelectPointsController Instance { get; private set; } + public List<GameObject> pointClouds; public InputActionReference selectPointsEventAction; @@ -27,6 +30,15 @@ public class SelectPointsController : MonoBehaviour private void Awake() { + if (Instance != null && Instance != this) + { + Destroy(this); + } + else + { + Instance = this; + } + _inputSelectPoints = new(selectPointsEventAction, SelectPointsHandler); _blockSelections = new(); _debugPoints = new(); @@ -37,12 +49,15 @@ public class SelectPointsController : MonoBehaviour { List<Vector3> selectedPoints = new(); Transform cloudTransform = pointClouds[0].transform; - for (int i = 0; i < _recalculatedPoints.Count; i++) + Point[] points = pointClouds[0].GetComponent<PointCloudDataReader>().PointData; + for (int i = 0; i < points.Length; i++) { + Vector3 point = points[i].position; + point.x *= -1f; foreach (GameObject blockSelection in _blockSelections) { MeshCollider collider = blockSelection.GetComponent<MeshCollider>(); - Vector3 ptGlobal = cloudTransform.rotation * _recalculatedPoints[i] + cloudTransform.position; + Vector3 ptGlobal = cloudTransform.rotation * point + cloudTransform.position; if (collider.bounds.Contains(ptGlobal)) { selectedPoints.Add(ptGlobal); @@ -52,6 +67,7 @@ public class SelectPointsController : MonoBehaviour CalculatePlane(selectedPoints); } + // source: https://stackoverflow.com/questions/10900141/fast-plane-fitting-to-many-points private void CalculatePlane(List<Vector3> points) { if (points.Count < 3) @@ -117,7 +133,7 @@ public class SelectPointsController : MonoBehaviour { GameObject spawnedObject = Instantiate(spawnPrefab, pos, Quaternion.identity); spawnedObject.transform.parent = this.transform; - spawnedObject.transform.LookAt(spawnedObject.transform.position - normal); + spawnedObject.transform.LookAt(spawnedObject.transform.position + normal); _programController.RegisterQuad(spawnedObject); return spawnedObject; @@ -175,7 +191,7 @@ public class SelectPointsController : MonoBehaviour // Start is called before the first frame update void Start() { - CalculateRealPoints(); + // CalculateRealPoints(); EditState.Instance.RegisterListener(EditChangeHandler); } diff --git a/Assets/Scrips/Events/SpawnBlockEvent.cs b/Assets/Scrips/Events/SpawnBlockEvent.cs index 0979777de064a0dab1b9b438ec5f166ee4a5540f..007061a146263278865cdba7c0245b8f974ba983 100644 --- a/Assets/Scrips/Events/SpawnBlockEvent.cs +++ b/Assets/Scrips/Events/SpawnBlockEvent.cs @@ -30,7 +30,7 @@ public class SpawnBlockEvent : MonoBehaviour private void SpawnMesh(InputAction.CallbackContext context) { EditState.EditType mode = EditState.Instance.ActiveEditState; - if (mode == EditState.EditType.Rotate) return; + if (mode == EditState.EditType.Rotate || mode == EditState.EditType.Delete) return; if (Physics.Raycast(inputTransform.position, inputTransform.forward, out RaycastHit hit)) { if (hit.transform.gameObject.CompareTag("surface")) diff --git a/Assets/Scrips/Utils/PointCloudDataReader.cs b/Assets/Scrips/Utils/PointCloudDataReader.cs new file mode 100644 index 0000000000000000000000000000000000000000..59cc0184c7e55ddcb8b9e07c54df5cafdf1367f4 --- /dev/null +++ b/Assets/Scrips/Utils/PointCloudDataReader.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Collections.Generic; +using System.Drawing; +using Pcx; +using UnityEngine; + +public class PointCloudDataReader : MonoBehaviour +{ + #region Editable attributes + public PointCloudData pointCloudData; + #endregion + + #region Public properties + [SerializeField] Point[] _pointData; + + [HideInInspector] + public Point[] PointData + { + get { return _pointData; } + set { _pointData = value; } + } + + public struct Point + { + public Vector3 position; + public uint color; + } + #endregion + + // Start is called before the first frame update + void Start() + { + if (pointCloudData != null) + { + var pointbuffer = pointCloudData.computeBuffer; + _pointData = new Point[pointbuffer.count]; + pointbuffer.GetData(_pointData); + } + else + { + _pointData = new Point[0]; + } + } +} diff --git a/Assets/Scrips/Utils/PointCloudDataReader.cs.meta b/Assets/Scrips/Utils/PointCloudDataReader.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1cda44f73b94b916b797ee5bd906d30b94173bfe --- /dev/null +++ b/Assets/Scrips/Utils/PointCloudDataReader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fb0e1f5b1b7a6024d84dec7d94a02c24 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/Project Configuration/SampleScene.scenetemplate b/Assets/Settings/Project Configuration/SampleScene.scenetemplate index 707e8a0ee61db684ba701fc6b107cfa04bdc41cc..44b996689fa6d48371908bd90c4c5f04765d6b08 100644 --- a/Assets/Settings/Project Configuration/SampleScene.scenetemplate +++ b/Assets/Settings/Project Configuration/SampleScene.scenetemplate @@ -172,26 +172,26 @@ MonoBehaviour: instantiationMode: 0 - dependency: {fileID: 3070393932912889095, guid: aa14702dd234c8d4fb9ac0df97715ef7, type: 3} instantiationMode: 0 - - dependency: {fileID: 919132149155446097, guid: 7f215f4ac47cb93459a4b8dc0e41bd6d, type: 3} + - dependency: {fileID: 8980549144392899874, guid: 6c7b1cfad85f3ac45ae8d1742bbe8fd7, type: 3} instantiationMode: 0 - dependency: {fileID: 8429981633443581377, guid: 1670dca8ee98f864eb412b51a24c08e1, type: 3} instantiationMode: 0 - dependency: {fileID: 2100000, guid: 68559dda19465234ba3cd4af45b0c1ab, type: 2} instantiationMode: 0 - - dependency: {fileID: 32900000, guid: ab4937678fcde0649b3e4e6733bb6bc3, type: 3} - instantiationMode: 1 - dependency: {fileID: 2800000, guid: 1e4fbbf0f3e2efa428b2176e5a91baed, type: 3} instantiationMode: 0 - dependency: {fileID: 8900000, guid: fe92f018ab9184b43b46c80b2a02e522, type: 3} instantiationMode: 0 - dependency: {fileID: 919132149155446097, guid: af3a609f3b06600409a356f4e8ba91ba, type: 3} instantiationMode: 0 - - dependency: {fileID: 919132149155446097, guid: ab3a79eba4de4be0ad5fead9fb858190, type: 3} - instantiationMode: 0 + - dependency: {fileID: 32900000, guid: ab4937678fcde0649b3e4e6733bb6bc3, type: 3} + instantiationMode: 1 - dependency: {fileID: 2800000, guid: 5b272b86282919a4488341408a338239, type: 3} instantiationMode: 0 - dependency: {fileID: 2800000, guid: 7e45b5b7749d93e4baa70a7908635dcc, type: 3} instantiationMode: 0 + - dependency: {fileID: 919132149155446097, guid: ab3a79eba4de4be0ad5fead9fb858190, type: 3} + instantiationMode: 0 - dependency: {fileID: 919132149155446097, guid: 076cbf182a14247409a7a269d753df65, type: 3} instantiationMode: 0 - dependency: {fileID: 2761784063978902507, guid: c1800acf6366418a9b5f610249000331, type: 3} @@ -242,6 +242,8 @@ MonoBehaviour: instantiationMode: 0 - dependency: {fileID: 5342377809969199258, guid: 445f7411c27de9943b49bb5c4ca806ce, type: 3} instantiationMode: 0 + - dependency: {fileID: 2800000, guid: c00cc27058cfaf04db207f80c4ff7e1c, type: 3} + instantiationMode: 0 - dependency: {fileID: 919132149155446097, guid: 83053866027bda94da06cb09ab527394, type: 3} instantiationMode: 0 - dependency: {fileID: 2800000, guid: c587cac8808c8b745adbae420e9acc83, type: 3} @@ -250,8 +252,6 @@ MonoBehaviour: instantiationMode: 1 - dependency: {fileID: 2100000, guid: 83eabfe673263a445972586e5d8b56ee, type: 2} instantiationMode: 0 - - dependency: {fileID: 2100000, guid: 0ef4dd19062dfca4bb226f6c4d6b7b29, type: 2} - instantiationMode: 0 - dependency: {fileID: 2720765159515821108, guid: 46377d8bcd3914149bbb7c475d721f56, type: 3} instantiationMode: 0 - dependency: {fileID: 11400000, guid: f675742eaf9c20a4f909d78ee7a14fed, type: 2} @@ -266,6 +266,8 @@ MonoBehaviour: instantiationMode: 0 - dependency: {fileID: 11400000, guid: 0b1260e07d3cf9b4eb80ff2e299d0bbf, type: 2} instantiationMode: 1 + - dependency: {fileID: 2800000, guid: ec39cf1992b67944dbbaeb7f183de318, type: 3} + instantiationMode: 0 - dependency: {fileID: 2100000, guid: dcac969f335985b47a7dd104e05496d9, type: 2} instantiationMode: 0 - dependency: {fileID: 2100000, guid: a1c1d11b32e0a6e4084e16fea6027537, type: 2} @@ -290,8 +292,6 @@ MonoBehaviour: instantiationMode: 0 - dependency: {fileID: 4125421792874400280, guid: 27024f5809f4a4347b9cd7f26a1bdf93, type: 3} instantiationMode: 0 - - dependency: {fileID: 2100000, guid: c07dd69158c788946aa2d944960f264d, type: 2} - instantiationMode: 0 - dependency: {fileID: 2800000, guid: a89d91b09ecb0164ab9d892915bfa299, type: 3} instantiationMode: 0 - dependency: {fileID: 2179057468902719980, guid: f47ad6ac315a3ea428b59e2cac6f2a2e, type: 3} @@ -302,6 +302,8 @@ MonoBehaviour: instantiationMode: 0 - dependency: {fileID: 2800000, guid: ee148e281f3c41c5b4ff5f8a5afe5a6c, type: 3} instantiationMode: 1 + - dependency: {fileID: 2100000, guid: c07dd69158c788946aa2d944960f264d, type: 2} + instantiationMode: 0 - dependency: {fileID: 5648130919276084443, guid: 085ce58b196caa446a8545c9dd388793, type: 3} instantiationMode: 0 - dependency: {fileID: 2800000, guid: 188dfe7e559f13248ba2c41eb5a59328, type: 3} @@ -410,6 +412,8 @@ MonoBehaviour: instantiationMode: 0 - dependency: {fileID: 3177232254315139758, guid: a3fde713df4d99042a0403c4be9eea32, type: 3} instantiationMode: 0 + - dependency: {fileID: 2100000, guid: 7095bbf67c8069448a5131a144a21d04, type: 2} + instantiationMode: 0 - dependency: {fileID: 2800000, guid: 639b00403a9c1cf4884b495c00168283, type: 3} instantiationMode: 0 - dependency: {fileID: 2100000, guid: 9c7ab565ff2af1b4fba6ce483a124cf9, type: 2} diff --git a/Assets/Shaders/Mat_RotateAnchor.mat b/Assets/Shaders/Mat_RotateAnchor.mat index b010308d231edc98cc214f78b3e0ca1ed74efc04..51d86f3658bb623d1d6d1042df233ebcab037c7b 100644 --- a/Assets/Shaders/Mat_RotateAnchor.mat +++ b/Assets/Shaders/Mat_RotateAnchor.mat @@ -36,6 +36,10 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - unity_Lightmaps: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -55,5 +59,5 @@ Material: - _QueueControl: 0 - _QueueOffset: 0 m_Colors: - - _OutlineColor: {r: 0.5529412, g: 1, b: 0.8861582, a: 0} + - _OutlineColor: {r: 0.66180134, g: 0.9811321, b: 0.8986084, a: 0} m_BuildTextureStacks: [] diff --git a/Assets/Textures/edge-liner.png b/Assets/Textures/edge-liner.png new file mode 100644 index 0000000000000000000000000000000000000000..a93348963a945f2266eb1be9f08bbb0668267f30 Binary files /dev/null and b/Assets/Textures/edge-liner.png differ diff --git a/Assets/Textures/edge-liner.png.meta b/Assets/Textures/edge-liner.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..0e864b6685bf6538cb1d92876382cbf0aced9b3c --- /dev/null +++ b/Assets/Textures/edge-liner.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: c00cc27058cfaf04db207f80c4ff7e1c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/VRTemplateAssets/Materials/Anchor Materials/Anchor Blue Glow.mat b/Assets/VRTemplateAssets/Materials/Anchor Materials/Anchor Blue Glow.mat index 31de6be793b56b5323c256dbb40446280eb1495b..1b11fe30510b293ba5a1632f76ecf915bca103e0 100644 --- a/Assets/VRTemplateAssets/Materials/Anchor Materials/Anchor Blue Glow.mat +++ b/Assets/VRTemplateAssets/Materials/Anchor Materials/Anchor Blue Glow.mat @@ -21,19 +21,18 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Anchor Blue Glow - m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} + m_Shader: {fileID: 10751, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _SURFACE_TYPE_TRANSPARENT + m_ValidKeywords: [] m_InvalidKeywords: - _EMISSION + - _SURFACE_TYPE_TRANSPARENT m_LightmapFlags: 0 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 - m_CustomRenderQueue: 3000 - stringTagMap: - RenderType: Transparent + m_CustomRenderQueue: -1 + stringTagMap: {} disabledShaderPasses: - GRABPASS - DepthOnly @@ -67,9 +66,9 @@ Material: m_Scale: {x: 1, y: -0.8} m_Offset: {x: 0, y: 0.3} - _MainTex: - m_Texture: {fileID: 2800000, guid: 7461125ec591a1548883bd61123e9138, type: 3} - m_Scale: {x: 1, y: -0.8} - m_Offset: {x: 0, y: 0.3} + m_Texture: {fileID: 2800000, guid: c00cc27058cfaf04db207f80c4ff7e1c, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -130,9 +129,12 @@ Material: - _Glossiness: 0.888 - _GlossinessSource: 0 - _GlossyReflections: 1 + - _GridSpacing: 1 - _LightingEnabled: 0 + - _LineThickness: 0.1 - _Metallic: 0.678 - _Mode: 2 + - _ODistance: 5 - _OcclusionStrength: 1 - _Parallax: 0.02 - _QueueOffset: 0 @@ -150,16 +152,19 @@ Material: - _SrcBlend: 5 - _SrcBlendAlpha: 1 - _Surface: 1 + - _TDistance: 10 - _UVSec: 0 - _WorkflowMode: 1 - _ZWrite: 0 m_Colors: - _BaseColor: {r: 0, g: 0.88888884, b: 1, a: 0.4} - _BaseColorAddSubDiff: {r: 1, g: 0, b: 0, a: 0} + - _BaseColour: {r: 1, g: 1, b: 1, a: 0} - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} - _Color: {r: 0, g: 0.88888884, b: 1, a: 0.4} - _ColorAddSubDiff: {r: 1, g: 0, b: 0, a: 0} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GridColour: {r: 1, g: 1, b: 1, a: 1} - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/VRTemplateAssets/Materials/Environment/FauxBackgroundBlur.mat b/Assets/VRTemplateAssets/Materials/Environment/FauxBackgroundBlur.mat index e1c3a0d4dc88da592d2c03063e2644722ffd3e21..a86db7c3b3cc76605d42b9fa8db3feb29715eefa 100644 --- a/Assets/VRTemplateAssets/Materials/Environment/FauxBackgroundBlur.mat +++ b/Assets/VRTemplateAssets/Materials/Environment/FauxBackgroundBlur.mat @@ -2,20 +2,24 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: FauxBackgroundBlur m_Shader: {fileID: 4800000, guid: 0109ca49f001aed4a9b9378ad072e89a, type: 3} - m_ShaderKeywords: + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -25,8 +29,8 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - - _Alpha: 0.525 - - _Blur: 8.38 - - _GradientSize: 5.03 + - _Alpha: 0.475 + - _Blur: 0.93 + - _GradientSize: 4.31 m_Colors: [] m_BuildTextureStacks: [] diff --git a/Assets/mesh.fbx b/Assets/mesh.fbx new file mode 100644 index 0000000000000000000000000000000000000000..a1e67445cbb43fe19c62529ead6a908738fecaf3 --- /dev/null +++ b/Assets/mesh.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bad5022c93610215fe04d2ad071a0346e3347276467d86b33f0b99df72f8f124 +size 547972 diff --git a/Assets/mesh.fbx.meta b/Assets/mesh.fbx.meta new file mode 100644 index 0000000000000000000000000000000000000000..ca0a28667fbe1ac36a5be0fa7b9d83972f77ebab --- /dev/null +++ b/Assets/mesh.fbx.meta @@ -0,0 +1,109 @@ +fileFormatVersion: 2 +guid: ab00d8f41bddffb49aa8820da234683c +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: