浏览代码

Merge branch 'master' into 0.3.0-staging

/0.3.0-staging
Jon Hogins 4 年前
当前提交
de5bdf5c
共有 19 个文件被更改,包括 126 次插入88 次删除
  1. 1
      .yamato/upm-ci-full.yml
  2. 74
      TestProjects/PerceptionHDRP/Assets/HDRenderPipelineAsset.asset
  3. 4
      TestProjects/PerceptionHDRP/Assets/IdLabelConfig.asset
  4. 2
      TestProjects/PerceptionHDRP/Assets/IdLabelConfig.asset.meta
  5. 11
      TestProjects/PerceptionHDRP/Assets/Scenes/SampleScene.unity
  6. 4
      TestProjects/PerceptionHDRP/Packages/manifest.json
  7. 10
      TestProjects/PerceptionHDRP/Packages/packages-lock.json
  8. 5
      TestProjects/PerceptionHDRP/ProjectSettings/EditorBuildSettings.asset
  9. 23
      TestProjects/PerceptionHDRP/ProjectSettings/ProjectSettings.asset
  10. 4
      TestProjects/PerceptionHDRP/ProjectSettings/ProjectVersion.txt
  11. 4
      TestProjects/PerceptionURP/Packages/manifest.json
  12. 10
      TestProjects/PerceptionURP/Packages/packages-lock.json
  13. 5
      TestProjects/PerceptionURP/ProjectSettings/EditorBuildSettings.asset
  14. 4
      TestProjects/PerceptionURP/ProjectSettings/ProjectVersion.txt
  15. 8
      com.unity.perception/CHANGELOG.md
  16. 13
      com.unity.perception/Editor/GroundTruth/PerceptionCameraEditor.cs
  17. 12
      com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentationLabeler.cs
  18. 16
      com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs
  19. 4
      com.unity.perception/package.json

1
.yamato/upm-ci-full.yml


recurring:
- branch: master
frequency: daily # Should run between midnight and 6AM UTC
cancel_old_ci: true
artifacts:
logs:
paths:

74
TestProjects/PerceptionHDRP/Assets/HDRenderPipelineAsset.asset


m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3}
m_Name: HDRenderPipelineAsset
m_EditorClassIdentifier:
m_Version: 9
m_Version: 14
m_ObsoleteFrameSettings:
overrides: 0
enableShadow: 0

type: 2}
m_RenderPipelineRayTracingResources: {fileID: 0}
m_DefaultVolumeProfile: {fileID: 0}
m_DefaultLookDevProfile: {fileID: 0}
data1: 69730941533981
data2: 4539628424926265344
data1: 70280697347933
data2: 4539628425463136256
lodBias: 1
lodBiasMode: 0
lodBiasQualityLevel: 0

supportVolumetrics: 1
increaseResolutionOfVolumetrics: 0
supportLightLayers: 0
lightLayerName0: Light Layer default
lightLayerName1: Light Layer 1
lightLayerName2: Light Layer 2
lightLayerName3: Light Layer 3
lightLayerName4: Light Layer 4
lightLayerName5: Light Layer 5
lightLayerName6: Light Layer 6
lightLayerName7: Light Layer 7
supportedLitShaderMode: 2
supportCustomPass: 1
customBufferFormat: 12
supportedLitShaderMode: 3
supportDecals: 1
msaaSampleCount: 1
supportMotionVectors: 1

supportRayTracing: 0
supportedRaytracingTier: 2
cookieSize: 128
cookieTexArraySize: 16
cookieAtlasSize: 512
cookieFormat: 74
planarReflectionProbeCacheSize: 2
planarReflectionTextureSize: 1024
cookieAtlasLastValidMip: 0
cookieTexArraySize: 16
planarReflectionAtlasSize: 4096
reflectionProbeCacheSize: 64
reflectionCubemapSize: 256
reflectionCacheCompressed: 0

maxAreaLightsOnScreen: 64
maxEnvLightsOnScreen: 64
maxDecalsOnScreen: 512
maxPlanarReflectionOnScreen: 16
hdShadowInitParams:
maxShadowRequests: 128
directionalShadowsDepthBits: 32

