Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by GameMaker102 · Feb 17, 2017 at 05:14 PM · renderingdistancedetail

Long Distance Rendering

I wan't to be able to see objects from VERY far away, but it takes up too much CPU when I have lots of detailed objects. Sometimes I can't even see the object from too far, even though the distance on the camera is to the max. I am trying to make the solar system, with somewhat realistic distances and still lots of detail to the planets, and still being able to see the tiny dot (as a planet) in the distance. Does anyone know how I can do this?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by lodendsg · Jul 16, 2017 at 11:54 AM

KaletheQuick's reply is a solid answer if your game has a single scale e.g. if you only ever play from a very far distance camera view.

We are also working on a space game and have need of very long distance views but we also needed a rather close nearly 'human perspective' view as KaletheQuick called it.

To achieve this we use layered cameras, note that in Unity you can discribe the order in whcih your cameras will render and what objects (layers) it will render. In our case for example we have UI, Near, Far and Back we also have 4 cameras that coraspond to thouse each camera renders only the objects on its respective layer and has a resonable clip distance with a total range less than 1000 units anything more than this and you will see shadow flicker.

Next we have our scene split up such that objects on the 'Back' are scaled similar to the 1 unit = 1 AU range Near uses 1 = 10m and Far uses a 1 = 100000m. Far camera moves at a rate scaled to Far camera e.g. when Near moves 1unit Far moves 1/10000 units ... in our case Back camera is fixed e.g. it never moves only maps rotation like a skybox camera would.

The ranges you use will depend on your game ... in our case we know no object will transition from Near to Far or Far to Near without the player 'warping' which means we can use the warp effect to hide the transition.

Few notes about this method ... shadows cannot cross cameras e.g. an object rendering on Far will not cast shadow on an object in the Near ... there are a few situations where you might need an object to do this and you can use the Shadow Only option of Mesh Renderer to suit these situations in most cases.

As I recall Kerbal Space accadamy used a similar method and had a talk on it at a GDC or a Unite session though I cant recall which nor can I find it on YouTube at the moment.

The point being to use a variable scale and multiple cameras to achieve both a high detailed near by view and a long distnace view with the draw back that objects cannot enteract between the near and far views without some special trickery depndent on your game.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by KaletheQuick · Jun 12, 2017 at 05:17 PM

@GameMaker102 Unity has a built in level of detail system that can automatically swap one mesh with another at distance.
https://docs.unity3d.com/Manual/LevelOfDetail.html

You can use this system with meshes of lower and lower detail. I believe the trees in the "standard assets" are set up with this. And the terrain system has another trick that might help you out. The last and farthest level of detail are taken down to a single quad, that's just a flat square mesh, two triangles!! The quad is pointed at the camera all the time, so it is called a billboard. For the trees it just has a picture of the tree. For your planets, an appropriately colored dot would work. Beyond that you would get into some complicated stuff involving "apparent magnitude" and other stuff astronomers talk about.


I would also like to tell you about scale for a solar system... system. Normally for games and stuff we use 1 unity unity to mean one meter. But that's just a human perception. You could easily just say that 1 unity unit is a thousand, or a million meters! I would recommend that you use 1 unit to be 1astronomical unit. That way you can fit everything out to Pluto in a 80 unit circle, so you would avoid any floating point errors.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GameMaker102 · Sep 06, 2017 at 08:30 PM 0
Share

@$$anonymous$$aletheQuick @lodendsg Thanks for answers guys, though I've given up on it ever since I discovered $$anonymous$$erbal Space Program. It was almost exactly what I wanted to make (but with kerbals ins$$anonymous$$d of people). Still, thanks for the replies.

avatar image
0

Answer by jnbbender · Nov 27, 2017 at 01:25 PM

@GameMaker102 - Just in case someone else comes across this question, I use an asset for this (https://assetstore.unity.com/packages/tools/camera/per-layer-camera-culling-35100). Not too sure if this applies to your problem but you can at least isolate your objects to a specific layer.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

98 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Terrain detail rendering squares 0 Answers

Android Render Issue 0 Answers

Aura Rendering 1 Answer

Render All Squares in a Grid 0 Answers

My detail meshes turns black when they don't have a geometry behind (Oculus VR) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges