Skip to content

Commit 2e79fe5

Browse files
Keypoint self occlusion (#351)
* WIP self-occlusion checks. * More updates for self-occlusion * Almost working using compute shaders. Need to switch to regular rendering now. * Kind of working! * Ok, officially working now * Adding some tests for self-occlusion. Some fixes in KeypointLabeler * Fix issues with orthographic views and points close to far plane * Fixing remainder of tests. * Removing comments * Fixing issues in URP with orthographic view * Updating JointLabel * Updating JointLabel to include self-occlusion distance and drop the reference to the keypoint label config * Adding gizmos for keypoints * Adding and fixing remainder of tests. * Fixing various bugs in keypoint self occlusion, including (hopefully) properly supporting player builds * Fixing issues with large numbers of keypoints. * Fixing issue with resizing buffers * Add search for non-background pixel to keypoint depth check. Not perfect, but catches a few edge cases for now. Should migrate to doing all checks in shader at some point * Apply object scale even when using the global occlusion distance. * Make scaling of self-occlusion distance apply in every scenario * Fix joint scale * Moving self occlusion distance to the KeypointTemplate * Model based occludder distance overrides * Code cleaned up and commented * Tests for self-occlusion scalar value * Updated changelog file * Updated class documentation * Updates to documentation * Removed added, but unneeded, import * Mostly updated comments * Adding some comments to the depth check shader * Fixing test compile error and mistake in RenderTextureReader * Fixes for PR comments * Fix for shader to work properly in HDRP/URP * Another attempt to fix shaders for URP & HDRP * Tests are passing locally right now * Setting hdrp enabled disabled again * Another attempt * Another try to get these shaders to compile correctly * Magic test fix attempt * Incorporating mohsen's test fix * Update to fix compile error * One more attempt at fixing the keypoint shader * Attempt moving to newer unity version * Upgrade projects to 2020.3.16f1. * Updating shader to use PackageRequirements * Fixing package name * Updating to 2020.3.16 * Fixing keypoint depth issues on Linux * More project updated for 2020.3 and fixing tests. * Changing minimum version to 2020.3 * Cleaning up commented out code Co-authored-by: Jon Hogins <[email protected]>
1 parent 2c0de3a commit 2e79fe5

File tree

61 files changed

+3429
-1082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3429
-1082
lines changed

.yamato/environments.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ upmci_registry: https://artifactory.prd.cds.internal.unity3d.com/artifactory/api
44
# sticking to 2019.4.6f1 for testing for now because Linux Editor fails to open PerceptionHDRP on 2019.4.8f1
55
# see https://fogbugz.unity3d.com/default.asp?1273518_d68j5lb6eucglb84
66
coverage_editors:
7-
- version: 2019.4.18f1
7+
# - version: 2019.4.18f1
8+
- version: 2020.3.17f1
89

910
per_commit_editors:
10-
- version: 2019.4.18f1
11-
# - version: 2020.1.15f1
11+
# - version: 2019.4.18f1
12+
- version: 2020.3.17f1
1213

1314
performance_editors:
14-
- version: 2019.4.18f1
15-
# - version: 2020.1.3f1
15+
# - version: 2019.4.18f1
16+
- version: 2020.3.17f1
1617

1718
complete_editors:
18-
- version: 2019.4.18f1
19-
# - version: 2020.1.15f1
20-
# - version: 2020.2.0a21
19+
# - version: 2019.4.18f1
20+
- version: 2020.3.17f1
2121

2222
publish_platforms:
2323
- name: win

.yamato/upm-ci-testprojects.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
1818
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
1919
{% if suite.name == "standalone" %}
20-
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}StandaloneWindows64
20+
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --category=!Performance --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}StandaloneWindows64
2121
{% else %}
22-
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}
22+
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --category=!Performance --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}
2323
{% endif %}
2424
artifacts:
2525
logs:
@@ -41,8 +41,8 @@ codecoverage_windows_{{suite.name}}_{{editor.version}}:
4141
commands:
4242
- git submodule update --init --recursive
4343
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
44-
- .\.Editor\Unity.exe -projectPath ./TestProjects/PerceptionHDRP -testPlatform editmode -runTests -automated -testResults test-results -debugCodeOptimization -enableCodeCoverage -coverageResultsPath test-results -coverageOptions enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;assemblyFilters:+Unity.Perception.Runtime
45-
- .\.Editor\Unity.exe -projectPath ./TestProjects/PerceptionHDRP -testPlatform playmode -runTests -automated -testResults test-results -debugCodeOptimization -enableCodeCoverage -coverageResultsPath test-results -coverageOptions enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;assemblyFilters:+Unity.Perception.Runtime
44+
- .\.Editor\Unity.exe -projectPath ./TestProjects/PerceptionHDRP -testPlatform editmode -runTests -automated -testResults test-results -debugCodeOptimization -enableCodeCoverage -coverageResultsPath test-results --category=!Performance -coverageOptions enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;assemblyFilters:+Unity.Perception.Runtime
45+
- .\.Editor\Unity.exe -projectPath ./TestProjects/PerceptionHDRP -testPlatform playmode -runTests -automated -testResults test-results -debugCodeOptimization -enableCodeCoverage -coverageResultsPath test-results --category=!Performance -coverageOptions enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;assemblyFilters:+Unity.Perception.Runtime
4646
# - .\.Editor\Unity.exe -projectPath ./TestProjects/PerceptionHDRP -debugCodeOptimization -enableCodeCoverage -coverageResultsPath test-results -coverageOptions enableCyclomaticComplexity;generateHtmlReport;generateBadgeReport;
4747
artifacts:
4848
logs:
@@ -73,9 +73,9 @@ codecoverage_windows_{{suite.name}}_{{editor.version}}:
7373
- git clone [email protected]:unity/utr.git utr
7474
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
7575
{% if suite.name == "standalone" %}
76-
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --reruncount=2 --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-vulkan" {{suite.args}}StandaloneLinux64
76+
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --reruncount=2 --artifacts_path=test-results --stdout-filter=minimal --category=!Performance --extra-editor-arg="--force-vulkan" {{suite.args}}StandaloneLinux64
7777
{% else %}
78-
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --reruncount=2 --artifacts_path=test-results --stdout-filter=minimal --extra-editor-arg="--force-vulkan" {{suite.args}}
78+
- DISPLAY=:0.0 utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=.Editor --reruncount=2 --artifacts_path=test-results --stdout-filter=minimal --category=!Performance --extra-editor-arg="--force-vulkan" {{suite.args}}
7979
{% endif %}
8080
artifacts:
8181
logs:

