Skip to content

Conversation

pmavridis
Copy link
Contributor

@pmavridis pmavridis commented Jan 6, 2021

Purpose of this PR

As reported by the recorder team, there were some timing issues with the accumulation motion blur (the camera transitions in recorded timelines were not consistent with the non-mb case).

This problem was created from two different aspects of our first implementation:

  1. The use of Time.timescale did not "play nice" with timelines. In the new implementation we scale manually the Time.captureDeltaTime and the Time.fixedDeltaTime parameters instead of using Time.timescale.

  2. There was some complex logic that was manipulating the Time.timescale per frame. This was done to avoid sampling frames with zero contribution when the shutter interval is < 1 and for centering the MB. However, my tests has shown that this was also affecting the timing. The new implementation removed this complex logic (so we are a bit less efficient when shutter interval is < 1) and the mb is now forward. The code is now more simple/easy to understand and the timing is consistent with non-mb.


Testing status

  • @jeanblouin already had an early look at this branch and he reported that it fixes the issues they were having with the recorder.
  • I have added some falling objects (with rigid body dynamics) in the new HDRP template scene and recorded with and without mb. The timings (the frame in which the objects hit the ground) were consistent.
  • I have recorded the timelines that are available in the HDRP template and the timing were also consistent with the non-mb case.

Fix rigid body simulation with acc mb

Update changelog
fabien-unity pushed a commit that referenced this pull request Jan 6, 2021
* Add upmNoDefaultPackages argument to upm-ci test calls

* Add explicit reference to com.unity.physics in the core package

* Update to use preview package

* Add physics module instead of package

* Add video module to hdrp

* Add animation & imageconversion modules
@sebastienlagarde sebastienlagarde marked this pull request as ready for review January 6, 2021 18:37
@sebastienlagarde sebastienlagarde merged commit 27b1731 into master Jan 6, 2021
@sebastienlagarde sebastienlagarde deleted the HDRP/fix_accumulation branch January 6, 2021 18:42
sebastienlagarde added a commit that referenced this pull request Mar 2, 2021
* [HDRP][Path Tracing] Improved volumetric scattering sampling #2840

* Update CHANGELOG.md

