What's new in 7.2.0

Upgrade Guides
We started writing upgrade guides to help you transition from previous versions of the pipeline. We will write upgrade guides for minor and major updates. Patch updates don’t require guides as they are essentially bug fixes.

Camera Stacking

In the Universal Render Pipeline (URP), you can now use Camera Stacking to layer the output of multiple Cameras and create a single combined output. Camera Stacking allows you to create effects such as a 3D model in a 2D UI, or the cockpit of a vehicle. It also allows you to composite post-processing correctly with world space UI.

A Camera Stack consists of a Base Camera and any number of Overlay Cameras. When rendering cameras in a stack, the rendering is composited into a single render texture as if all cameras were a single one. In order to do this, the pipeline inherits several settings from the Base camera when rendering Overlay cameras. This is not only useful for performance but also allows you to configure consistently stacking rendering settings in the Base camera, such as viewport or HDR, and have those settings be automatically propagated to all cameras in the stack. You can still configure some rendering settings for each Overlay camera for optimal artistic control such as post-processing, shadows and use customized renderers with custom render passes.

There’s still work planned to improve camera stacking solution in URP. Some of that work consists of:

  • Support for Base and Overlay cameras to receive and cast shadows from other cameras.

  • Cache culling results for cameras in the stack

  • Support for Camera Stacking in 2D renderer and when using Multi-pass VR Mode.

For more information about how to configure and use camera stacking refer to the URP Camera Docs.

Universal Rendering Examples Updated

Universal Rendering Examples are updated to 7.2.0.
Here are some of the examples that were added:

  • 3D Character Menu with custom blur post-processing.

  • 3D Cockpit with World Space and Screen Space Camera UI.

  • 3D Skybox with stacking of depth and stencil.

  • FPS shooter using Camera Stacking.

Post-processing v2 in Universal Render Pipeline 2019
While working on Universal Render Pipeline for 2019.3 we developed an Integrated Post-Processing stack that is better coupled with the pipeline. This allowed us to deliver several performance improvements in the pipeline. The new stack also supports new effects like Camera Motion Blur and the Volume Framework.

Earlier this year we decided to drop support for PPv2 in URP in favor of this new integrated post-processing stack. However, the new stack is currently missing a very important feature for users: custom post-processing.

Based on this feedback, we decided to add support to PPv2 in URP as a fallback mode in 7.2.0. This way developers will have a choice to still keep using PPv2 for the next 2 years in 2019 LTS. PPv2 is removed from URP in 2020.

If you have the PPv2 package installed, there is now an option to select PPv2 stack from the pipeline asset. It works the same way as it used to work in LWRP and with the same limitations: no camera stacking and no support for Ambient Occlusion, Temporal Anti-aliasing and Motion Blur.

You cannot use both PPv2 and the new integrated stack at the same time. Enabling one disabled the other. Also note that PPv2 is provided as a fallback option and doesn’t support new URP features such as camera stacking.

VR Multi-pass mode
Multi pass VR mode is now supported with Universal Render Pipeline. Multipass rendering is a minimum requirement on many VR platforms and allows graceful fallback when single-pass rendering isn’t available.

This also fixes some single-eye rendering issues that were caused because VR was falling back to MultiPass.

2D Renderer Improvements
Transparency Sort Mode and Transparency Sort Axis are features that are present in the built-in render pipeline but missing from URP. In 7.2.0, they are added back to the 2D Renderer.

Now you can also change the default material that’s going to be used when you create new Sprites. This is useful when you have a custom Sprite shader that you want to apply to all new Sprites in your project.

Blend Styles in the 2D Renderer Data are now automatically enabled/disabled, depending on whether there are 2D Lights that actually use them.

If you are making an unlit 2D game but want to use the 2D Renderer due to Shader Graph, you’d be glad to hear that Sprites now render with a faster rendering path when no 2D Lights are present.

Shadows on transparent objects

URP now supports consistently transparent objects receiving shadows. This includes particle shaders as well.

There is a new setting in the renderer asset to choose whether to enable or disable shadows on transparents globally.

All stock and shader graph shaders will upgrade correctly to handle shadows in transparent objects. If you have written custom HLSL shaders to sample shadows check our 7.2.0 package upgrade guide.

MaterialDescriptionPreprocessors
Two new AssetPostprocessors and Shader Graphs add 3ds Max Physical Material and Arnold Standard Surface Material partial support for FBX files in the ModelImporter.

Basic PBR material properties like Base Color, Metalness, Roughness, Specular IOR, Emission and Normals are imported and mapped to custom shaders in Unity.

