Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by Infiniteno · May 10, 2014 at 11:10 PM · colliderterraintrigger

How Can I Load Massive Terrains In Sections?

I have a fps style scene in which I have made about 20 relatively small terrains and want to load them only once my player gets close to them and then become hidden when he has left the area. The terrains are being used with normal mapped textures and details (normal mapped grasses) and are stitched together using Stitchscape. I am also using Prefab'd trees with capsule colliders on top of but separate from the Terrain which I hope umbra Occlusion Culling will be able to handle since I'm making them static?

I am guessing I could use a collider placed far in the front and rear of my Player which will trigger something like render.enable = true;(or false) when it touches another Box Collider which I will place over each terrain tile?

I am obviously very new to C# and JS but I do know Python so some examples of solutions would be awesome!

Comment
Add comment · Show 7
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 getyour411 · May 10, 2014 at 11:11 PM 0
Share

You can look at SetNeighbors for some LOD info on Terrains; do you need anything special here, or can you just let your Camera Far clipping plane do this for you automatically?

avatar image Infiniteno · May 10, 2014 at 11:28 PM 0
Share

I need the terrains to become completely invisible as if they were removed from the game. SetNeighbors cannot do this correct? $$anonymous$$y reasoning for needing this is I ultimately want to expand the map to something like 30 sq km and loading the whole map terrain at start is to costly. If I am wrong about this please someone tell me how, as I have only experimented with unity terrains for about a week now.

avatar image xortrox · May 10, 2014 at 11:28 PM 0
Share

You would need some sort of system to deter$$anonymous$$e which tile/nearby tiles to load based on players position one way to do this is to use modulo

TileIndexX = (transform.position.x - (transform.position.x % TileWidth)) / TileWidth;

Then do the same for Z Then you would have a system for loading tiles based on their index, I can't help you much further without more information about your game. However, it all depends on if you want procedural generation, if you want to expand the system in the future and so forth, based on these things I would know if it's possible to make the system easy to use and not a hassle when adding new terrains.

avatar image Infiniteno · May 10, 2014 at 11:44 PM 0
Share

No real plan to use any procedural generation in the future, particularly for the terrain.

avatar image xortrox · May 10, 2014 at 11:48 PM 0
Share

I guess I could give you something I wrote down quick some time ago, it bases on the same concept, using Coroutines and Resources.Load would allow you to perform the tile loading in the background, the idea here is to load tiles that aren't really visible to the player before they become visible and also keeping them loaded until the player is way out of range, I haven't put it much to test yet myself anyway. (keep in $$anonymous$$d this is just some quickly scribbled notes and not based on a lot of facts)

alt text

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

22 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

Related Questions

Colliding with Terrain and Destroying it 1 Answer

GameObject going into terrain. 0 Answers

Late Rocket Explosion 1 Answer

Can't click gameobject when over another trigger? 1 Answer

Player sometimes, only occasionally falls through terrain 2 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