* Fix HDRP tests with by enabling backbuffer instead of render texture (#2898)

* add missing [UnityTest] attribute and use WaitForEndOfFrame

* activate UseBackBuffer on SSR and SSAO scenes

* update reference images for win editor

* Update Vulkan linux screenshots

* add missing config file to disable batch mode for DXR tests

* increase VFX tests timeout to handle complex scenes with many shaders and XR variants

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Merge Hd/bugfix (#2928)

* [HDRP] Fix coat normal space (#2888)

* Fix coat normal space

* Update CHANGELOG.md

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Avoid issues causing faulty transitions in shadows (resulting in no shadows with unconventional aspect ratio)  (#2776)

* Fixed volume component tooltips using the same parameter name (#2754)

* Use the proper history info for Bicubic resampling in TAA (#2759)

* Use proper info for previous buffer info

* changelog

* Fixed lookdev movement (#2757)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [HDRP] Fix issue with saving some quality settings in volume overrides (#2758)

* Fix issue with saving some quality settings volume overrides

* Fix typo in changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [HDRP] Fixed NullReferenceException in HDRenderPipeline.UpgradeResourcesIfNeeded (case 1292524) (#2765)

* fix issue with confusing text (#2766)

* Fix

* Fix white dots

* Changelog

* Rename the sunrise icon to fix typo, causing issue with 2x resolution loading. (#2809)

* [HDRP] Rename HDRP to HD Render Pipeline in menu item (#2819)

* [HDRP] Update HDRP menu in shader graph

* Update CHANGELOG.md

* HDRP/Fix package version showing package after the last "verified" package (#2783)

* Fix typo

* Remove last version checker from wizard and add link to package manager instead

* Update CHANGELOG.md

* Update documentation

* Update Render-Pipeline-Wizard.md

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Revert bad changelog merge

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: John Parsaie <johnpa@unity3d.com>
Co-authored-by: Remi Slysz <40034005+RSlysz@users.noreply.github.com>

* Fixed invalid loop length for probe baking (case 1289680) (#2830)

* Fixed invalid loop length for probe baking (case 1289680)

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix volumetric fog with XR single-pass (#2823)

* fix volumetric fog with XR single-pass rendering

* update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [HDRP] Fix rendering issues for the first frame (#2836)

* Fix first frame exposure, depth pyramid / AO

* Update changelog

* Comment

* Typo

* Add missing RenderGraphBuilder.ReadTexture call

* Move ComputePackedMipChainInfo at the beginning of ExecuteWithRenderGraph

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Update 5001_Fog_FogFallback.png

* Revert "Update 5001_Fog_FogFallback.png"

This reverts commit 2653b9c.

* Update 5001_Fog_FogFallback.unity

* Fix AOV API for render graph (#2909)

* Fix AOV api in rendergraph

# Conflicts:
#	com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs

* Update changelog

* Fix a small discrepancy in the marker placement in light intensity sliders (#2924)

* Update CHANGELOG.md

* Fix issue with VT spewing errors when transparent and opaque are disabled (#2925)

* Fix

* Changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed a bug in the sphere-aabb light cluster (case 1294767). (#2920)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Move EndCameraRendering callback out of the profiling scope (#2917)

* Move EndCameraRendering callback out of the profiling scope

* added a comment

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed baked light being included into the ray tracing light cluster (case 1296203). (#2915)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Handle all enums the same way for UI (#2913)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Changed the message when the graphics device doesn't support ray tracing (case 1287355). (#2916)

* [HDRP] Fix default blocks for Hair and Eye shader graphs (#2919)

* Fixed default eye shader blocks

* Fix missing emission block in hair shader

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Init scene camera debug framesettings (#2931)

* Fixed using the wrong method to define if a light should be included in the light cluster depending on its baking status. (#2932)

* - Fixed using the wrong method to define if a light should be included in the light cluster depending on its baking status.

* Update CHANGELOG.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [HDRP] Change the behavior of custom passes when the volume is disabled (#2930)

* Changed the behavior of custom passes when the Custom Pass Volume component is disabled

* Updated changelog

* Fixed display of LOD Bias and maximum level in frame settings when using Quality Levels (#2921)

* Fixed display of LOD Bias and maximum level in frame settings when using Quality Levels

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed an issue when trying to open a look dev env library when Look Dev is not supported. (#2929)

* Fixed an issue when trying to open a look dev env library when Look Dev is not supported.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Enable Reflector for Spotlight by default

* - Fixed shader graph not supporting indirectdxr multibounce (case 1294694). (#2933)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed the planar depth texture not being properly created and rendered to (case 1299617). (#2926)

* Fixed the planar depth texture not being properly created and rendered to (case 1299617).

* adding comment

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed C# 8 compilation issue with turning on nullable checks (case 1300167) (#2949)

* Fixed C# 8 compilation issue with turning on nullable checks - bis (#2951)

* Fixed C# 8 compilation issue with turning on nullable checks (case 1300167)

* Update MaterialDebug.cs

* Fix scripting light test with enableReflector true by default

* Fixed affects AO for deacl materials (#2950)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed case where material keywords would not get setup before usage (#2961)

* Update CHANGELOG.md

Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: John Parsaie <johnpa@unity3d.com>
Co-authored-by: Remi Slysz <40034005+RSlysz@users.noreply.github.com>
Co-authored-by: Frédéric Vauchelles <55485372+fredericv-unity3d@users.noreply.github.com>
Co-authored-by: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com>
Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>

* Merge Hd/bugfix #2973

* Slight modification of 103_ReflectionQuality test to increase coverage with multibounce RTR (#2978)

* Slight modify of test

* reference image update

* Fixed an issue with material using distortion from ShaderGraph init after Material creation (case 1294026) #2982

* Enable GetSamplePosition on metal (#2988)

* HDRP docs bugfixes #2993

* Improved reflector property tooltip (#2994)

* Fixed light reflector typo

* Updated tooltip text to be more specific.

Co-authored-by: Lewis Jordan <lewisjordan@unity3d.com>

* Fix timing issues with accumulation motion blur #2999

* Hdrp/update decal handles pivot #3001

* fix alpha test screenshots

* Formatting

Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org>
Co-authored-by: Fabien Houlmann <44069206+fabien-unity@users.noreply.github.com>
Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: John Parsaie <johnpa@unity3d.com>
Co-authored-by: Remi Slysz <40034005+RSlysz@users.noreply.github.com>
Co-authored-by: Frédéric Vauchelles <55485372+fredericv-unity3d@users.noreply.github.com>
Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com>
Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
Co-authored-by: Lewis Jordan <lewisjordan@unity3d.com>
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.

3 participants