When camera stacking for HDRP?

I am confused with this blog-post, regarding camera stacking:

https://blogs.unity3d.com/2020/03/17/unity-2020-1-beta-is-now-available-for-feedback/

it says URP already has camera stacking - great, really happy, but what about HDRP? When it's planned to be released?

Thanks,
S.

Yes its planned. They are making new compositor tool for this

1 Like

It's planned for 2020.1 or later? As always, I understand that it's done when it's done, but anyway - which teach stream they're planning it for?

I don't know when its will hit release. I suppose 2020.1 if everything will be ok. In the meanwhile you can test compositor branch from github https://github.com/Unity-Technologies/ScriptableRenderPipeline/tree/HDRP/compositor Last time i checked it was working and i successfully made object rendered always on top of a scene. I can even made different AA and postprocessing for different layers so this is even better than stacking from built-in renderer and urp.

2 Likes

Hi everyone!!!
Excuse my ignorance @Onigiri , but although I have read the description on github, it is not very clear to me what improvements this tool can bring to HDRP ...
Performance improvements? for example when having two cameras at the same time in the scene? now it's impossible to have them without totally killing performance ...

I don't know ... what improvements does this tool provide?

Cheers

Hey, Thanks for the link - it looks like it has been either removed or moved? The link is 404.

I wanted to give it a test ride. Guess the wait is on.

HDRP 9.0 (preview.33) changelog contains the following note:

  • Added the HDRP Compositor Tool (in Preview).

And is documented here:

https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@9.0/manual/Compositor-Main.html

Plus, the first thing it says is it allows Camera Stacking.

So BOOYA! Maybe we're back in business!

2 Likes

This is great, I think this is exactly what I needed too. Trying to make a minimap for one of my games render over the post-processing with two cameras in HDRP was not happening.

I played around with it today and found that it does work, though it is tricky. Here is a hint:

The compositor is like a camera and it has to be set to a specific display number (use 1).

And now your main camera, and in fact all cameras, have to be set to unique display numbers that are not 1.

So every camera is pointing to a different display number, say 2 and 3 and 4 depending on how many cameras you want to stack. Use 1, for example, to be the "display" for the compositor to output too.

Having said that, I have been unable to get this stacking to work correctly with the built in UI system (UGUI). You can get UI to render, but that's just by directing it to the same output display. If you want something to render in front of UI (like say a 3D object "in" your UI) then things seem to fall apart and I can find no way to arrange all the pieces so that it works. I'm making a standalone test project to play with this more and see if it is a bug or not.

1 Like

Very interesting, thanks for sharing that. For my use-case all I need is for one camera that is rendering the post-processing effects to be displayed under another camera that is set to render the layer of a scene object (in the actual scene) above the post-processing camera, not on the GUI -- fortunately.

So I think, from what you're saying, it sounds like it might still work for me. I don't need to render anything in front of the UI (yet). Again, thankfully. As I have not tested anything yet, this is all speculation lol.

I hope at some point HDRP catches up with the URP/Built-in pipelines in terms of features.

Great info, thank you :)

You said you have one camera rendering post-processing effects.... I assume you have something in the scene that this camera renders right?

@nsxdavid Link to the docs seems to be broken?

6112739--665579--upload_2020-7-21_13-3-6.png

Try: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@9.0/manual/Getting-started-with-HDRP.html

Then find the compositor from there.

1 Like


I did not find it in documentation by this link but here is the link from github: https://github.com/Unity-Technologies/Graphics/blob/f27cb5aeee8c080a2089e076b85749e8f6fd59a4/com.unity.render-pipelines.high-definition/Documentation~/Compositor-Main.md

1 Like

Yeah there is something strange going on with the docs. Even from that page, clicking User Guide is a bad link.

Should compositor be used for UI if renders text on top of the screen?

Hi, the main solution we recommend for UI is to use the after Postprocess Rendering pass on Material.
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@9.0/manual/Surface-Type.html
And if you need some blur you can use custom pass after postprocess

Compositor is a super set of Camera stacking see https://github.com/Unity-Technologies/Graphics/blob/f27cb5aeee8c080a2089e076b85749e8f6fd59a4/com.unity.render-pipelines.high-definition/Documentation~/Compositor-Main.md

It should bring some performance compare to using 2 camera, however, the compositor tool primary target isn't to do UI in game but to do compositing for non game application. Still if it fit into your frame budget you can use it.

Doc isn't puslish yet but as pointed by others there is this:

https://github.com/Unity-Technologies/Graphics/blob/f27cb5aeee8c080a2089e076b85749e8f6fd59a4/com.unity.render-pipelines.high-definition/Documentation~/Compositor-User-Guide.md

https://github.com/Unity-Technologies/Graphics/blob/f27cb5aeee8c080a2089e076b85749e8f6fd59a4/com.unity.render-pipelines.high-definition/Documentation~/Compositor-User-Options.md

2 Likes

quote=", post:17, topic:781288" however, the compositor tool primary target isn't to do UI in game but to do compositing for non game application. Still if it fit into your frame budget you can use it.

(...)
[/quote]

Thanks for the update and summing it all up.

I don't understand though this quote - what do you mean it's not for game application? So, considering HDRP and XXI century we are all in right now (technology-wise), how I am supposed to achieve such a trivial and basic thing like first person view models rendering in Unity? As you know it has it's own nuances, like need for a different fov, shadows resolution, etc. - is the only option is to write own post-processing / custom passes for this?

Even in HDRP you can render first person objects with second camera and render texture but it's more performant to use ready custom pass https://github.com/alelievr/HDRP-Custom-Passes

Hi, you can check how FPS game is handled in this sample game: https://github.com/Unity-Technologies/FPSSample (Was handled with Shader graph). Sadly the project is an on old revision of Unity and don't convert to recent version.