So, I have a Cinemachine camera using a group composer rendering this image (the image is an example):
But I want to render only a part of it, let’s say, like this:
Where the black part is just not rendered, meaning you can see whatever other camera is rendering below it.
Now:
- Changing the Camera viewport Rect is of course not possible, as it’s taken in consideration by the Group Composer to decide how to frame the subject, and I want it to be framed as the camera was fullscreen.
- The problem is… changing the camera projectionMatrix also has the same effect as above, and I’m not really sure why.
- The camera is using PostProcessing, so I can’t do tricks with masked RenderTextures, because afaik they don’t really work nicely with PP.
- Also, as far as I can uunderstand, that’s also not something achievable with the physical camera options (and I already tried to do it).
Ideas on how to achieve that?
Please don’t ask me why I need to do that, I just need to ^^"
<3
Yes, the viewport rect controls where the entire output of the camera goes, it’s not a way to mask a portion of the image.
Masked render textures seems to be the way to go. Why do you say they don’t play nice with PP? If you put PP on the elements individually instead of on the whole masked result, then it should work fine.
1 Like
Because this happens, regardless of setting the Canvas in which the RawImage (on the right) is rendering the RT to overlay or to a third camera rendering only the UI with clear depth:

This might be related to the fact that you can’t have postprocessing on two different cameras, as removing pp on the two cameras rendering the orange and purple capsule, and adding it only on the 3rd camera rendering the RT does the trick…
The problem then is, if i can’t have PP on two cameras, how can I have splitscreen with depth of field on both cameras (that afaik, is needed on the cinemachine brain in order to have dynamic refocusing)?
PS: please add the option to allow the upload of videos, or at least gifs larger than 5mb ^^"
Actually this isn’t really a Cinemachine question, it’s more of a post-processing question. How can you get split-screen with different PP profiles on the different parts? You might want to ask that on the post-processing forum.
It started as a Cinemachine question as I didn’t know where the problem was (the viewport/camera matrix thing), and it is partially a Cinemachine question now,regarding the handling of different depth of field profiles on different camera brains… is it enough when there’s two separate profiles?
For the splitscreen pp, zyou’re right, gonna cross post now. Thanks!
If you’re driving each side of the splitscreen with CM, then you’ll need 2 Cameras, each with a CM Brain, and each filtering the vcams using the culling mask (only those vcams which pass the culling will be considered by the brain). Then it’s just a question of attaching PostProcessing extensions to the vcams, with the appropriate PP profiles. Each vcam can have its own PP profile, and the profiles will blend in and out along with the vcams.