Skip to content

Conversation

jenniferd-unity
Copy link
Contributor

@jenniferd-unity jenniferd-unity commented Jan 11, 2021

Purpose of this PR

Presentation powerpoint here
This is the first implementation of HDRP Global Settings as an asset separate from the HDRPAsset. Further development is planned.

[UI updated on Feb 26th]
image

I have moved from the HDRenderPipeline.defaultAsset various settings:

  • Resources (Editor/RayTracing/Player)
  • Default Volume Profile for Scenes and LookDev
  • Layer names
  • Shader Variant Log level
  • Default Frame Settings for Camera, Reflection Probes
  • Lens Attenuation
  • Diffusion Profile Settings List
  • Custom Post Processes Lists

No behaviors should be changed on any HDRP project with those changes except:

  • the HDRPAsset no longer contains settings that were duplicated for the default asset
  • there is always a HDRenderPipelineGlobalSettings asset active
  • this asset can be viewed from the Project Settings > Graphics window
  • individual HDRenderPipelineGlobalSettings assets have their own inspector.

When upgrading to this new version:

  • a new asset should be created in the HDDefaultResources folder called HDRenderPipelineGlobalSettings .asset
  • values of the HDRPAsset saved in GraphicsSettings compatible are migrated to this new asset

The create menu can be found here:
image

When deleting the active Global Settings asset, a new one will be created and an error message displayed:
https://user-images.githubusercontent.com/71718938/108837110-145aa980-75d2-11eb-8a70-6c66236f2941.mp4

Asset creation workflow: set as active Asset if created from the HDRP Settings menu only.
https://user-images.githubusercontent.com/71718938/108840941-4faba700-75d7-11eb-853e-0cb2d87876d8.mp4


Testing status

Tried the following locally - on Windows only:

  • Editor: upgrading HDRP template, Spaceship demo, small local projects,
  • Creating new project from Hub,
  • Creating players for some projects (template HD and spaceship demo),
  • Running HDRP tests, RayTracing tests.

Comments to reviewers

This is the first implementation of HDRP Global Settings as an asset separate from the HDRPAsset. Further development is planned.


JIRA

https://jira.unity3d.com/browse/XPIPELINE-38
https://unity3d.atlassian.net/browse/UR-1967

# Conflicts:
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.cs
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettingsHistory.cs
#	com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs
@github-actions github-actions bot added the HDRP label Jan 11, 2021
@jenniferd-unity jenniferd-unity changed the title Hd/hdrp default settings Implementation of SRP Default Settings for HDRP Jan 14, 2021
Copy link
Member

@alelievr alelievr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments, probably worth it to write an upgrade guide too (I think you can put it here: https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2021.1-to-2021.2.md)

Copy link
Contributor

@alex-vazquez alex-vazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good clean up :) Minor comments.

Copy link
Contributor

@RSlysz RSlysz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, hard to read due to the amount of change but seams globally good.

{
case Kind.Default:
hdrpAsset.defaultVolumeProfile = profile;
if (settings != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you should check this first things in this method and exit quickly if not true then. (or you will try letter to EditorUtility.SetDirty(null); )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still valid. Verify if you can dirty null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this in the last commit.

Copy link
Contributor

@alex-vazquez alex-vazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really minor thinks. Nice PR :)

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md
#	com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs
#	com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs
#	com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs
#	com.unity.render-pipelines.high-definition/Runtime/Material/SubsurfaceScattering/SubsurfaceScatteringManagerRT.cs
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.cs
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.cs
@jenniferd-unity jenniferd-unity requested a review from RSlysz March 8, 2021 15:32
public SerializedProperty renderPipelineResources;
public SerializedProperty renderPipelineRayTracingResources;

public SerializedFrameSettings defaultFrameSettings;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be better if contain Camera in this name (distinguish from other default)

Comment on lines +95 to +97
defaultFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultCameraFrameSettings"), null); //no overrides in HDRPAsset
defaultBakedOrCustomReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings"), null); //no overrides in HDRPAsset
defaultRealtimeReflectionFrameSettings = new SerializedFrameSettings(serializedObject.FindProperty("m_RenderingPathDefaultRealtimeReflectionFrameSettings"), null); //no overrides in HDRPAsset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure that TitleDrawingScope comply with the null value.

Comment on lines 180 to 183
void OnEnable()
{
k_Migration.Migrate(this);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Beeing picky] why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted it :)

SetupLayerPriorities();
}

static HDRenderPipelineGlobalSettings m_globalSettings;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand well, there is case where we want to change the global settings (using Unity in dofferent context). If it is registered as static here, it will not adapt except if a domain reload occures. Can we assert this is the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this adapts as in RegisterCustomPasses we are checking the value. (lines 937 - 950). Could you confirm it works for you?

@remi-chapelain remi-chapelain self-requested a review March 9, 2021 12:01
@sebastienlagarde sebastienlagarde requested a review from a team March 10, 2021 09:20
# Conflicts:
#	com.unity.render-pipelines.core/Editor/CoreEditorStyles.cs
#	com.unity.render-pipelines.high-definition/CHANGELOG.md
#	com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2021.1-to-2021.2.md
#	com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs
#	com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs
#	com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.cs
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingRecursiveRenderer.cs
@jenniferd-unity jenniferd-unity requested a review from RSlysz March 10, 2021 13:49
Copy link
Contributor

@remi-chapelain remi-chapelain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As agreed with HDRP Team, go for merge ! ✔️
There's still a few minor issues referenced in the test document.

Those shouldn't impact upgrade process and new users from doing anything and have an obvious workaround and/or are easily dismissible by users.
Once the PR is merged, they'll be converted into bugs to prevent them from lingering too long in alpha versions !

@UnityCatalina UnityCatalina self-requested a review March 11, 2021 10:56
# Conflicts:
#	com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2021.1-to-2021.2.md
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs
@jenniferd-unity jenniferd-unity marked this pull request as ready for review March 12, 2021 11:07
@github-actions github-actions bot added the SRP label Mar 12, 2021
@kroatoa
Copy link
Contributor

kroatoa commented Mar 12, 2021

Hi @jenniferd-unity
You write

Further development is planned.
Does that refer to the rest of the work to get the URP/HDRP compatibilty, or is that work needed to make the feature in this PR complete?

@jenniferd-unity
Copy link
Contributor Author

Hi, yes the follow up is here: https://jira.unity3d.com/browse/XPIPELINE-97.
Also i synced latest master this morning and will fix yamato today :)

Copy link
Contributor

@kroatoa kroatoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the clarification.

sebastienlagarde and others added 5 commits March 16, 2021 10:04
Made sure HDRenderPipelineGlobalSettings are loaded before pulling its setting for shadervariantloglevel.
…or (cannot create an asset while building a player)
# Conflicts:
#	TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5011_VolumetricClouds.unity
#	TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5011_VolumetricCloudsShadows.unity
#	com.unity.render-pipelines.high-definition/CHANGELOG.md
#	com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs
#	com.unity.render-pipelines.high-definition/Runtime/Debug/LightingDebug.cs
@sebastienlagarde sebastienlagarde merged commit 1c1482a into master Mar 18, 2021
@sebastienlagarde sebastienlagarde deleted the hd/hdrp-default-settings branch March 18, 2021 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.