useDynamicViewportRescale: 1
shadowResolutionDirectional:
m_Values: 00010000000200000004000000080000
m_SchemaId:
m_Id: With4Levels
m_SchemaId:
m_Id: With4Levels
m_SchemaId:
m_Id: With4Levels
maxScreenSpaceShadows: 2
maxScreenSpaceShadowSlots: 4
screenSpaceShadowBufferFormat: 48
decalSettings:
drawDistance: 1000
atlasWidth: 4096

m_LutSize: 32
lutFormat: 48
bufferFormat: 74
dynamicResolutionSettings:
enabled: 0
maxPercentage: 100

checkerboardDepthBuffer: 1
upsampleType: 1
xrSettings:
singlePass: 1
occlusionMesh: 1
postProcessQualitySettings:
NearBlurSampleCount: 030000000500000008000000

ChromaticAberrationMaxSamples: 03000000060000000c000000
lightSettings:
useContactShadow:
m_Low: 0
m_Medium: 0
m_High: 0
m_Values:
m_SchemaId:
m_Id:
m_Low: 0
m_Medium: 0
m_High: 0
m_Values: 000000000000000000000000
m_SchemaId:
m_Id: With3Levels
m_Low: 1
m_Medium: 1
m_High: 1
m_Values:
- 1
- 1
- 1
m_SchemaId:
m_Id: With3Levels
lightingQualitySettings:
AOStepCount: 040000000600000010000000
AOFullRes: 000001
AOMaximumRadiusPixels: 200000002800000050000000
AOBilateralUpsample: 000101
AODirectionCount: 010000000200000004000000
ContactShadowSampleCount: 060000000a00000010000000
SSRMaxRaySteps: 100000002000000040000000
materialQualityLevels: -1
m_CurrentMaterialQualityLevel: 4
availableMaterialQualityLevels: -1
m_DefaultMaterialQualityLevel: 4
diffusionProfileSettings: {fileID: 0}
diffusionProfileSettingsList: []
beforeTransparentCustomPostProcesses: []

4
TestProjects/PerceptionHDRP/Assets/IdLabelConfig.asset


m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 0}
m_Script: {fileID: 11500000, guid: 2f09f279848e42cea259348b13bce4c5, type: 3}
m_EditorClassIdentifier: Unity.Perception.Runtime:UnityEngine.Perception.GroundTruth:IdLabelConfig
m_EditorClassIdentifier:
m_LabelEntries:
- label: Crate
id: 1

2
TestProjects/PerceptionHDRP/Assets/IdLabelConfig.asset.meta


fileFormatVersion: 2
guid: 034ffd4e09ffb7348b2fe6634259058a
guid: 258de5b48703743468d34fc5bbdfa3aa
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0

11
TestProjects/PerceptionHDRP/Assets/Scenes/SampleScene.unity


- id: 1
- id: 2
- id: 3
showVisualizations: 0
references:
version: 1
00000000:

