Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Best way to switch two PostProcessing profiles on a CinemachineFreeLook camera?

Discussion in 'Cinemachine' started by MSachs, Jan 31, 2019.

  1. MSachs

    MSachs

    Joined:
    Nov 22, 2017
    Posts:
    108
    Hi,

    I have a a CinemachineFreeLook camera and would like to have different PostProcessing effects in certain situations. So far I tried deactivating the specific effect on the profile and switching out the profile which is attached to the Cinemachine PostProcessing volume with another one. Both of those methods seem to work but only actually update the Post Processing if the FreeLook is activated in the inspector at runtime. In a build as well as in "Maximize On Play" mode there is no effect whatsoever...

    Is there even a way to switch two profiles, so it updates without having to manually activate it by clicking it in the inspector?

    Thanks in advance.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,011
    Maybe a better way would be to have a separate FreeLook for each PP profile, and activate deactivate them, letting CM do the blend
     
  3. Bubsavvy

    Bubsavvy

    Joined:
    Sep 18, 2017
    Posts:
    45
    @Gregoryl

    Hey,

    I am trying to come up with an effective way to programmatically blend overtime between 2 different post processing profiles. Is there any way to effectively do this with the new post processing stack? Something like the following.

    vCam.profile.BlendTo(newProfile, transitionDuration);

    The reason we need this is because we are trying to smoothly blend our day/night cycle post processing profiles. For example : Morning Profile -> Day Profile -> Night Profile.

    We are trying to do this all using the same virtual camera. Also is it possible to use more than one post processing profile for a single virtual camera?

    Thanks,
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,011
    If you only have one vcam, then it makes little sense to attach your PostProcessing profiles to it. Instead, just make global PostProcessing profiles and blend them in and out. You can have as many as you like, and blend them (using the profile's Weight property). You need not involve Cinemachine in this, and the vcam need not have its own settings (other than DoF perhaps).
     
    Bubsavvy likes this.
  5. Bubsavvy

    Bubsavvy

    Joined:
    Sep 18, 2017
    Posts:
    45
    @Gregoryl cool thanks dude. Also one thing we noticed is that the new PostProcessProfile does not have a fog or anti-aliasing effects section. Will these two effects be added in the future?

    Thanks,
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    5,011
    I believe these things are on the PostProcessing Layer on the main camera
     
unityunity