TestProjects/PerceptionHDRP/Assets/CrateMaterial.mat

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
1313
m_Name:
1414
m_EditorClassIdentifier:
15-
version: 2
15+
version: 11
1616
--- !u!21 &2100000
1717
Material:
1818
serializedVersion: 6
@@ -22,18 +22,19 @@ Material:
2222
m_PrefabAsset: {fileID: 0}
2323
m_Name: CrateMaterial
2424
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
25-
m_ShaderKeywords: _NORMALMAP_TANGENT_SPACE
25+
m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE
2626
m_LightmapFlags: 4
2727
m_EnableInstancingVariants: 0
2828
m_DoubleSidedGI: 0
29-
m_CustomRenderQueue: -1
29+
m_CustomRenderQueue: 2225
3030
stringTagMap: {}
3131
disabledShaderPasses:
3232
- DistortionVectors
3333
- MOTIONVECTORS
3434
- TransparentDepthPrepass
3535
- TransparentDepthPostpass
3636
- TransparentBackface
37+
- RayTracingPrepass
3738
m_SavedProperties:
3839
serializedVersion: 3
3940
m_TexEnvs:
@@ -121,6 +122,18 @@ Material:
121122
m_Texture: {fileID: 0}
122123
m_Scale: {x: 1, y: 1}
123124
m_Offset: {x: 0, y: 0}
125+
- unity_Lightmaps:
126+
m_Texture: {fileID: 0}
127+
m_Scale: {x: 1, y: 1}
128+
m_Offset: {x: 0, y: 0}
129+
- unity_LightmapsInd:
130+
m_Texture: {fileID: 0}
131+
m_Scale: {x: 1, y: 1}
132+
m_Offset: {x: 0, y: 0}
133+
- unity_ShadowMasks:
134+
m_Texture: {fileID: 0}
135+
m_Scale: {x: 1, y: 1}
136+
m_Offset: {x: 0, y: 0}
124137
m_Floats:
125138
- _AORemapMax: 1
126139
- _AORemapMin: 0
@@ -134,6 +147,8 @@ Material:
134147
- _AlphaCutoffShadow: 0.5
135148
- _AlphaDstBlend: 0
136149
- _AlphaSrcBlend: 1
150+
- _AlphaToMask: 0
151+
- _AlphaToMaskInspectorValue: 0
137152
- _Anisotropy: 0
138153
- _BlendMode: 0
139154
- _CoatMask: 0
@@ -190,14 +205,19 @@ Material:
190205
- _LinkDetailsWithBase: 1
191206
- _MaterialID: 1
192207
- _Metallic: 0.28
208+
- _MetallicRemapMax: 0.28
209+
- _MetallicRemapMin: 0
193210
- _NormalMapSpace: 0
194211
- _NormalScale: 1
212+
- _OpaqueCullMode: 2
195213
- _PPDLodThreshold: 5
196214
- _PPDMaxSamples: 15
197215
- _PPDMinSamples: 5
198216
- _PPDPrimitiveLength: 1
199217
- _PPDPrimitiveWidth: 1
218+
- _RayTracing: 0
200219
- _ReceivesSSR: 1
220+
- _ReceivesSSRTransparent: 0
201221
- _RefractionModel: 0
202222
- _SSRefractionProjectionModel: 0
203223
- _Smoothness: 0.667
@@ -258,3 +278,4 @@ Material:
258278
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
259279
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
260280
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
281+
m_BuildTextureStacks: []