Sample of Arnold Standard Surface Materials in Maya


Arnold Standard Surface Materials imported in Unity

A word about post-processing in the new Integrated Post-processing stack (v3)

You can already leverage the custom render pass injection system in URP to do custom post-processing. We want to provide you with a template to create such a render pass and that you can easily add to a renderer. for more information about how to do it and link to one example check this [forum post]( Post-processing and URP - The plan page-3#post-5466441)

10 Likes

Just for clarification,

  1. what the difference between camera stacking and renderpasses?
  2. does camera stacking allow each camera to have its own resolution (say hi def UI on low rez scene geometry)?

That awkward moment you have over 7.000 .fbx files in your project and the new AssetPostprocessors decide to go over every single .fbx file again… Already waiting over 2 hours for Unity to launch and I’m not even at 5%.

2 Likes

This is a known HUP issue we are looking at: https://issuetracker.unity3d.com/issues/lwrp-clearing-playerprefs-through-a-script-or-editor-causes-delay-and-console-errors-to-appear-when-entering-the-play-mode

When rendering a camera there are several logical steps that composite your frame, things such as “draw opaques”, “draw skybox”, “draw outlines”, “draw transparents”, “draw post-processing”, etc. These are what we call “logical” render passes. I say logical because they can turn out to be less actual render passes in GPU. To make it simple you can think of actual render pass when a render target switch occurs. It’s possible for example that you render your entire frame with a single render pass.

For a single camera it goes like:

  1. Do culling
  2. Execute a bunch of ScriptableRenderPass for this camera
  3. Resolve camera target to screen (if required)

now for camera stacking, you want to continue rendering render passes to the same render target of the previous camera. So it goes like this:

For each camera in the stack:

  1. Do culling
  2. Execute a bunch of render passes
  3. If last camera resolve to screen.

In the end you can think of camera stacking as not resolving camera target to screen and just continue executing render passes until the stack is finished.

It does if using Overlay UI and the UI is in the last camera in the stack.

I don’t think it’s actually the same issue though. I upgraded URP to 7.2.1 and the moment I clicked update to 7.2.1 for ShaderGraph Unity decided to reimport every single fbx file again.

I’m fairly certain that this is due to the fact URP has 2 new AssetPostprocessors (FBXArnoldSurfaceMaterialDescriptionPreprocessor & PhysicalMaterial3DsMaxPreprocessor).

I’m guessing that Unity now decided to go over all the assets again, due to the fact there are new AssetPostprocessors for models. I’m obviously not 100%, but my specific issue has nothing to do with playerprefs deleting.

Also, to note. Some assets take a fraction of a second and others take almost 10 minutes. It could also be that this is an issue related to our RemoteAssetCache, as the editor.log seems to refer to that over and over again.

Example log:
Start importing Assets/AssetPathPlusName.fbx using Guid(307e06e6fe1908a4ab48f17d5b8a544e) Importer(-1,00000000000000000000000000000000)
Done importing asset: ‘Assets/AssetPathPlusName.fbx’ (target hash: ‘cfdf65606761d2437b408f84e4b53699’) in 0.080424 seconds
RemoteAssetCache::AddArtifactToCacheServer - artifactKey=‘Guid(307e06e6fe1908a4ab48f17d5b8a544e) Importer(-1,00000000000000000000000000000000)’ Target hash=‘cfdf65606761d2437b408f84e4b53699’
RemoteAssetCache - Download - Metadata - success:true, namespace:81e94844d19a16919208533e08183531, key:98834b208eb36e0102de4f23f7f0054b

I’d love to give you guys an actual project that allows you to reproduce this, but there’s no way I can send out a project with over 7000 assets…

1 Like

@phil_lira Just wanted to say thanks for your hard work with URP. I decided to use it for my latest game and am very much in love with it, because it empowers me but never gets in my way. If I want to do a certain thing, I find it much easier to do in URP than I do in built in.

The quality of the rendering is outstanding, and the forward renderer system for managing things like stencil or depth is a stroke of genius. I’m concerned about multi cam perf in VR and so on but hopefully all will get resolved without a tile resolves being a big thing.

Thank you!

6 Likes

@Arfus thanks for reporting we will investigate this.

2 Likes

Thanks for the answer it clarify a few things

I would still like some more precision about how much I can push the resolution thing:

  1. Can I do High rez proximity vs a low rez rendered background (as done in KLM jets)?

  2. Render particles or foliage on a low rez render, then composite it with the high rez scene (as done with Grid the racing game)?

  3. Render the scene in low rez, but has just a few focus objects in high rez composited on top (like eyes of character, fence, wire, etc…)?

  4. Simulate a fixed foveated rendering that adapt to performance scaling (center stay high rez, but background and peripherie goes low rez, done in Mario Odyssey)?

If not possible with URP, can a CRP allow to do that?

Resolution tricks, with proper art direction, help with managing fillrates and performance when done cleverly. I think the official name is Extended Low Resolution Rendering.

Thanks again.

EDIT: what about anamorphic pixel rendering?

2 Likes

Also will be amazing to have boolean operation on culling results. Like compute cull results ‘A’ from wide camera, then compute subset ‘B’ from ‘A’ using middle wide camera (may be with additional mask), from subset ‘B’ compute cull results ‘C’ for narrow(scope) camera.

Then compute cull results for background rendering as ‘A’ - ‘B’ draw background on low res and then on top render ‘C’ in high res. This is rendering stack for frame of Scope Aimed game.

It will be great to have example setup like this in Universal Rendering Examples

Additionally suggest to remove default render pass from top and make it part of list. Just make it unremovable and may be Slightly different view but in place of actual rendering:
5483289--561555--upload_2020-2-15_15-32-9.png

1 Like

That awkward moment it’s still importing even after letting Unity do its thing for a full weekend…

I can’t update to 7.2.0, I can only see 7.1.8 in the package manager. When changing the manifest.json version to 7.2.0 I get a not found error…

The strange thing is I can get 7.2.0 in a new project.

Please advise.

Update to Unity 2019.3.0f6 and restart Unity.

I’m already using 2019.3.0f6. Unity has been restarted many times.

Just to chime in on the FBX import issue, I tried upgrading our project to 7.2.0 last week (along with a full 2019.3 update) and we got the same FBX issue. Deleting the Library folder causes a rebuild of a few hours instead of minutes even when everything has already been cached on the Accelerator.

I initially tough that it was related to the Accelerator ( even posted here https://discussions.unity.com/t/776539 ) but I confirmed with a test project that URP 7.2.0 (and 7.2.1) causes the issue. With 7.1.8 everything is fine, so we went back to that for the moment.

To repro I just created a new URP project, upgraded it to 7.2.1 and .connected it to an Accelerator. If I delete the Library folder. All FBX are imported and added the the cache server every time.

Start importing Assets/ExampleAssets/Models/safetygoggles_low.fbx using Guid(6296e48663fd7ad46b1a2af507f871cf) Importer(-1,00000000000000000000000000000000)
Done importing asset: ‘Assets/ExampleAssets/Models/safetygoggles_low.fbx’ (target hash: ‘239b35153d1c3d3c804a4ff4d78f79a6’) in 0.137548 seconds
RemoteAssetCache::AddArtifactToCacheServer - artifactKey=‘Guid(6296e48663fd7ad46b1a2af507f871cf) Importer(-1,00000000000000000000000000000000)’ Target hash=‘239b35153d1c3d3c804a4ff4d78f79a6’

It does’t take a long time with that small project, but if you compare the log with the same project but with 7.1.8, that one does not do the importing and AddArtifactToCacheServer every time, it actually downloads the artifacts.

Looking forward to be able to use 7.2.x the new features look nice! :slight_smile:

2 Likes

Glad to see I’m not the only one with this issue. We’ve disabled the AssetPostprocessors for now. This seems to prevent the massive reimport times. Luckily we weren’t planning on using these features anyways. So it’s no gamebreaker for us.

1 Like

About the URP clashing with the new input system package.

It still happen on 7.2.1.

I see that the incriminated code is inside a #if ENABLE_LEGACY_INPUT_MANAGER region, but it still crashes. The code in the region seems to be executed even when the active Input Handling is set to the new Input System Package.

Known problem? Am I missing something?

If I understand this correctly (am I?) this allows for 2D games using a perspective camera to set this to orthographic and have the transparency sorting based not on the distance to the camera position, but on the position on the axis the camera is “watching” (usually Z-axis).

Assuming I’m correct about this, is there a way to have this also for sprite rendering order, regardless of transparency? It seems the default behavior is to render them according to their positions to the camera position, so in the case of a 2D game with perspective camera, the sprite rendering order is not based on their position on the Z-axis but the distance to the camera (and the only fix I found is to automatically set the order in layer to something proportional to the Z position of the game object).

Can’t upgrade URP to 7.2 in Unity 2020.1.0 and 2019.3.0f6 via Package Manager. Am I missing something?

1 Like