Search Unity

Orthographic Camera with zero near clipping plane

Discussion in 'Cinemachine' started by loonyware, Jan 8, 2019.

  1. loonyware

    loonyware

    Joined:
    Jan 8, 2019
    Posts:
    2
    Hi,

    Unity allows for orthographic camera to have zero (0.0) near clipping plane. For perspective camera the minimum is 0.01. Cinemachine is a little stricter and enforces 0.01 near clipping plane for both projections.

    Could this be changed?

    Thanks
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    Indeed it can. We'll change it for the next release.
     
    DexDrakon likes this.
  3. loonyware

    loonyware

    Joined:
    Jan 8, 2019
    Posts:
    2
    Great, thanks a lot
     
  4. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Interesting, for some reason some objects are hidden in game view when the near clip plane is 0.01. I can set it to 0 and play, and they're visible again, but when I stop the game, it resets to 0.01.

    I'm trying to understand why it's happening though. I'm using Spine and renderering a 2D object. The Z position of the VMCAM is -1.84, and I can't change it. I'm pretty new to cinemachine, so there's probably some setting I don't understand.. :)

    @Gregoryl which is the next release? 2019.3? Thanks! :)

    EDIT: Never mind, it was the Z position of the object that was incorrect, in combination with the cinemachine follow function..
     
    Last edited: Aug 15, 2019
  5. DexDrakon

    DexDrakon

    Joined:
    May 20, 2019
    Posts:
    2
    Still don't changing to 0 in Unity 2019.3.0a2... =(
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    You need CM 2.3.5
     
  7. Eulenmensch

    Eulenmensch

    Joined:
    Mar 10, 2018
    Posts:
    19
    It still resets it to 0.01 in CM 2.4 is that an error on my side?
     
    DiscoFever likes this.
  8. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    @Gregoryl same here 2.4.0 preview 9 ....
     
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    I'm not getting that problem. Can you post repro steps, or a sample project that shows the problem?
     
  10. Titan8190

    Titan8190

    Joined:
    Feb 16, 2013
    Posts:
    29
    This issue seems old but I ended up here looking for it, and I still have an issue with it in 2.7.4
    setting zero or negative near clips works both in edit mode and play mode, but it always revert to 0.001 as soon as I press play.

    edit: it only happens if "mode override" is set to none (with an already orthographic camera), it works perfectly if "mode override" is set to Orthographic.
     
    EmeraldSkelly likes this.
  11. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    This is a known issue that is fixed in more recent versions of CM.
     
    MUGIK likes this.