Skip to content

Commit 8d8f851

Browse files
author
David Kline
authored
Merge pull request #2117 from cre8ivepark/may18_dev_SurfaceMagnetism
[May18] Surface Magnetism + Spatial Processing example scene - improvement
2 parents a2871ff + 77e5d20 commit 8d8f851

12 files changed

+142
-14
lines changed

Assets/HoloToolkit-Examples/SpatialMapping/Scenes/SpatialProcessingSurfaceMagnetism.unity

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ MonoBehaviour:
230230
Lifetime: 0
231231
MagneticSurface:
232232
serializedVersion: 2
233-
m_Bits: 256
233+
m_Bits: 2147483648
234234
MaxDistance: 10
235235
CloseDistance: 0.5
236236
SurfaceNormalOffset: 0.05
@@ -519,6 +519,11 @@ Prefab:
519519
propertyPath: surfaceMaterial
520520
value:
521521
objectReference: {fileID: 2100000, guid: 729453690df4d40488b01b78b3af849d, type: 2}
522+
- target: {fileID: 114000011154029958, guid: 2ed75ffdf9031c94e8bce4b3d17b9928,
523+
type: 2}
524+
propertyPath: PhysicsLayer
525+
value: 31
526+
objectReference: {fileID: 0}
522527
m_RemovedComponents: []
523528
m_ParentPrefab: {fileID: 100100000, guid: 2ed75ffdf9031c94e8bce4b3d17b9928, type: 2}
524529
m_IsPrefabParent: 0
@@ -564,7 +569,7 @@ MonoBehaviour:
564569
m_Name:
565570
m_EditorClassIdentifier:
566571
ActivePlanes: []
567-
SurfacePlanePrefab: {fileID: 1000010593991404, guid: 184d6e9ce2d89844489583805253eb83,
572+
SurfacePlanePrefab: {fileID: 1000010593991404, guid: e2f0116ed6ef0d44bb7791f327bea328,
568573
type: 2}
569574
MinArea: 0.025
570575
drawPlanesMask: 15
@@ -581,7 +586,7 @@ MonoBehaviour:
581586
m_Name:
582587
m_EditorClassIdentifier:
583588
scanTime: 15
584-
defaultMaterial: {fileID: 2100000, guid: d698790d3facd3d4289a13fa1243030a, type: 2}
589+
defaultMaterial: {fileID: 2100000, guid: 729453690df4d40488b01b78b3af849d, type: 2}
585590
secondaryMaterial: {fileID: 2100000, guid: df172103f5fba4a4d8636aeca60cb0d7, type: 2}
586591
minimumFloors: 1
587592
--- !u!4 &1325178179

Assets/HoloToolkit-Examples/SpatialMapping/SpatialProcessingSurfaceMagnetism.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ https://gfycat.com/PitifulRareKodiakbear
1212
## How to use
1313
You need to assign same Unity layer to the Spatial mapping’s plane and Solver Surface Magnetism’s Magnetic Surface.
1414

15-
1. Add a new layer for the planes created by Spatial Processing. (to snap to) This example shows a new layer named ‘SpatialProcessingPlane’
16-
<img src="/External/ReadMeImages/MRTK_SurfaceMagnetism1.png" width="550">
17-
<img src="/External/ReadMeImages/MRTK_SurfaceMagnetism2.png" width="550">
15+
1. Add a new layer for the planes created by Spatial Processing. Mixed Reality Toolkit's **Apply Mixed Reality Projcet Settings** automatically addes a new layer **31:Spatial Mapping**. <img src="/External/ReadMeImages/MRTK_SurfaceMagnetism1.png" width="550"> <img src="/External/ReadMeImages/MRTK_SurfaceMagnetism2.png" width="300"> <img src="/External/ReadMeImages/MRTK_SurfaceMagnetism3.png" width="550"> <img src="/External/ReadMeImages/MRTK_SurfaceMagnetism4.png" width="300">
1816

19-
2. In SpatialMapping prefab, change Physics Layer to the new layer number. In this example, the new layer is 8
20-
<img src="/External/ReadMeImages/MRTK_SurfaceMagnetism3.png" width="550">
17+
2. In **SpatialMapping** prefab, make sure the **Physics Layer** is set to **31**. <br/><img src="/External/ReadMeImages/MRTK_SurfaceMagnetism5.png" width="550">
2118

22-
3. Assign SolverSurfaceMagnetism script to an object. In Magnetic Surface option, select the new layer (SpatialProcessingPlane) that you created.
23-
<img src="/External/ReadMeImages/MRTK_SurfaceMagnetism4.png" width="550">
19+
3. Assign **SolverSurfaceMagnetism** script to an object. In **Magnetic Surface** option, select the **SpatialMapping** layer.<br/><img src="/External/ReadMeImages/MRTK_SurfaceMagnetism6.png" width="550">
2420

25-
4. After initial room scanning, you will be able to see MRTK logo plane is smoothly snapping to the surfaces.
21+
4. After initial room scanning, you will be able to see MRTK logo plane smoothly snaps to the surfaces.
2622

2723

2824

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1001 &100100000
4+
Prefab:
5+
m_ObjectHideFlags: 1
6+
serializedVersion: 2
7+
m_Modification:
8+
m_TransformParent: {fileID: 0}
9+
m_Modifications: []
10+
m_RemovedComponents: []
11+
m_ParentPrefab: {fileID: 0}
12+
m_RootGameObject: {fileID: 1000010593991404}
13+
m_IsPrefabParent: 1
14+
--- !u!1 &1000010593991404
15+
GameObject:
16+
m_ObjectHideFlags: 0
17+
m_PrefabParentObject: {fileID: 0}
18+
m_PrefabInternal: {fileID: 100100000}
19+
serializedVersion: 5
20+
m_Component:
21+
- component: {fileID: 4000012375631134}
22+
- component: {fileID: 33000012042644992}
23+
- component: {fileID: 65000010549037612}
24+
- component: {fileID: 23000010797497162}
25+
- component: {fileID: 114000011287056714}
26+
m_Layer: 0
27+
m_Name: SurfacePlaneTransparent
28+
m_TagString: Untagged
29+
m_Icon: {fileID: 0}
30+
m_NavMeshLayer: 0
31+
m_StaticEditorFlags: 0
32+
m_IsActive: 1
33+
--- !u!4 &4000012375631134
34+
Transform:
35+
m_ObjectHideFlags: 1
36+
m_PrefabParentObject: {fileID: 0}
37+
m_PrefabInternal: {fileID: 100100000}
38+
m_GameObject: {fileID: 1000010593991404}
39+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
40+
m_LocalPosition: {x: 0, y: 0, z: 0}
41+
m_LocalScale: {x: 1, y: 1, z: 1}
42+
m_Children: []
43+
m_Father: {fileID: 0}
44+
m_RootOrder: 0
45+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
46+
--- !u!23 &23000010797497162
47+
MeshRenderer:
48+
m_ObjectHideFlags: 1
49+
m_PrefabParentObject: {fileID: 0}
50+
m_PrefabInternal: {fileID: 100100000}
51+
m_GameObject: {fileID: 1000010593991404}
52+
m_Enabled: 1
53+
m_CastShadows: 1
54+
m_ReceiveShadows: 1
55+
m_DynamicOccludee: 1
56+
m_MotionVectors: 1
57+
m_LightProbeUsage: 1
58+
m_ReflectionProbeUsage: 1
59+
m_Materials:
60+
- {fileID: 2100000, guid: 452f941bcd9202641b983cd4fee093a3, type: 2}
61+
m_StaticBatchInfo:
62+
firstSubMesh: 0
63+
subMeshCount: 0
64+
m_StaticBatchRoot: {fileID: 0}
65+
m_ProbeAnchor: {fileID: 0}
66+
m_LightProbeVolumeOverride: {fileID: 0}
67+
m_ScaleInLightmap: 1
68+
m_PreserveUVs: 1
69+
m_IgnoreNormalsForChartDetection: 0
70+
m_ImportantGI: 0
71+
m_StitchLightmapSeams: 0
72+
m_SelectedEditorRenderState: 3
73+
m_MinimumChartSize: 4
74+
m_AutoUVMaxDistance: 0.5
75+
m_AutoUVMaxAngle: 89
76+
m_LightmapParameters: {fileID: 0}
77+
m_SortingLayerID: 0
78+
m_SortingLayer: 0
79+
m_SortingOrder: 0
80+
--- !u!33 &33000012042644992
81+
MeshFilter:
82+
m_ObjectHideFlags: 1
83+
m_PrefabParentObject: {fileID: 0}
84+
m_PrefabInternal: {fileID: 100100000}
85+
m_GameObject: {fileID: 1000010593991404}
86+
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
87+
--- !u!65 &65000010549037612
88+
BoxCollider:
89+
m_ObjectHideFlags: 1
90+
m_PrefabParentObject: {fileID: 0}
91+
m_PrefabInternal: {fileID: 100100000}
92+
m_GameObject: {fileID: 1000010593991404}
93+
m_Material: {fileID: 0}
94+
m_IsTrigger: 0
95+
m_Enabled: 1
96+
serializedVersion: 2
97+
m_Size: {x: 1, y: 1, z: 1}
98+
m_Center: {x: 0, y: 0, z: 0}
99+
--- !u!114 &114000011287056714
100+
MonoBehaviour:
101+
m_ObjectHideFlags: 1
102+
m_PrefabParentObject: {fileID: 0}
103+
m_PrefabInternal: {fileID: 100100000}
104+
m_GameObject: {fileID: 1000010593991404}
105+
m_Enabled: 1
106+
m_EditorHideFlags: 0
107+
m_Script: {fileID: 11500000, guid: d29c05be38579034196d7b7692e52bc1, type: 3}
108+
m_Name:
109+
m_EditorClassIdentifier:
110+
PlaneThickness: 0.01
111+
UpNormalThreshold: 0.9
112+
FloorBuffer: 0.1
113+
CeilingBuffer: 0.1
114+
WallMaterial: {fileID: 2100000, guid: 452f941bcd9202641b983cd4fee093a3, type: 2}
115+
FloorMaterial: {fileID: 2100000, guid: 452f941bcd9202641b983cd4fee093a3, type: 2}
116+
CeilingMaterial: {fileID: 2100000, guid: 452f941bcd9202641b983cd4fee093a3, type: 2}
117+
TableMaterial: {fileID: 2100000, guid: 452f941bcd9202641b983cd4fee093a3, type: 2}
118+
UnknownMaterial: {fileID: 2100000, guid: 452f941bcd9202641b983cd4fee093a3, type: 2}
119+
PlaneType: 16

Assets/HoloToolkit/SpatialMapping/Prefabs/SurfacePlaneTransparent.prefab.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
74.4 KB
Loading
-12 KB
Loading
11.6 KB
Loading
-9.09 KB
Loading
-50.6 KB
Loading
11.9 KB
Loading

0 commit comments

Comments
 (0)