- Home /
Simple mesh load on demand for terrain
I have a massive model of Seattle I'm working with.
I need to drastically increase "resolution" on the terrain chunks and because of this I need to figure out some sort of load on demand system
I've searched and all I seem to be able to come up with is more people having issues with terrain and no real answers.
I think the easiest way would be to detect the chunk the player is in and load the 8 around it (square chunks).
like:
if playor location is between x1,y1 and x2,y2, instantiate items 1-9 and so on... and set objects to switch to billboard at such and such distance... but is there maybe a way to just cause everything (including terrain chunks) to switch billboard mode off and on with any of it actually being unity terrain chunks....
anyway... hell... i'd be happy if someone can even tell me what the proper name for doing this is called so I can maybe look it up myself
http://answers.unity3d.com/questions/17225/dynamic-terrain-loading.html?page=2&pageSize=5&sort=votes
i found that... but im not sure what the hell to do with it right now... still trying to fix bugs to make it work with the demo even
yeah... got rid of all the errors and built it and it's just a black screen... no idea what it's even supposed to be doing
is there some sort of code stupid friendly scripts out there?
plug ins?
something?
Answer by $$anonymous$$ · Oct 10, 2013 at 05:01 AM
What is the format of the city model you're working with? Mesh or Unity terrain? How detailed is the model, and how fast and at what altitude are you moving through the terrain?
Built-in Unity terrain has several limitations, which may or may not apply to your specific scenario.
Basemap distance limit of 2000, which is not very useful for terrain of realistic proportions: textures are shown at the lowest quality when camera is farther than 2000m from the terrain tile.
No flexibility in choosing which shader is applied above basemap distance.
Clipping artifacts are visible when terrain of realistic proportions cuts into the built-in Unity skybox.
If you're working with built-in Unity terrain, I would suggest looking at TerrainComposer which would help you capture terrain data and create terrain detail objects (billboards, rocks, etc) shown at certain distances. Built-in Unity terrain does its own LOD which is visible if you switch to wireframe in Scene View. How large is your model? Depending on the size of your model, you may or may not need a dynamic terrain loader to limit the amount of data being thrown at the engine.
If you're working with mesh terrain, I would suggest looking at UniLOD, but it might be too manual for large data sets.
I've developed a dynamic terrain loader in the past that used meshes instead of built-in Unity terrain, which I found to be a bit limiting for large scale and infinite terrains. I also developed a semi-automated pipeline for getting terrain tiles of desired format and resolution, and created a dynamic terrain LOD and loading system since my terrains were really large. I didn't have support for terrain detail objects though, so this may not be what you're looking for.
Thank you for replying!!!
$$anonymous$$esh - $$anonymous$$aya generated converted to FBX
Highly/Very Highly Detailed - street level detail of the entire city of Seattle each terrain poly is roughly 6" relative size plus all the "stuff" each "chunk" is looking to be something like 2-3 hundred thousand poly - as it sits without any real detail it's at like 1.6million poly count and i want to AT LEAST double the resolution... it's already cut into about 40 chunks
Low Altitude - Head level i.e. walking around
Relatively Low - Walking speed, maybe driving speed
I'll take a look at UniLOD...
from a brief look... it should work beautifully!!!
do you know of any other similar tools?
I evaluated several systems at the time:
http://forum.unity3d.com/threads/96190-Terrain-$$anonymous$$anager
http://www.macroseed.com/Projects/Unity/Level_of_Detail_System
1.6$$anonymous$$ is lot of polys, so you definitely need to do additional culling of terrain data with a dynamic loader.
Since you're using mesh terrain, UniLOD may be a good fit. Terrain Composer is great for creating terrain tiles, but does not have a dynamic loader. The combination of Terrain Composer and UniLOD could work fairly well if you create an asset conversion pipeline and automate some of the manual steps you have to go through with each.
I hope this helps.
Helps immensely!!! I had seen UniLOD in my searches but the brief description was just a level of detail system... I didn't know you could set it up for distance automation and all that which I THIN$$anonymous$$ will work great.
Yes, 1.6$$anonymous$$ is a lot but that's the current count of the ENTIRE CITY so after doubling or tripling it and then dividing it into 40 chunks it should be pretty manageable.
Again thank you!
Your answer
Follow this Question
Related Questions
Real time terrain deformation after explosion 2 Answers
Deform Terrain With Mesh 0 Answers
Editing Terrain Topology at Runtime 0 Answers
How to generate a grid for procedurally generated platforms 1 Answer