Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Crisp" well-defined viewing distance and background in games

Discussion in 'General Discussion' started by Velo222, Feb 25, 2017.

  1. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I've been meaning to ask this for awhile, but does anyone know how some games are able to get a nice clear and crisp background setting (or image)? What I mean is, when the player looks off into the distance towards say a mountain in the background, some games have a pretty defined/clean image.

    In Unity, I always end up with a somewhat blurry and jagged image in the background (i.e. a tree or rock in the far distance will be very pixelated or jagged). Like usual, it's probably something I'm doing wrong, so I just wanted to ask about what the "modern technique" is for getting good distance geometry or textures etc..... And also, how to do this in Unity?

    One thing I noticed was that 8x anti-aliasing does create a more defined image in the background, but it still doesn't look as clean as some AAA pc games -- maybe I'm mistaken? But also 8x anti-aliasing is usually a huge performance issue in Unity as well. So I'm just looking for ideas and information about this topic.
     
  2. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,015
    Are you talking about the skybox or simply about objects in the distance?

    If it is the skybox, there are a number of ways to get a better looking skybox.
    1) Crank up the texture size. The largest resolution skybox will be a 96MB file.
    2) Set up a workflow for creating the background using a secondary camera and bake that view into a cubemap. In this secondary camera, don't place objects very far from the camera. Once you have baked the view into a cubemap, use that for the primary camera's skybox.
    3) In some cases, you may want to take actual pictures and merge those into the skybox image. For example, if there is a cool real world landmark that needs to go in your game, and actual photo of it could be the best way to bring it into the scene. This depends on the situation, though.
     
    theANMATOR2b and Velo222 like this.
  3. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I'm not sure actually, sorry lol. I guess that's my main question. From what you posted above, it sounds like a skybox thing I guess? I never thought about baking the view into a cubemap. Can you elaborate on that a little bit? How would I go about baking the view into a cubemap?

    I've used several cameras before in the scene, one for close distances, one for medium, and even one for far distances (this eliminated "z fighting" in the background), and then the cameras transitioned well. But I've never worked with cubemaps :oops: I'm gonna do some research on that, thanks :)

    Here is one game picture that I'm thinking of. Notice the view distance and the background, they are very well defined.....maybe this picture doesn't do it justice, but you can see what I'm thinking of maybe:




    In Unity, if I made this scene with real objects (i.e. Unity terrain or mountain meshes as objects), the medium rock formations/ledges, and the far distance mountains would be very jagged and somewhat blurry. Ideally, I'd like to have smooth, clear (non-blurry) views like in this game picture.
     
    Last edited: Feb 26, 2017
  4. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,015
    At least some of the content in that image is likely be done with a skybox. It is also possible there is a second camera handling some of the distant objects. Multiple cameras can provide a lot of long distance magic in games.

    In addition to that, the game most likely has extensive level of detail work in place. Partially for performance, but also to control what objects look like in the distance.
     
    theANMATOR2b and frosted like this.
  5. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437

    Ya I'll just probably have to fiddle with settings, as well as look into the cubemap technique you mentioned. Other than that, high-quality textures and spending lots of time on terrain creation will probably have to do the trick. Thanks Shiloh.
     
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    Are those objects placed in the scene?

    The cubemap method mentioned can be good in some situations, but keep in mind that it's essentially a dynamically rendered skybox. So if that approach can fix your problems you can do the same with a normal skybox if you figure out the cause. My guess would be either too low a texture resolution, or the effects of texture compression, or both.

    If it's stuff in the rendered view, ie: objects you've placed in the scene, then my first guess would also be that you need to take more control over how things are rendered in the distance. LODs aren't just about lowering resource usage for distant objects, they're also in part about making them look right. For instance, you might want to use different materials or shaders on things up close compared to far away.

    Trees are a pretty classic example of this. Rendering leaves in larger and larger groups - until eventually the whole tree including the trunk is just one sprite - isn't just about saving rendering work, though that's also important. Rendering things to a sprite and then controlling how you draw that sprite also gives you opportunities to do things that avoid or reduce the issues you've mentioned.