TestProjects/PerceptionHDRP/Assets/HDRenderPipelineAsset.asset

Lines changed: 120 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3}
1313
m_Name: HDRenderPipelineAsset
1414
m_EditorClassIdentifier:
15-
m_Version: 14
15+
m_Version: 18
1616
m_ObsoleteFrameSettings:
1717
overrides: 0
1818
enableShadow: 0
@@ -151,49 +151,66 @@ MonoBehaviour:
151151
m_RenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7,
152152
type: 2}
153153
m_RenderPipelineRayTracingResources: {fileID: 0}
154-
m_DefaultVolumeProfile: {fileID: 0}
155-
m_DefaultLookDevProfile: {fileID: 0}
154+
m_DefaultVolumeProfile: {fileID: 11400000, guid: f940a8037e6cda542891dc1aac1fa4e8,
155+
type: 2}
156+
m_LensAttenuation: 0
157+
m_UseRenderGraph: 1
158+
m_DefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02,
159+
type: 2}
156160
m_RenderingPathDefaultCameraFrameSettings:
157161
bitDatas:
158-
data1: 70280697347933
159-
data2: 4539628425463136256
162+
data1: 140649441525597
163+
data2: 4539628425463136280
160164
lodBias: 1
161165
lodBiasMode: 0
162166
lodBiasQualityLevel: 0
163167
maximumLODLevel: 0
164168
maximumLODLevelMode: 0
165169
maximumLODLevelQualityLevel: 0
170+
sssQualityMode: 0
171+
sssQualityLevel: 0
172+
sssCustomSampleBudget: 20
166173
materialQuality: 0
167174
m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings:
168175
bitDatas:
169-
data1: 64942043591453
170-
data2: 4539628424389459968
176+
data1: 135310787769117
177+
data2: 4539628424389459992
171178
lodBias: 1
172179
lodBiasMode: 0
173180
lodBiasQualityLevel: 0
174181
maximumLODLevel: 0
175182
maximumLODLevelMode: 0
176183
maximumLODLevelQualityLevel: 0
184+
sssQualityMode: 0
185+
sssQualityLevel: 0
186+
sssCustomSampleBudget: 20
177187
materialQuality: 0
178188
m_RenderingPathDefaultRealtimeReflectionFrameSettings:
179189
bitDatas:
180-
data1: 69692120112925
181-
data2: 4539628424657895424
190+
data1: 140060864290589
191+
data2: 4539628424657895448
182192
lodBias: 1
183193
lodBiasMode: 0
184194
lodBiasQualityLevel: 0
185195
maximumLODLevel: 0
186196
maximumLODLevelMode: 0
187197
maximumLODLevelQualityLevel: 0
198+
sssQualityMode: 0
199+
sssQualityLevel: 0
200+
sssCustomSampleBudget: 20
188201
materialQuality: 0
189202
m_RenderPipelineSettings:
190203
supportShadowMask: 1
191204
supportSSR: 0
205+
supportSSRTransparent: 0
192206
supportSSAO: 1
207+
supportSSGI: 0
193208
supportSubsurfaceScattering: 1
194-
increaseSssSampleCount: 0
209+
sssSampleBudget:
210+
m_Values: 140000002800000050000000
211+
m_SchemaId:
212+
m_Id: With3Levels
195213
supportVolumetrics: 1
196-
increaseResolutionOfVolumetrics: 0
197214
supportLightLayers: 0
198215
lightLayerName0: Light Layer default
199216
lightLayerName1: Light Layer 1
@@ -211,25 +228,42 @@ MonoBehaviour:
211228
supportCustomPass: 1
212229
customBufferFormat: 12
213230
supportedLitShaderMode: 3
231+
planarReflectionResolution:
232+
m_Values: 000100000004000000080000
233+
m_SchemaId:
234+
m_Id: With3Levels
214235
supportDecals: 1
236+
supportDecalLayers: 0
237+
decalLayerName0: Decal Layer default
238+
decalLayerName1: Decal Layer 1
239+
decalLayerName2: Decal Layer 2
240+
decalLayerName3: Decal Layer 3
241+
decalLayerName4: Decal Layer 4
242+
decalLayerName5: Decal Layer 5
243+
decalLayerName6: Decal Layer 6
244+
decalLayerName7: Decal Layer 7
215245
msaaSampleCount: 1
216246
supportMotionVectors: 1
217247
supportRuntimeDebugDisplay: 1
248+
supportRuntimeAOVAPI: 0
218249
supportDitheringCrossFade: 1
219250
supportTerrainHole: 0
251+
supportProbeVolume: 0
220252
supportRayTracing: 0
253+
supportedRayTracingMode: 3
254+
probeVolumeSettings:
255+
atlasResolution: 128
256+
atlasOctahedralDepthResolution: 2048
221257
lightLoopSettings:
222258
cookieAtlasSize: 512
223259
cookieFormat: 74
224-
pointCookieSize: 128
225-
cubeCookieTexArraySize: 16
226260
cookieAtlasLastValidMip: 0
227261
cookieTexArraySize: 16
228262
planarReflectionAtlasSize: 4096
229263
reflectionProbeCacheSize: 64
230264
reflectionCubemapSize: 256
231265
reflectionCacheCompressed: 0
232-
planarReflectionCacheCompressed: 0
266+
reflectionProbeFormat: 74
233267
skyReflectionSize: 256
234268
skyLightingOverrideLayerMask:
235269
serializedVersion: 2
@@ -241,6 +275,7 @@ MonoBehaviour:
241275
maxEnvLightsOnScreen: 64
242276
maxDecalsOnScreen: 512
243277
maxPlanarReflectionOnScreen: 16
278+
maxLightsPerClusterCell: 8
244279
hdShadowInitParams:
245280
maxShadowRequests: 128
246281
directionalShadowsDepthBits: 32
@@ -253,6 +288,8 @@ MonoBehaviour:
253288
shadowAtlasResolution: 4096
254289
shadowAtlasDepthBits: 32
255290
useDynamicViewportRescale: 1
291+
cachedPunctualLightShadowAtlas: 2048
292+
cachedAreaLightShadowAtlas: 1024
256293
shadowResolutionDirectional:
257294
m_Values: 00010000000200000004000000080000
258295
m_SchemaId:
@@ -295,6 +332,7 @@ MonoBehaviour:
295332
xrSettings:
296333
singlePass: 1
297334
occlusionMesh: 1
335+
cameraJitter: 0
298336
postProcessQualitySettings:
299337
NearBlurSampleCount: 030000000500000008000000
300338
NearBlurMaxRadius:
@@ -308,9 +346,11 @@ MonoBehaviour:
308346
- 13
309347
DoFResolution: 040000000200000001000000
310348
DoFHighQualityFiltering: 000101
349+
DoFPhysicallyBased: 000000
311350
MotionBlurSampleCount: 04000000080000000c000000
312351
BloomRes: 040000000200000002000000
313352
BloomHighQualityFiltering: 000101
353+
BloomHighQualityPrefiltering: 000001
314354
ChromaticAberrationMaxSamples: 03000000060000000c000000
315355
lightSettings:
316356
useContactShadow:
@@ -336,6 +376,66 @@ MonoBehaviour:
336376
AODirectionCount: 010000000200000004000000
337377
ContactShadowSampleCount: 060000000a00000010000000
338378
SSRMaxRaySteps: 100000002000000040000000
379+
RTAORayLength:
380+
- 0.5
381+
- 3
382+
- 20
383+
RTAOSampleCount: 010000000200000008000000
384+
RTAODenoise: 010101
385+
RTAODenoiserRadius:
386+
- 0.25
387+
- 0.5
388+
- 0.65
389+
RTGIRayLength:
390+
- 50
391+
- 50
392+
- 50
393+
RTGIFullResolution: 000001
394+
RTGIClampValue:
395+
- 0.5
396+
- 0.8
397+
- 1.5
398+
RTGIUpScaleRadius: 040000000400000004000000
399+
RTGIDenoise: 010101
400+
RTGIHalfResDenoise: 010000
401+
RTGIDenoiserRadius:
402+
- 0.75
403+
- 0.5
404+
- 0.25
405+
RTGISecondDenoise: 010101
406+
RTGISecondDenoiserRadius:
407+
- 0
408+
- 0
409+
- 0
410+
RTRMinSmoothness:
411+
- 0.6
412+
- 0.4
413+
- 0
414+
RTRSmoothnessFadeStart:
415+
- 0.7
416+
- 0.5
417+
- 0
418+
RTRRayLength:
419+
- 50
420+
- 50
421+
- 50
422+
RTRClampValue:
423+
- 0.8
424+
- 1
425+
- 1.2
426+
RTRUpScaleRadius: 040000000400000003000000
427+
RTRFullResolution: 000001
428+
RTRDenoise: 010101
429+
RTRDenoiserRadius: 080000000c00000010000000
430+
Fog_ControlMode: 000000000000000000000000
431+
Fog_Budget:
432+
- 0.166
433+
- 0.33
434+
- 0.666
435+
Fog_DepthRatio:
436+
- 0.666
437+
- 0.666
438+
- 0.5
339439
allowShaderVariantStripping: 1
340440
enableSRPBatcher: 1
341441
shaderVariantLogLevel: 0
@@ -344,5 +444,11 @@ MonoBehaviour:
344444
diffusionProfileSettings: {fileID: 0}
345445
diffusionProfileSettingsList: []
346446
beforeTransparentCustomPostProcesses: []
447+
beforeTAACustomPostProcesses: []
347448
beforePostProcessCustomPostProcesses: []
348449
afterPostProcessCustomPostProcesses: []
450+
virtualTexturingSettings:
451+
streamingCpuCacheSizeInMegaBytes: 256
452+
streamingGpuCacheSettings:
453+
- format: 0
454+
sizeInMegaBytes: 128

0 commit comments

Comments
 (0)