Terrain Questions

Dear Forum,

I m studiyng all the features of terrain system and I have a lot of doubt about it.

  1. What is “Detail Resolution Per Patch” setting? I don’t find any info about Terrain Patch. I need to change it linked to Detail Resolution setting?
  2. I have a little doubt about detail resolution map. I understand this map is used to paint detail objects such as rocks and plants. If this is as a splat image. So it support RGBA (4 channel). In this case is better paint 4 object and not 5 or 6six. But this image is used also to paint tree? Tree are painted with this Detail Map or they are placed with other information?
  3. What kind of advantage have tree and foliage system on terrain? Just batching?

Thanks

  1. The detail system are for rendering grass, flowers and other small foliage near the camera… these items will not be shown in the distance. I do not know the inner workings of how its patching.

  2. It is not a splat image, adding a fifth detail will have the same cost as adding the fourth. Only the actual terrain surface uses a splat image.
    Trees on terrains are using their own system, unlike details trees does not disappear beyond a certain distance instead they’re billboarded into sprites.

3.1) Details allows you to display a high number of grasses because they’re only rendered right next to the camera.
3.2) Trees allows you to display a high number because only the nearest trees are rendered in 3D, the remaining ones are bill boarded (2D sprites).
3.3) I know trees are sorted by a bsp tree to allow fast detection of which trees are visible and nearest.

I hope this answers some of your questions.

Cheers,
UnLogick

  1. Terrain patches are, to my knowledge at least, those terrain chunks you see when going further away with the editor camera where you at times even can identify ‘seams’ due to the descrete detail level change between the terrain blocks

Thanks dreamore

Then I have others questions:

  1. To replace the Terrain shader, I need necessarily to create a custom shader and rename: “Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass” to override the default shader right?
  2. I don’t understand firstPass and addPass. I’m reading shaders and I see that addPass is a decal on firstPass. But it is active when I used more then 4x splat image? And there is a distance value to setup? I found a BaseMap value but it is another map for old hardware right?
  3. How can I culling my terrain? I read on forum that Umbra not “cut” terrain so Umbra is is fake for terrain. How can I fix it? I need to preCut my terrain in more than 1 peace and then setup everything byhand with camera distance?
    I have found this P|Terrain but I don’t understand what it does http://forum.unity3d.com/threads/96753-P-Terrain-1.0-Paged-Terrain-Extension-for-Unity-3.x
    Somebody can help me?

Thank you

  1. You will likely want to replace the whole set of shaders. Look for the unity showcase thread on the enhanced terrain shaders where they added normalmapping and a few other things

  2. first pass is the first splat map. Add pass is for all further splat maps.
    The Basemap is whats used ‘in the distance’, you can’t run the shader everywhere that would be too costly and useless anyway.

  3. It takes place on its own with the unity terrain, on a chunk / patch to chunk base. Thats the meshes from which it is build and unity occlusion (umbra as frustum culling) is only mesh based, not triangle based.
    P|Terrain solves the problem you will get with larger terrains when you want to use multiple ones etc so you can lower the RAM requirements (unity terrains are rather heavy on RAM)
    It does not change the unity terrain limitation

There is a terrain limitation?

Can you explain better about larger terrain problem? I need to create a large terrain for a racing game.
I understand at this point that terrain was precached in RAM. So when you use more than one terrain, P/Terrain helps with this problem and help the RAM loading? So It destroy and reload terrain when required?

Then, are there other terrain limitation?

OK I found all the information on these thread:
http://forum.unity3d.com/threads/117352-An-article-on-terrains
http://forum.unity3d.com/threads/139987-Unity-uses-too-much-memory

adn about PTerrain is explained everthing on official thread: http://forum.unity3d.com/threads/96753-P-Terrain-1.0-Paged-Terrain-Extension-for-Unity-3.x

however until Unity doesn’t developer a better terrain engine, I prefer to use mesh Terrain (maybe with t4m).

Thanks