• 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 /
avatar image
1
Question by David-Lindsay · Oct 15, 2013 at 03:56 AM · textureterrainresolutiondistanceblurry

Terrain: Increase base map distance over 2000?

I have a very low-res terrain that is very large (4 kilometers per side). It doesn't need higher resolution heightmap because it is low rolling hills. So I want the performance boost of having a low resolution terrain, but with high res textures.

Unfortunately, the base map distance seems hard-capped at 2000, which means everything in the distance looks awful. I want to increase the terrain base map distance to ~5000.

NOTE: Terrain.activeTerrain.basemapDistance = 5000; Does NOT work cause unity auto-resets your changes (same with unity grass maxed at 250 meters).

See this: http://answers.unity3d.com/answers/556006/view.html doesn't work anymore

Can anyone help solve this issue?

Comment
Add comment · Show 1
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 RobAnthem · May 11, 2017 at 04:29 AM 0
Share

Alternatively if you reduced the size of everything to 1/10th, the 2000 size would seem like 20,000 :P

1 Reply

· Add your reply
  • Sort: 
avatar image
4

Answer by wartimespark · Dec 01, 2014 at 04:20 AM

 if (Terrain.activeTerrain.basemapDistance != 20000)
 {
     Terrain.activeTerrain.basemapDistance = 20000;
 }

Placed in the update works. Kinda sad.

Comment
Add comment · Show 3 · 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 Seneral · Oct 05, 2015 at 02:36 PM 1
Share
 using UnityEngine;
 
 [ExecuteInEdit$$anonymous$$ode]
 public class BasemapDistanceSet : $$anonymous$$onoBehaviour 
 {
     public float BasemapDistance = 2000;
     private Terrain terrain;
 
     void OnEnable () 
     {
         terrain = GetComponent<Terrain> ();
 #if UNITY_EDITOR
         UnityEditor.EditorApplication.update += Set;
 #endif
     }
 
 #if !UNITY_EDITOR
     void Update () 
     {
         Set
     }
 #endif
 
     void Set () 
     {
         if (terrain == null)
             terrain = GetComponent<Terrain> ();
         else if (terrain.basemapDistance != BasemapDistance)
             terrain.basemapDistance = BasemapDistance;
     }
 }


Just want to add, that fixes the flickering in the Editor when the Terrain component writes the value, too. Using EditorApplication.update ins$$anonymous$$d of Component update ensures it's called after the InspectorGUI of the Terrain Component.

avatar image jwvanderbeck Seneral · May 11, 2017 at 03:48 AM 1
Share

This is great but seems to have a very nasty side effect in that if you delete the GO that had this script on it, it continues to try and run causing increasing and infinite NREs in the editor.

Adding a function to remove the update on disable seems to fix it:

     void OnDisable()
     {
         UnityEditor.EditorApplication.update -= Set;
     }
 
avatar image dunedinginga Seneral · May 16, 2017 at 11:02 PM 0
Share

This solution worked for me, with jwvanderbeck's modification below. Thanks guys!

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 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

Related Questions

Base map distance performance 0 Answers

Why are my terrain textures blurry? 0 Answers

Why has my terrain suddenly gone blurry? 2 Answers

Base Texture Resolution 1 Answer

Blurred terrain textures after UniStorm import 1 Answer


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