enabled: 1
foldout: 0
idLabelConfig: {fileID: 11400000, guid: 034ffd4e09ffb7348b2fe6634259058a,
idLabelConfig: {fileID: 11400000, guid: 258de5b48703743468d34fc5bbdfa3aa,
type: 2}
00000001:
type: {class: SemanticSegmentationLabeler, ns: UnityEngine.Perception.GroundTruth,

foldout: 0
annotationId: 12f94d8d-5425-4deb-9b21-5e53ad957d66
labelConfig: {fileID: 11400000, guid: c140c5aa05dd09e4fadaa26de31b1f39, type: 2}
m_TargetTextureOverride: {fileID: 0}

enabled: 1
foldout: 0
m_LabelConfig: {fileID: 11400000, guid: 034ffd4e09ffb7348b2fe6634259058a,
m_LabelConfig: {fileID: 11400000, guid: 258de5b48703743468d34fc5bbdfa3aa,
type: 2}
00000003:
type: {class: RenderedObjectInfoLabeler, ns: UnityEngine.Perception.GroundTruth,

foldout: 0
idLabelConfig: {fileID: 11400000, guid: 034ffd4e09ffb7348b2fe6634259058a,
idLabelConfig: {fileID: 11400000, guid: 258de5b48703743468d34fc5bbdfa3aa,
type: 2}
--- !u!1 &1640252278
GameObject:

4
TestProjects/PerceptionHDRP/Packages/manifest.json


"com.unity.perception": "file:../../../com.unity.perception",
"com.unity.render-pipelines.core": "7.3.1",
"com.unity.render-pipelines.high-definition": "7.3.1",
"com.unity.simulation.capture": "0.0.10-preview.8",
"com.unity.simulation.core": "0.0.10-preview.14",
"com.unity.simulation.capture": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.17",
"com.unity.test-framework": "1.1.14",
"com.unity.testtools.codecoverage": "0.2.2-preview",
"com.unity.textmeshpro": "2.0.1",

10
TestProjects/PerceptionHDRP/Packages/packages-lock.json


"com.unity.nuget.newtonsoft-json": "1.1.2",
"com.unity.render-pipelines.core": "7.1.6",
"com.unity.entities": "0.8.0-preview.8",
"com.unity.simulation.capture": "0.0.10-preview.8",
"com.unity.simulation.core": "0.0.10-preview.14"
"com.unity.simulation.capture": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.17"
}
},
"com.unity.platforms": {

"url": "https://packages.unity.com"
},
"com.unity.simulation.capture": {
"version": "0.0.10-preview.8",
"version": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.12"
"com.unity.simulation.core": "0.0.10-preview.17"
"version": "0.0.10-preview.14",
"version": "0.0.10-preview.17",
"depth": 0,
"source": "registry",
"dependencies": {},

5
TestProjects/PerceptionHDRP/ProjectSettings/EditorBuildSettings.asset


EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
m_Scenes:
- enabled: 1
path: Assets/Scenes/SampleScene.unity
guid: 9fc0d4010bbf28b4594072e72b8655ab
m_configObjects: {}

23
TestProjects/PerceptionHDRP/ProjectSettings/ProjectSettings.asset


switchNVNShaderPoolsGranularity: 33554432
switchNVNDefaultPoolsGranularity: 16777216
switchNVNOtherPoolsGranularity: 16777216
switchNVNMaxPublicTextureIDCount: 0
switchNVNMaxPublicSamplerIDCount: 0
stadiaPresentMode: 0
stadiaTargetFramerate: 0
vulkanEnableLateAcquireNextImage: 0
m_SupportedAspectRatios:
4:3: 1
5:4: 1

uIStatusBarHidden: 1
uIExitOnSuspend: 0
uIStatusBarStyle: 0
iPhoneSplashScreen: {fileID: 0}
iPhoneHighResSplashScreen: {fileID: 0}
iPhoneTallHighResSplashScreen: {fileID: 0}
iPhone47inSplashScreen: {fileID: 0}
iPhone55inPortraitSplashScreen: {fileID: 0}
iPhone55inLandscapeSplashScreen: {fileID: 0}
iPhone58inPortraitSplashScreen: {fileID: 0}
iPhone58inLandscapeSplashScreen: {fileID: 0}
iPadPortraitSplashScreen: {fileID: 0}
iPadHighResPortraitSplashScreen: {fileID: 0}
iPadLandscapeSplashScreen: {fileID: 0}
iPadHighResLandscapeSplashScreen: {fileID: 0}
iPhone65inPortraitSplashScreen: {fileID: 0}
iPhone65inLandscapeSplashScreen: {fileID: 0}
iPhone61inPortraitSplashScreen: {fileID: 0}
iPhone61inLandscapeSplashScreen: {fileID: 0}
appleTVSplashScreen: {fileID: 0}
appleTVSplashScreen2x: {fileID: 0}
tvOSSmallIconLayers: []

ps4UseResolutionFallback: 0
ps4ReprojectionSupport: 0
ps4UseAudio3dBackend: 0
ps4UseLowGarlicFragmentationMode: 1
ps4SocialScreenEnabled: 0
ps4ScriptOptimizationLevel: 2
ps4Audio3dVirtualSpeakerCount: 14

XboxOnePersistentLocalStorageSize: 0
XboxOneXTitleMemory: 8
XboxOneOverrideIdentityName:
XboxOneOverrideIdentityPublisher:
vrEditorSettings:
daydream:
daydreamIconForeground: {fileID: 0}

4
TestProjects/PerceptionHDRP/ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.4.1f1
m_EditorVersionWithRevision: 2019.4.1f1 (e6c045e14e4e)
m_EditorVersion: 2019.4.7f1
m_EditorVersionWithRevision: 2019.4.7f1 (e992b1a16e65)

4
TestProjects/PerceptionURP/Packages/manifest.json


"com.unity.package-validation-suite": "0.9.1-preview",
"com.unity.perception": "file:../../../com.unity.perception",
"com.unity.render-pipelines.universal": "7.3.1",
"com.unity.simulation.capture": "0.0.10-preview.8",
"com.unity.simulation.core": "0.0.10-preview.14",
"com.unity.simulation.capture": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.17",
"com.unity.test-framework": "1.1.14",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.2.12",

10
TestProjects/PerceptionURP/Packages/packages-lock.json


"com.unity.nuget.newtonsoft-json": "1.1.2",
"com.unity.render-pipelines.core": "7.1.6",
"com.unity.entities": "0.8.0-preview.8",
"com.unity.simulation.capture": "0.0.10-preview.8",
"com.unity.simulation.core": "0.0.10-preview.14"
"com.unity.simulation.capture": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.17"
}
},
"com.unity.platforms": {

"url": "https://packages.unity.com"
},
"com.unity.simulation.capture": {
"version": "0.0.10-preview.8",
"version": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.12"
"com.unity.simulation.core": "0.0.10-preview.17"
"version": "0.0.10-preview.14",
"version": "0.0.10-preview.17",
"depth": 0,
"source": "registry",
"dependencies": {},

5
TestProjects/PerceptionURP/ProjectSettings/EditorBuildSettings.asset


EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/SampleScene.unity
guid: 9fc0d4010bbf28b4594072e72b8655ab
m_Scenes: []
m_configObjects: {}

4
TestProjects/PerceptionURP/ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.4.1f1
m_EditorVersionWithRevision: 2019.4.1f1 (e6c045e14e4e)
m_EditorVersion: 2019.4.7f1
m_EditorVersionWithRevision: 2019.4.7f1 (e992b1a16e65)

8
com.unity.perception/CHANGELOG.md


Fixed errors in example script when exiting play mode
Updated to com.unity.simulation.capture version 0.0.10-preview.10 and com.unity.simulation.core version 0.0.10-preview.17
### Fixed
Fixed compilation warnings with latest com.unity.simulation.core package.
Fixed errors in example script when exiting play mode
## [0.2.0-preview.2] - 2020-07-15
### Fixed

13
com.unity.perception/Editor/GroundTruth/PerceptionCameraEditor.cs


}
if (EditorSettings.asyncShaderCompilation)
{
EditorGUILayout.HelpBox("Asynchronous shader compilation may result in invalid data in beginning frames. This can be disabled in Project Settings -> Edtior -> Asynchronous Shader Compilation", MessageType.Warning);
EditorGUILayout.HelpBox("Asynchronous shader compilation may result in invalid data in beginning frames. " +
"This can be disabled in Project Settings -> Edtior -> Asynchronous Shader Compilation", MessageType.Warning);
}
#if HDRP_PRESENT
var hdRenderPipelineAsset = UnityEngine.Rendering.GraphicsSettings.renderPipelineAsset as UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset;
if (hdRenderPipelineAsset != null &&
hdRenderPipelineAsset.currentPlatformRenderPipelineSettings.supportedLitShaderMode ==
UnityEngine.Rendering.HighDefinition.RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly)
{
EditorGUILayout.HelpBox("Deferred Only shader mode is not supported by rendering-based labelers. " +
"For correct labeler output, switch Lit Shader Mode to Both or Forward Only in your HD Render Pipeline Asset", MessageType.Error);
#endif
}
CameraLabelerDrawer GetCameraLabelerDrawer(SerializedProperty element, int listIndex)

12
com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentationLabeler.cs


var asyncRequest = Manager.Instance.CreateRequest<AsyncRequest<AsyncSemanticSegmentationWrite>>();
if (visualizationEnabled)
VisualizeSegmentationTexture(data, targetTexture);
imageReadback?.Invoke(new ImageReadbackEventArgs
{
data = data,

segImage = segVisual.GetComponent<RawImage>();
segImage.material.SetFloat("_SegmentTransparency", defaultSegmentTransparency);
segImage.material.SetFloat("_BackTransparency", defaultBackgroundTransparency);
segImage.texture = targetTexture;
RectTransform rt = segVisual.transform as RectTransform;
rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, camWidth);

}
void VisualizeSegmentationTexture(NativeArray<Color32> data, RenderTexture texture)
{
var cpuTexture = new Texture2D(texture.width, texture.height, GraphicsFormat.R8G8B8A8_UNorm, TextureCreationFlags.None);
cpuTexture.LoadRawTextureData(data);
cpuTexture.Apply();
segImage.texture = cpuTexture;
}
/// <inheritdoc/>

16
com.unity.perception/Runtime/GroundTruth/PerceptionCamera.cs


List<CameraLabeler> m_Labelers = new List<CameraLabeler>();
Dictionary<string, object> m_PersistentSensorData = new Dictionary<string, object>();
bool m_CapturedLastFrame;
int m_LastFrameCaptured = -1;
Ego m_EgoMarker;
#pragma warning disable 414

var ego = m_EgoMarker == null ? DatasetCapture.RegisterEgo("") : m_EgoMarker.EgoHandle;
SensorHandle = DatasetCapture.RegisterSensor(ego, "camera", description, period, startTime);
AsyncRequest.maxJobSystemParallelism = 0; // Jobs are not chained to one another in any way, maximizing parallelism
AsyncRequest.maxAsyncRequestFrameAge = 4; // Ensure that readbacks happen before Allocator.TempJob allocations get stale
SetupInstanceSegmentation();
var cam = GetComponent<Camera>();

s_VisualizedPerceptionCamera = this;
// set up to render to a render texture instead of the screen
var visualizationRenderTexture = new RenderTexture(new RenderTextureDescriptor(cam.pixelWidth, cam.pixelHeight, UnityEngine.Experimental.Rendering.GraphicsFormat.R8G8B8A8_UNorm, 8));
var visualizationRenderTexture = new RenderTexture(cam.pixelWidth, cam.pixelHeight, 8, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB);
visualizationRenderTexture.name = cam.name + "_visualization_texture";
cam.targetTexture = visualizationRenderTexture;

}
};
CaptureCamera.Capture(cam, colorFunctor, flipY: flipY);
CaptureCamera.Capture(cam, colorFunctor, flipY: ShouldFlipY(cam));
Profiler.EndSample();
}

