Skip to content

Commit 12da165

Browse files
author
David Kline (ANALOG)
committed
spatial profile: mesh settings, add materials
1 parent cd1b1c9 commit 12da165

18 files changed

+579
-17
lines changed

Assets/MixedRealityToolkit-SDK/Features/SpatialAwareness/System/MixedRealitySpatialAwarenessSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,10 @@ public int MeshTrianglesPerCubicMeter
479479
}
480480

481481
/// <inheritdoc />
482-
public bool RecalculateNormals { get; set; } = true;
482+
public bool MeshRecalculateNormals { get; set; } = true;
483483

484484
/// <inheritdoc />
485-
public bool RenderMeshes { get; set; } = false;
485+
public bool DisplayMeshes { get; set; } = false;
486486

487487
/// <inheritdoc />
488488
public Material MeshMaterial { get; set; } = null;

Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealityConfigurationProfile.asset

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ MonoBehaviour:
1212
m_Name: DefaultMixedRealityConfigurationProfile
1313
m_EditorClassIdentifier:
1414
initialManagerTypes:
15-
- reference: Microsoft.MixedReality.Toolkit.SDK.BoundarySystem.MixedRealityBoundaryManager,
16-
Microsoft.MixedReality.Toolkit.SDK
1715
- reference: Microsoft.MixedReality.Toolkit.SDK.Input.MixedRealityInputManager,
1816
Microsoft.MixedReality.Toolkit.SDK
17+
- reference: Microsoft.MixedReality.Toolkit.SDK.BoundarySystem.MixedRealityBoundaryManager,
18+
Microsoft.MixedReality.Toolkit.SDK
1919
targetExperienceScale: 3
2020
enableCameraProfile: 1
2121
cameraProfile: {fileID: 11400000, guid: 8089ccfdd4494cd38f676f9fc1f46a04, type: 2}
@@ -53,5 +53,5 @@ MonoBehaviour:
5353
spatialAwarenessSystemType:
5454
reference: Microsoft.MixedReality.Toolkit.SDK.SpatialAwarenessSystem.MixedRealitySpatialAwarenessSystem,
5555
Microsoft.MixedReality.Toolkit.SDK
56-
spatialAwarenessProfile: {fileID: 11400000, guid: 7558b8dfa956f6544af1231ca3f88706,
56+
spatialAwarenessProfile: {fileID: 11400000, guid: fe3d98567cf77744ba16af55bdec08ed,
5757
type: 2}

Assets/MixedRealityToolkit-SDK/Profiles/DefaultMixedRealitySpatialAwarenessProfile.asset

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ MonoBehaviour:
99
m_Enabled: 1
1010
m_EditorHideFlags: 0
1111
m_Script: {fileID: 11500000, guid: 07ce77c4cbff53f458a4a58f1407173a, type: 3}
12-
m_Name: MixedRealitySpatialAwarenessProfile
12+
m_Name: DefaultMixedRealitySpatialAwarenessProfile
1313
m_EditorClassIdentifier:
1414
startupBehavior: 0
1515
observationExtents: {x: 10, y: 10, z: 10}
1616
updateInterval: 3.5
17+
useMeshSystem: 1
18+
meshPhysicsLayer: 31
19+
meshLevelOfDetail: 0
20+
meshTrianglesPerCubicMeter: 0
21+
meshRecalculateNormals: 1
22+
displayMeshes: 0
23+
meshMaterial: {fileID: 2100000, guid: a923a5d1aebc7fe449b4ab3289da537b, type: 2}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: MRTK_Occlusion
10+
m_Shader: {fileID: 4800000, guid: bece293ca0f6595439e878a63a5ec3bf, type: 3}
11+
m_ShaderKeywords: ETC1_EXTERNAL_ALPHA
12+
m_LightmapFlags: 5
13+
m_EnableInstancingVariants: 0
14+
m_DoubleSidedGI: 0
15+
m_CustomRenderQueue: -1
16+
stringTagMap: {}
17+
disabledShaderPasses: []
18+
m_SavedProperties:
19+
serializedVersion: 3
20+
m_TexEnvs:
21+
- _BumpMap:
22+
m_Texture: {fileID: 0}
23+
m_Scale: {x: 1, y: 1}
24+
m_Offset: {x: 0, y: 0}
25+
- _DetailAlbedoMap:
26+
m_Texture: {fileID: 0}
27+
m_Scale: {x: 1, y: 1}
28+
m_Offset: {x: 0, y: 0}
29+
- _DetailMask:
30+
m_Texture: {fileID: 0}
31+
m_Scale: {x: 1, y: 1}
32+
m_Offset: {x: 0, y: 0}
33+
- _DetailNormalMap:
34+
m_Texture: {fileID: 0}
35+
m_Scale: {x: 1, y: 1}
36+
m_Offset: {x: 0, y: 0}
37+
- _EmissionMap:
38+
m_Texture: {fileID: 0}
39+
m_Scale: {x: 1, y: 1}
40+
m_Offset: {x: 0, y: 0}
41+
- _MainTex:
42+
m_Texture: {fileID: 0}
43+
m_Scale: {x: 1, y: 1}
44+
m_Offset: {x: 0, y: 0}
45+
- _MetallicGlossMap:
46+
m_Texture: {fileID: 0}
47+
m_Scale: {x: 1, y: 1}
48+
m_Offset: {x: 0, y: 0}
49+
- _OcclusionMap:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
- _ParallaxMap:
54+
m_Texture: {fileID: 0}
55+
m_Scale: {x: 1, y: 1}
56+
m_Offset: {x: 0, y: 0}
57+
m_Floats:
58+
- _BumpScale: 1
59+
- _Cutoff: 0.5
60+
- _DetailNormalMapScale: 1
61+
- _DstBlend: 0
62+
- _GlossMapScale: 1
63+
- _Glossiness: 0.5
64+
- _GlossyReflections: 1
65+
- _Metallic: 0
66+
- _Mode: 0
67+
- _OcclusionStrength: 1
68+
- _Parallax: 0.02
69+
- _SmoothnessTextureChannel: 0
70+
- _SpecularHighlights: 1
71+
- _SrcBlend: 1
72+
- _UVSec: 0
73+
- _ZWrite: 1
74+
m_Colors:
75+
- _Color: {r: 1, g: 1, b: 1, a: 1}
76+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

Assets/MixedRealityToolkit-SDK/StandardAssets/Materials/MRTK_Occlusion.mat.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.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: MRTK_Wireframe
10+
m_Shader: {fileID: 4800000, guid: 5c1653eb4e20b76499141de7bc57c063, type: 3}
11+
m_ShaderKeywords: ETC1_EXTERNAL_ALPHA
12+
m_LightmapFlags: 5
13+
m_EnableInstancingVariants: 0
14+
m_DoubleSidedGI: 0
15+
m_CustomRenderQueue: -1
16+
stringTagMap: {}
17+
disabledShaderPasses: []
18+
m_SavedProperties:
19+
serializedVersion: 3
20+
m_TexEnvs:
21+
- _BumpMap:
22+
m_Texture: {fileID: 0}
23+
m_Scale: {x: 1, y: 1}
24+
m_Offset: {x: 0, y: 0}
25+
- _DetailAlbedoMap:
26+
m_Texture: {fileID: 0}
27+
m_Scale: {x: 1, y: 1}
28+
m_Offset: {x: 0, y: 0}
29+
- _DetailMask:
30+
m_Texture: {fileID: 0}
31+
m_Scale: {x: 1, y: 1}
32+
m_Offset: {x: 0, y: 0}
33+
- _DetailNormalMap:
34+
m_Texture: {fileID: 0}
35+
m_Scale: {x: 1, y: 1}
36+
m_Offset: {x: 0, y: 0}
37+
- _EmissionMap:
38+
m_Texture: {fileID: 0}
39+
m_Scale: {x: 1, y: 1}
40+
m_Offset: {x: 0, y: 0}
41+
- _MainTex:
42+
m_Texture: {fileID: 0}
43+
m_Scale: {x: 1, y: 1}
44+
m_Offset: {x: 0, y: 0}
45+
- _MetallicGlossMap:
46+
m_Texture: {fileID: 0}
47+
m_Scale: {x: 1, y: 1}
48+
m_Offset: {x: 0, y: 0}
49+
- _OcclusionMap:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
- _ParallaxMap:
54+
m_Texture: {fileID: 0}
55+
m_Scale: {x: 1, y: 1}
56+
m_Offset: {x: 0, y: 0}
57+
m_Floats:
58+
- _BumpScale: 1
59+
- _Cutoff: 0.5
60+
- _DetailNormalMapScale: 1
61+
- _DstBlend: 0
62+
- _GlossMapScale: 1
63+
- _Glossiness: 0.5
64+
- _GlossyReflections: 1
65+
- _Metallic: 0
66+
- _Mode: 0
67+
- _OcclusionStrength: 1
68+
- _Parallax: 0.02
69+
- _SmoothnessTextureChannel: 0
70+
- _SpecularHighlights: 1
71+
- _SrcBlend: 1
72+
- _UVSec: 0
73+
- _WireThickness: 100
74+
- _ZWrite: 1
75+
m_Colors:
76+
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
77+
- _Color: {r: 1, g: 1, b: 1, a: 1}
78+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
79+
- _WireColor: {r: 1, g: 1, b: 1, a: 1}

Assets/MixedRealityToolkit-SDK/StandardAssets/Materials/MRTK_Wireframe.mat.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.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: MRTK_WireframeBlue
10+
m_Shader: {fileID: 4800000, guid: 5c1653eb4e20b76499141de7bc57c063, type: 3}
11+
m_ShaderKeywords: ETC1_EXTERNAL_ALPHA
12+
m_LightmapFlags: 5
13+
m_EnableInstancingVariants: 0
14+
m_DoubleSidedGI: 0
15+
m_CustomRenderQueue: -1
16+
stringTagMap: {}
17+
disabledShaderPasses: []
18+
m_SavedProperties:
19+
serializedVersion: 3
20+
m_TexEnvs:
21+
- _BumpMap:
22+
m_Texture: {fileID: 0}
23+
m_Scale: {x: 1, y: 1}
24+
m_Offset: {x: 0, y: 0}
25+
- _DetailAlbedoMap:
26+
m_Texture: {fileID: 0}
27+
m_Scale: {x: 1, y: 1}
28+
m_Offset: {x: 0, y: 0}
29+
- _DetailMask:
30+
m_Texture: {fileID: 0}
31+
m_Scale: {x: 1, y: 1}
32+
m_Offset: {x: 0, y: 0}
33+
- _DetailNormalMap:
34+
m_Texture: {fileID: 0}
35+
m_Scale: {x: 1, y: 1}
36+
m_Offset: {x: 0, y: 0}
37+
- _EmissionMap:
38+
m_Texture: {fileID: 0}
39+
m_Scale: {x: 1, y: 1}
40+
m_Offset: {x: 0, y: 0}
41+
- _MainTex:
42+
m_Texture: {fileID: 0}
43+
m_Scale: {x: 1, y: 1}
44+
m_Offset: {x: 0, y: 0}
45+
- _MetallicGlossMap:
46+
m_Texture: {fileID: 0}
47+
m_Scale: {x: 1, y: 1}
48+
m_Offset: {x: 0, y: 0}
49+
- _OcclusionMap:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
- _ParallaxMap:
54+
m_Texture: {fileID: 0}
55+
m_Scale: {x: 1, y: 1}
56+
m_Offset: {x: 0, y: 0}
57+
m_Floats:
58+
- _BumpScale: 1
59+
- _Cutoff: 0.5
60+
- _DetailNormalMapScale: 1
61+
- _DstBlend: 0
62+
- _GlossMapScale: 1
63+
- _Glossiness: 0.5
64+
- _GlossyReflections: 1
65+
- _Metallic: 0
66+
- _Mode: 0
67+
- _OcclusionStrength: 1
68+
- _Parallax: 0.02
69+
- _SmoothnessTextureChannel: 0
70+
- _SpecularHighlights: 1
71+
- _SrcBlend: 1
72+
- _UVSec: 0
73+
- _WireThickness: 434
74+
- _ZWrite: 1
75+
m_Colors:
76+
- _BaseColor: {r: 0.0036224083, g: 0.24982113, b: 0.49264705, a: 1}
77+
- _Color: {r: 1, g: 1, b: 1, a: 1}
78+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
79+
- _WireColor: {r: 0, g: 0.66896534, b: 1, a: 1}

Assets/MixedRealityToolkit-SDK/StandardAssets/Materials/MRTK_WireframeBlue.mat.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.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
///
5+
/// Basic occlusion shader that can be used with spatial mapping meshes.
6+
/// No pixels will be rendered at the object's location.
7+
///
8+
Shader "Mixed Reality Toolkit/Occlusion"
9+
{
10+
Properties
11+
{
12+
}
13+
SubShader
14+
{
15+
Tags
16+
{
17+
"RenderType" = "Opaque"
18+
"Queue" = "Geometry-1"
19+
}
20+
21+
Pass
22+
{
23+
ColorMask 0 // Color will not be rendered.
24+
Offset 50, 100
25+
26+
CGPROGRAM
27+
#pragma vertex vert
28+
#pragma fragment frag
29+
30+
// We only target the HoloLens (and the Unity editor), so take advantage of shader model 5.
31+
#pragma target 5.0
32+
#pragma only_renderers d3d11
33+
34+
#include "UnityCG.cginc"
35+
36+
struct v2f
37+
{
38+
float4 pos : SV_POSITION;
39+
UNITY_VERTEX_OUTPUT_STEREO
40+
};
41+
42+
v2f vert(appdata_base v)
43+
{
44+
UNITY_SETUP_INSTANCE_ID(v);
45+
v2f o;
46+
o.pos = UnityObjectToClipPos(v.vertex);
47+
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
48+
return o;
49+
}
50+
51+
half4 frag(v2f i) : COLOR
52+
{
53+
return float4(1,1,1,1);
54+
}
55+
ENDCG
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)