Search Unity

Is there a way of overriding Editor zoom limits?

Discussion in 'Editor & General Support' started by Ron-Monsen, May 17, 2019.

  1. Ron-Monsen

    Ron-Monsen

    Joined:
    Nov 7, 2014
    Posts:
    9
    I am wondering if it is possible to zoom out farther than the standard Unity limits.

    I do realize the limits where set because it is generally insane to think that giant objects outside floating point accuracy should be easily visible.

    I am scaling objects right now but would love to have the ability to zoom out farther.

    Regards,

    Ron M.
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    If you mean that the objects that you are trying to view are getting cut of then you can select them and press "F" that will reset the far and near plane to the selected object.
     
  3. Ron-Monsen

    Ron-Monsen

    Joined:
    Nov 7, 2014
    Posts:
    9
    No. I have HUGE objects and I cannot zoom back far enough to see them. I hit the limits of the zoom capabilities of the editor. I am wondering if there is a setting somewhere that would allow me to override whatever default is being used.
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    How big is the object?

    I tried creating a sphere, and gave it a scale of 10,000,000. Focused it, zoomed way out, seems fine:

    upload_2019-5-17_21-30-33.png

    Note that scroll wheel zooming is pretty slow, but alt-rmb + mouse movement zooms out quickly. Do you have objects bigger than 10,000,000 scale?

    Edit: I tried making the scale 1 billion on each axis, and I could easily scale out. However, it did start complaining about "Screen position out of view frustum" at that point. But a scene scale of a billion probably means you're just doing something wrong. I wouldn't expect any accuracy of positions at those scales.
     
  5. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,443
    Unity is really not well-suited for anything with coordinates in the 10-millions or 10-millionths. Single-precision floating point accuracy is horrible at that point, and z-buffer accuracy is even worse. The best accuracy is within a few orders of magnitude from 1.0f.

    It's not just Unity, either. With some very clever workarounds you can use single-precision math and hide many of the artifacts, but there is a reason why most "massive" open world games really fit all their terrain within about 4~10 kilometers diameter. If you need to have realistic distances between spaceships and planets in a scene, you should be using kilometers as the base unit, not meters. If you want a moon to be visible from the planet surface, there's no reason to make it a sphere with a realistic radius at a realistic distance; just make a circle that will fit within your sky system.

    The same goes for extremely tiny scenes. If you're in a blood-vessel submarine, consider using micrometers as the base unit.
     
  6. Ron-Monsen

    Ron-Monsen

    Joined:
    Nov 7, 2014
    Posts:
    9
    I am actually trying to do a planet. It is larger than the sphere even at that huge multiplier.

    As I said earlier, I am scaling and I do know all about floating point precision issues.

    I would however like to "see" some areas of the planet at one to one scale in the editor to match terrain that is at a smaller scale.

    I cannot zoom out far enough to do that.

    I am wondering if there is some "value" stuck in some resource that would allow me to go out farther - or is it hardwired in the Unity editor.