var hdAdditionalCameraData = GetComponent<HDAdditionalCameraData>();
//Based on logic in HDRenderPipeline.PrepareFinalBlitParameters
return camera.targetTexture != null || hdAdditionalCameraData.flipYMode == HDAdditionalCameraData.FlipYMode.ForceFlipY || camera.cameraType == CameraType.Game;
return hdAdditionalCameraData.flipYMode == HDAdditionalCameraData.FlipYMode.ForceFlipY || (camera.targetTexture == null && camera.cameraType == CameraType.Game);
#elif URP_PRESENT
return (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D11 || SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal) &&
(camera.targetTexture == null && camera.cameraType == CameraType.Game);

return;
if (!SensorHandle.ShouldCaptureThisFrame)
return;
//there are cases when OnBeginCameraRendering is called multiple times in the same frame. Ignore the subsequent calls.
if (m_LastFrameCaptured == Time.frameCount)
return;
m_LastFrameCaptured = Time.frameCount;
#if UNITY_EDITOR
if (UnityEditor.EditorApplication.isPaused)
return;

4
com.unity.perception/package.json


"com.unity.nuget.newtonsoft-json": "1.1.2",
"com.unity.render-pipelines.core": "7.1.6",
"com.unity.entities": "0.8.0-preview.8",
"com.unity.simulation.capture": "0.0.10-preview.8",
"com.unity.simulation.core": "0.0.10-preview.14"
"com.unity.simulation.capture": "0.0.10-preview.10",
"com.unity.simulation.core": "0.0.10-preview.17"
},
"description": "Tools for authoring and executing autonomous vehicle simulations.",
"displayName": "Perception",

正在加载...
取消
保存