Hello,
I am attempting to isolate post processing effects to specific objects. I'm dealing with bloom specifically. Threshold is not ideal to control it because I have white objects in the scene that are caught at the low thresholds that should not have the effect.
I tried to create a secondary camera to only render the objects that should have the effect using volume mask and culling mask and then overlay it onto the navcam but it seems since the main camera does all the rendering, I get the effect on everything even with that technique.
Is this user error or am I limited because of the way only the main camera does rendering?
Unity 2020.3.16
URP 10.5.1
AC 1.74.0
Thank you
Collin
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The MainCamera is performing rendering duties over e.g. GameCameras, but it should still be possible to layer it with custom cameras. Just be sure to not have any AC camera components on the secondary camera, as they disable the Unity Camera component on startup.
It sounds like it should just be a case of setting the MainCamera's "Culling Mask" field to exclude the layer that the other camera is rendering.
When it comes to URP, though, it might be that using a Render Feature is worth looking into. IIRC that allows you to apply different shader effects to different objects/layers with a single camera - though AC wouldn't be involved here.
I've made sure the camera with bloom is only rendering the objects I want bloomed, and the main camera is not rendering those objects. The main camera does not have post processing, and the bloom cam does. I overlay the bloom cam onto main camera and get bloom everywhere. It seems like the post processing happens after the overlay on the entire image, and not individually for each camera. I am overlaying the bloom cam onto the main camera and not the navcam currently but I believe the issue remains if I try this technique on the nav cam also.
Don't worry about the NavCam - it'll be disabled at runtime, unless you enable it again via an OnStart function in a custom script.
Check that the MainCamera's "Culling Mask" is correct at runtime, but otherwise I'm not sure if AC is factoring into things. I'd suggest the effect in a non-AC scene with a similar setup, i.e. a "MainCamera" to render most things, with a separate BloomCam to handle the bloom objects. Layer them up together so that things look correct, and we can then see about applying the same effect in your AC scene.
Ok, thanks. After a ton of experimentation in an AC environment and regular Unity 2d project, it really doesn't seem like this is possible. I kept trying because a fair amount of people online say it's possible in Unity and even post video instructions but it's definitely not working, even with individual cameras only rendering certain objects and overlaying. The "post" of the post-processing I guess does it after the overlay. I don't think the limitation is related to AC.
https://answers.unity.com/questions/1714118/how-to-use-the-new-post-processing-to-make-a-speci.html