Cinemachine fighting with Pixel Perfect Camera

With pixel perfect and cinemachine both installed in my project, it seems to work ok when I press Run In Edit Mode but the zoom level of my cinemachine virtual cameras are overrided by pixel perfect when pressing the Run button. I added the Cinemachine Pixel Perfect extension to the cameras and it didn’t seem to fix anything.

Is it possible to make cinemachine control camera zoom while still using pixel perfect?

Versions: Unity 2019.3.0b10, Cinemachine 2.3.4, 2D Pixel Perfect 2.0.2

The Cinemachine Pixel Perfect extension will try to correct the ortho size from the active vcam so that you can still get a pixel perfect image, the corrected size is close to the original but it’s not the exact ortho size you type into the inspector of the vcams.

Ok, so is there a way to properly transition between two camera zooms when using pixel perfect through cinemachine or is the only way to adjust the Pixels per unit on the Pixel Perfect Camera? I’m using two cameras of pretty different size but it never seems to update. For reference: I want to smoothly transition between this zoom:


And this one:

It would be ok if it’s not pixel perfect in the middle, as long as the start and end are pixel perfect.

This is not recommended because you’ll have to carefully manage the PPU value (keep it a multiple of the asset PPU).

This is exactly how the Cinemachine Pixel Perfect Extension works. Each vcam will have its own pixel perfect ortho size, but when in transition between two vcams, you temporarily the pixel perfectness.

You can send me a repro project if you wish. That way we can help you identify what’s going on.

Sorry for the late reply, yeah I can send a sample project that has the problem I was talking about! I have a gameobject called Cams that has the main camera with the pixel perfect attached to it, along with the cinemachine brain and two extra cinemachine vcams. When the pixel perfect is on and I change the priority of the two vcams (zoomed in and out) nothing seems to change, so maybe you’d be able to help figure out what’s going on?

Thank you, I appreciate it! I just uploaded the project as a zip to google drive.

Hi! Thanks for sharing your project! There are a few issues here.

  1. We recently moved the CM Pixel Perfect extension to the Cinemachine package itself. This requires you to replace the extension in your project with the one in the latest CM v2.4.0 preview.

  2. You have Universal RP installed and yet you’re not actually using it. This confuses the extension about which version of the Pixel Perfect Camera to support (the standalone package version or the URP version).

  3. This test project actually helped me uncover a bug with the Pixel Perfect Camera. The problem is the CM extension only works when the Update Method of your CinemachineBrain is Late Update (you’re using Smart Update). I’ll get this fixed in the next version of the Pixel Perfect Camera.

Ok thanks for checking on that! How do you think I should proceed then, Should I remove URP from the project and change it to use Late Update?

Yes, remove URP if you’re not using it.
Changing to LateUpdate should correct your issue.

Hi,

Hi, what if I want to use the new light 2D system (i.e. URP) and I also want to use: Cinemachi and pixel perfect camera, when I build de game, I have jittering problems when I move, over and over again, doesn’t matter if I put LateUpdate. Any solutions, please?

@luiks You can use URP, which has PixelPerfect support built-in. In that case, remove the unnecessary PixelPerfet package, and you should be ok.

@Gregoryl Thanks for the reply! Maybe you can have a look at the other forums discussion (just for no repetition).
https://forum.unity.com/threads/2d-pixel-perfect-is-out-of-preview-for-2019-3.818742/#post-6107226
However, having in mind what you say it is clear that maybe my problem is not with pixel-perfect then, is something else. Here a video of my main problem (is like a horizontal pixel “wave” that comes from bottom to top)

https://www.youtube.com/watch?v=zJnRDIGzxWM

I still have this issue, I’ve spent a few hours trying different methods and none are working for me. I am using URP cinemachine and the URP pixel perfect.

Maybe you can start a new thread with a complete description of your setup and the exact issue you are having.