Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

Discussion in 'Assets and Asset Store' started by tomaszek, Oct 22, 2013.

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    I'm big fan of you :).

    Tom
     
  2. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Thank you ! I just tested Geom Blend Two layer and it works perfectly ! Less tiling effect on the road now.
     
  3. WileE

    WileE

    Joined:
    Apr 12, 2016
    Posts:
    21
    Running Unity 5.6.0b5 on macOS 10.12.3
    Trying to import RTP 3.3e reports "Obsolete APIs. Do you want to upgrade them?"

    Upgrading does not yield functional code. Is there a patch or option for running RTP 3.3 on the 5.6 beta yet?
     
  4. derains

    derains

    Joined:
    Aug 24, 2014
    Posts:
    1
    I'm having an issue where the terrain gets flatten and elevated to the max height when selecting the RTP shader. Any ideas what would cause this ? I have tried a new scene with textures then applying RTP in Material. I have RTP Purchased and up to the latest version as well as having WC to the latest one.

    Any hints would help! Thanks
     
  5. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    All terrains look white after upgrade to Unity 5.5.1f1 with RTP V3.3

    Getting these errors when I recompile via RTP LOD Manager...

    Shader error in 'Relief Pack/ReliefTerrain-FirstPass': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(523) at /UnityDeprecated.cginc(133) (on d3d9)


    Shader error in 'Hidden/Relief Pack/ReliefTerrain-AddPass': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(523) at /UnityDeprecated.cginc(133) (on d3d9)

    Shader error in 'Hidden/Relief Pack/ReliefTerrain-AddPass': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(288) at /UnityImageBasedLighting.cginc(520) (on d3d9)

    Shader error in 'Hidden/Relief Pack/ReliefTerrain-FarOnly': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(523) at /UnityDeprecated.cginc(133) (on d3d9)

    Shader error in 'Hidden/Relief Pack/ReliefTerrain-FarOnly': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(288) at /UnityImageBasedLighting.cginc(520) (on d3d9)

    Shader error in 'Relief Pack/Terrain2Geometry': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(523) at /UnityDeprecated.cginc(133) (on d3d9)

    Have tried re-installing with same result.

    Please help.

    Thanks
    G.
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    RTP 3.3 is not U5.6 ready yet. I'll look into this at some next Unity beta iteration (keeping compatibility along every single beta release is difficult).

    Maybe you refer to tessellation feature. First you need to prepare height&normals texture to be used as global map. W/o this data terrain can be shaped well.

    Upgrade to 3.3e version dedicated for U5.5. It's different from RTp3.3e dedicated for U5.4. Remove shaders from RTP pack. and reimport RTP from assetstore under U5.5

    Tom
     
  7. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    159
    Hello. When I'm creating new terrain with RTP it always white despite of my attempts to play with all settings and use colormap etc. Long time ago seems I decided this problem, but I don't remember how)) In tutorials I don't find this issue

    also I exlude dx9 from project but still see compilers errors like:
    Shader error in 'Hidden/Relief Pack/ReliefTerrain-AddPass': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(523) at /UnityDeprecated.cginc(133) (on d3d9)
     
  8. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    159
    Works after update. I've used 3.3d version from here 3.3http://www.stobierski.pl/unity/RTP Update.php
    Is the last version supports multi terrain?
     
  9. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks for reply.

    Where do I get v3.3e for 5.5?
    Can find only one in asset store.

    Thanks again.
    Gus
     
  10. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    94
    Hello! I am using TerrainComposer 2 to create my terrains and then I convert it to a low poly style using PolyWorld. Is it possible to use RTP for this? Could I define the settings in the TerrainComposer 2 menu or would I have to configure it on the converted mesh itself? Can the terrain holes system be used before conversion? Also, is it possible to use more than 8 textures? Thank you for you time.
     
  11. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    159
    My attempts to apply tiled colormaps for multi terrain.


    Is any way to do it? Mayby some I don't know about some settings
     
    Last edited: Jan 30, 2017
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    I see you use TC. I guess Nat (eagle555) will answer you better. All terrain tiles are supposed to have their own materials and separate global colormap attached.

    When you download RTP from AssetStore from newest U5.5 it should give you right version. Sometimes AssetStore gives wrong (lower version for U5.4). You can try to remove package cache on your local HD then redownload from AssetStore again.

    RTP is meant for realistic rendering rather than low poly style. RTP can use meshes. Not sure about TC if it can deal with converted meshes. For my example scene I made terain scene frist. Then I exported terrain to obj, optimized to be <64k tris. Used this mesh on 2nd example scene where my shaders are used on such mesh. You can look around how it's configured. Currently 8 layers is the limit but still you could try to use stickged geometry blend feature to add some different texturing here and there.

    Tom
     
    Ruben_Chris likes this.
  13. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks all working again!
     
  14. SimonsCat

    SimonsCat

    Joined:
    Mar 11, 2015
    Posts:
    19
    Hi Tom,

    We have the same problem as user mk1978 mentioned a few pages back. The textures in add pass get a dark edge around them.
    The provided diff.png picture has a rendering with Unity 5.4.1.f1 - RTP v3.3c on the left and Unity 5.5.1.f1 - RTP v3.3e on the right. On the picture you can clearly see the added dark edge around the stones near the camera and also in the distance where there should be a little sand dust. We also added a few pictures of RTP settings.

    The same problem is visible on ReliefPack/ExampleScenes/ReliefTerrain/TerrainScene, the stones get a dark edge there too.

    Is it possible that you can send us the same bugfix that you sent to the mk1978 user by PM? Or is this bugfix (if this is a bug) planned in some release soon?

    diff.png

    Thank you!
    rtp_lodmanager.png settings_layer_1_and_5.png settings_main.png
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    This fix I'll post in RTP3.3f within 2 weeks. Only if your project is very time-constrained you could post me via private message to get it sooner.

    Tom
     
  16. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    Hey Tomaszek, im in unity 5.5 and when applying the script to my terrain, it turns invisible (still there but just not visible. I've used RTP before with success so this seems like it's likely a bug. Would you know how to resolve it?
     
  17. SimonsCat

    SimonsCat

    Joined:
    Mar 11, 2015
    Posts:
    19
    Roger that. It's fine for us ;)

    Thanks.
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Tessellation turned on and you don't have correct height&normals texture prepared ?

    Tom
     
  19. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    That was exactly it, although I had heightmaps plugged in, I found the tessellation option and turn it off and low and behold it works. :) Thanks!
     
  20. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Do you have any idea what could be causin the below challenge when using RTP? I have 2 scenes and I would like to have the same look for terrains in both scenes. I created the first terrain and saved the RTP settings. When creating the second scene I loaded the RTP settings from the first scene but the textures look totally different. I have cheked the setting in RTP LODManager and Terrain and the settings seems to be same. The light is a little different in the scenes, which may cause some differences but I think that it is just small part of the difference.

    Scene 1


    Scene 2
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    I see tint difference - probably global colormap. May perlin normals and if they actually work on 2nd scene is worth checking.

    Tom
     
  22. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Hi @tomaszek seems an issue with Terrain composer 2 and RTP when trying to remove splatts. TC2 says edit splatts in RTP. Unfortunately you cannot delete splatts in RTP either. I select texture and try to replace with none and it ignores request. Any idea if I am missing something or is it a bug?
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Why do you need empty splats ? They are computed anyway (4 or 8).

    Tom
     
    AndyNeoman likes this.
  24. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    I want four because I understand that is better for performance. Am I misunderstanding?
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    The number of splats terrain handles is set under terrain data object itself and is managed by TC. Recompile RTP shaders in LOD manager to use first pass _without_ "8 layers mode" enabled. TC is supposed to fill right splat textures references in terrain data (RTP grabs it from terrain then and shows in RTP's inspector).

    Tom
     
  26. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Thanks for the tips Tom. It seems that global color map and perlin normal is missing from some textures even though I am using the saved preset and exactly the same textures as in the other scene.

    RTP is fantastic tool but somehow I have been strugling to get consistent results. I would assume that this is mainly because I don't really understand even the half of the functionalities of the RTP. In addition, I would also assume that I use pretty much 10% of the all the functionalities. Are there some recommended simpliefied settings that coud be used in order to avoid probelms. I would call this "beginner mode". I know this might be a stupid question!

    I would need to be able to use exactly the same setting in projects/scenes and now it has been difficult. I would assume that I would pretty much need the following functionalities:
    - At least 8 textures
    - Global Color Map and perlin normal to create variance over the terrain and remove tiling
    - Clear border between different textures (no smoothing)
    - Possibility to change brightness and saturation of the textures.
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    I'm not sure about the functionalities list you've posted above. It's all available in RTP3 (8 layers max). In case of your problem porting settings between scenes (I assume you'd like to prepare more golf levels) - yes, use presets. Make sure you saved all textures (like global colormap) before you make a preset. When you restore preset RTP asks whether it should reestore per layer+global numeric settings data or all (togehter with global textures). Note that global map that fits to one terrain won't match the other (esp. global normalmaps). You need to manage it separately. Applying global perlin when it's missing should be straightforward - simply drag&drop special combined texture (RTP/combined textures/special tab) you saved on a level.

    Tom
     
  28. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    162
    Hi, im just wondering how the colormap works on multiple terrains?

    I am using TC to create terrains and currently ue RTP with the single terrain, im thinking of using multple terrains but wondering how the colormap will work?

    Will it overlay all terrains or can I have a colormap for each terrain? (the latter is what I need)

    Thank You
     
  29. netincome2

    netincome2

    Joined:
    Nov 8, 2014
    Posts:
    14
    Hi,

    first of all, thanks for your great work. We are using RTP only for short time now and we encountered two problems with it.

    You use textures with resolution 512 (or 256px for Height) in examples. When using 1024 textures I get about 3x bigger scene (from 30 to 85MB) - is that correct or should we optimize it somehow?

    Also we are unable to make tesselation work, even in your testing "TerrainScene". I did this:
    * activated tesselation in LOD manager
    * recompiled shader
    * gerenated Global Normal Map
    * put it in the correct window
    * set pixel error on 200
    And terrain doesn't reflect when I change parameters.

    We are using RTP 3.3 and Unity 5.5 personal edition.

    Thanks a lot!
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    You would need to ask Nathaniel on this topic (RTP in TC). AFAIK TC manages global colormaps automatically. They are split/cut like any other global maps (global normalmaps) and automatically attached to right terrain tiles for RTP.

    You mean scene file size ? In atlasing mode (default for 8 layers rendered in one pass). Detail diffuse textures are put together in atlas and stored in scene until you save them to png. Look at RTP/Combined texture tab. Saving textures is also good when you would like to share such combined atlases across different scenes.

    For tessellation you need to prepare global height&normal texture - it's not the same as global normal texture. I have prepared one in package for immediate usage in my example scene. When you activate tessellation with displacement (not "phong" only) and recompil shaders you place such texture in the same place you would put global normalmap though. Chaging pixel error has generally small effect there depending on tessellation factors desired. You can shape terrain after tessellation heightmap is applied. It's like "last step" of workflow.

    Tom
     
  31. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    162
    I'm a bit confused by this? If I wasn't using TC how would it work? I'm setting the colourmap in RTP not TC.

    So if I had 2 terrains with RTP on each and I apply a different Colormap to each one will that work?
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Yes, that's the way it works - global maps are set per terrain and are not globalised like other parameters (for example those set per layer)

    Tom
     
  33. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    162
    Ok great, thanks.
     
  34. netincome2

    netincome2

    Joined:
    Nov 8, 2014
    Posts:
    14
    Thanks for the reply! Yes, we solved scene file size thanks to your advice. :)

    Tesselation is still not working though. We tried your map in your example scene. And we are using tesselation in our project without problém – it doesn’t work only on terrain. I’m sending screenshots that could help. Thanks again!

     
  35. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Hi, I've bought RTP for a long time, but never fully understood how to use it properly
    Here I encountered some problems:
    BTW,I'm using deferred rendering path and linear color space in my project.
    1. I used 8 layers in first pass and this occurred. The 5th and 6th texture look like they just got a full amount of smoothness.
    But their Alpha channel is pure black, they also look right if I put them into the first 4 texture slots.
    upload_2017-2-9_4-51-26.png
    2. Don't know why my terrain looks so flat, I have the height map placed but there is no tessellation.
    upload_2017-2-9_4-57-25.png
    3.Since I used 8 layers in the 1st pass, I should be able to use up to 11 layers, but the add layer button just turned grey after I assigned 8 layers in it. And I'm using mapmagic for runtime terrain generation, so I can't just add 11 textures first then add the RTP component on, is there any way to fix it when RTP script is already on my terrain(actually it's not on specific terrain, it's on MapMagic object and all terrain tiles are children to this object)?
    upload_2017-2-9_5-6-41.png
    4. After I checked tessellation feature and compiled shaders.
    The whole terrain textures became flat and floating above my terrain. Strange thing is the terrain is actually still down there, it seems just the textures flied to the top of the terrain.
    upload_2017-2-9_5-18-31.png
    And one more question, is it possible to use Tessellation feature for runtime random generated terrains?
    Hear you soon.
     
  36. matteumayo

    matteumayo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Hello,

    I've purchased your UBER shaders and have been thinking of purchasing RTP very soon. I did however see your post in the reviews mentioning an RTP v4 that will be purchasable as a separate asset. You mentioned improved performance - especially important to me as I'm targeting VR.

    Do you have an estimate for RTP v4's release date?

    Thanks.
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    Looks like tessellation is turned on (have you recompiled shaders in LOD manager ?) but it doesn't subdivide terrain. Could you give me more info about your hardware and project setup ? (exact RTP version + Unity version). I might try to reproduce the issue. Does it work if you import newest RTP and recompile tessellation for my example scene (to know if this is related to your scene or RTP functionality).

    1. With 8 layers rendered in 1 pass it should have no effect. We only need to make sure no addpass is fired (if you've got separate scene with 4+4 setup and the other with 8 layers setup it won't work). Look at RTP/combinded textures/atlases - 2nd atlas alpha it should have correct gloss values across all mipmaps. Check gloss ranges for your 5,6 layers in per layer settings.

    2. Tessellation that displace details is heavy (very high level of tessellation needed). You can use nthis after "displace heights in tessellation section of LOD manager is used). Lower pixel error so upclose triangles are small enough to be subdivided enough to give you displaced dunes.

    3. 11 layers is not possible anymore. Esp. in deferred where we need to render everything in 1 pass (to not blend additional layers in forward).

    4. Tessellation needs height&normal textures to be prepared and assigned (in RTP globalmaps section).
    Tessellation for runtime content - possible but you need to take care about preparing mentioned textures yourself at runtime (look how they are done in my editor script).

    RTP4 is under construction, but unfortunately I can't focus on this job now, so release date won't be anywhere soon.

    Tom
     
  38. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Hey, thx for the reply.
    I recompiled the shaders and the 1st problem got away. But it still can sometimes get back, it seems everything is a bit unstable with the shader recompiling.
    About the layers, is it 8 layers the max number we can use? Any way to use more textures for a terrain?
    And is it possible to use different textures on different terrains? Or I can only use 8 textures in my whole project?
    About tessellation, now my problem is I can't use this feature at all, whenever I check the tessellation box and compile shaders, the textures will become flat and fly in the air as the picture I attached in last reply.
    And is it possible to use global tessellation map for each terrain? For my terrains are generated automatically by MapMagic in runtime, and there is only one RTP script attached to MapMagic object, no RTP scripts on terrains. Is it still possible to use tessellation on each terrain?
    Another question, I sometimes meet this shadow glitch. Distant terrain seems like having twitches, and caused flashing shadow frames. Donno if it is shader related.
    1jamsx.gif
    About the snow, when I walk close to places with snow, they just turned into my last texture, snow can only be seen in distance, any ideas what may caused this?
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    On terrain you can use separate set of textures on each terrain. When you place terrain separate transform as a child then add RTP script it will group terrains together (by parent anchor). All parameters are separate as well then and you will need to manage them individually in RTP script inspector. For tessellation you need to follow the workflow - before you tessellate terrain in shader you need to prepare height&normal textures, after switching to tessellation you need to place prepared textures in RTP/global maps tab (next to global colormap section).
    In 3rd party solutions that uses RTP shading you need to take care about preparing height&normal textures yourself (or ask such 3rd party package to do it for you). It's realized by my editor script and porting such functionality to runtime is not that difficult. For shadows - take care you checked "full shadow pass" in LOD manager next to tessellation switches (always remember to recompile shaders then).

    Snow has separate feature to be set in LOD manager where it gets color from selected layer. You need to turn this feature off (LOD manager part where you have got snow option selected). Then snow color is controlled as global color (RTP inspector script - snow section). This special feature is useful when you would like to use it for automatic sand coverage for example (on top of other layers).

    Tom
     
  40. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Got it, will look into the details of the settings.
    But still don't know how to fix the flashing shadow problem
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    In earlier version of Unity (like early U5.x) I experienced issue that after some time shadows flickered (like showing/disappearing in short blinks). I'm not sure if this issue got solved. It happened when I used Unity for longer. Had to restart it to make it working again. Can you check if this issue is related to tessellation turned on/off ?

    Tom
     
  42. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    I'm getting crazy please help. I spend 5 hours to figure out what's wrong but no luck. I'm using Map magic and RTP together but when I add RTP script to maps it's become like this (Terrains boarders doesn't match correctly)

    Also I have to say there is no Global color map and setting of all terrains are same.
     

    Attached Files:

  43. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    @tomaszek I checked the forum for the gliching shadows, it's not about RTP I think.
    It concerns to the distance of a terrain from the original position (0,0,0).
    Shadows starts to glitch if the player is over 1000 units away from the original position.
    Seems unity 5.5 fixed this but I've never tested. 5.5 changed the render method made lots assets unavailable.
    We'll look into it again when we transplant our game to 5.5. Thanks for the reply.
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    First thing I can notice is missing perlin normal on the right side terrain. For MapMagic integration it's best to ask its author. I can only say what should be done on RTP side to make things working.When we have for example 2 stiched terrains in most cases they should be placed under the same parent in hierarchy - this ensures that most of their settings are globalized (only global maps are not). Then we place RTP script separately on first and 2nd terrain and setup needed params (like detail heightmaps). Going to perlin tab in RTP inspector causes perlin texture to be prepared. If for some reason it's not for 2nd terrain you can always save it in RTP/Combined textures/special tab and reuse this texture on 2nd terrain. Make sure both terrains has assigned global colormaps (it should be actualy done by MapMagic if this is the 35rd party tool you use to manage terrains with their global maps).

    You can give me you order number with purchase date for verification via private message here on forum. Then we can look into your issue via skype screenshare call. Interactively it's quickest option to solve such issues.

    Make sure you redownload RTP version dedicated for U5.5 (otherwise shaders won't work). If' you've got RTP already setup, it's enough to remove shaders folder and redownload RTP from U5.5 AssetStore then import. Sometimes Unity gives wrong version of package (even under U5.5 it gives U5.4 RTP package). In such case remove RTP package from Unity cache on your hard drive and redownload again.
    RTP version in placed in _verinfo.txt file in ReliefPack folder. Make sure it's version for U5.5 after you upgrade.
    Shadows in U5.5 are definitely better (reversed fp buffer).

    Tom
     
    ksam2 likes this.
  45. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    162
    [SOLVED]
    Hi, i am at a lost once more... I am trying to now use controlmaps / splatmaps / alpha which ever we want to call them.

    I have 4 terrain tiles in my scene, each with RTP attatched, so what is the correct way:

    1) A control map for each terrain tile?
    2) Same control map attached to each terrain to cover all terrains?

    I seem to have tried both and had no luck. The nearest I have it is a control map for each terrain tile but it is "offset" it does not align up with the terrain?

    Please advise me
    Thanks
     
    Last edited: Feb 14, 2017
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    You mean coverage texture (RGBA for subsequent 4 layers). They are stored in Unity's terrain object as regular subasset. After refresh call in RTP they should get synced (although "drawing" on them directly or using terrain functions to set them) should not rebuild textures but only affects those existing - refresh is supopsed to be not necessary then.
    I assume you [SOLVED] this though.

    Tom
     
  47. Multithreaded_Games

    Multithreaded_Games

    Joined:
    Jul 6, 2015
    Posts:
    121
    Hello Tom!

    First off I just wanted to let you know that the RTP asset is easily the best purchase to date for our small studio. An absolute necessity for anyone looking to make Unity's terrain showable. Also, let me apologize if this question has been asked already, but at 114 pages one can't be expected to look at all questions and solutions. Being such a prolific asset has its downfalls, I guess, and having to answer the same question a few times is probably one of the worst.

    I have created medium sized terrains and filled the scene with a large amount of vegetation, enemies, and objects:



    By no means are the SetPass calls, batches, or polys too many to handle but I would love to lower them as much as possible. Enter the Terrain to Mesh tool. With it I was able to successfully break the terrain into multiple mesh objects; it both lowered the SetPass calls tremendously and made for better occlusion culling. Imagine my surprise when I was able to just copy the RTP terrain component to each of these meshes and they instantly take the terrain's textures: color, tessellation, and all.

    Setup is complete, time for the issue. With every object that has the RTP terrain component the scene file increases by something like 50-70 MB. With 16 different chunks of terrain our scene file grew to over 800 MBs. Unity did not like this. In fact, Unity hated this so much that once I closed the scene I was unable to actually open it again (thank you source control, you magnificent mistress).

    Question: I know that RTP comes with many different standalone shaders, so is there some combination of exporting maps from the RTP terrain component and putting them into the standalone shaders that would lower the overhead of such a thing? Having one large mesh with the RTP terrain component is not too hard on the HD and still saves 100-150 SetPass calls, but it increases the number of tris on the scene since there is no culling at all on the object. Still very much worth it but I'm curious if maybe I could still get this working with multiple meshes.

    Thanks again for such a great asset!

    -Andy
     
  48. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Good news Tom! It seems n00body solved the old issue between Alloy and RTP.


    I don't know if it will cause any other issue but seems it's solved my heavily specular over terrains when using Alloy. Can you please add this line to next version?
     
    Last edited: Feb 14, 2017
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,751
    I guess textures are not shared. RTP needs to prepare some textures for usage first to save resources for shaders. For example detail normalmaps are merged in pairs, heightmaps are merged in quads. So - textures you see in inspector onder layer tab are actually not textures that are used by shader (they are for editor usage only). These merged textures are scene objects until you save them. Look at RTP/Combined textures tab - visit all subtabs and save textures. You can reuse such merged textures across terrains and scenes now. When you make global colormap texture it's also scene object till you save it. When your setup is ready you should preferably save textures to release them from scene files.

    This is also the way Unity removes specularity now when we set specular color very low (below 0.02). RTP uses metallic setup which by default can't make specular color (derived from metalness and object albedo) that low - full dielectric is 0.04, 0.04, 0.04 as far as I rememer, but using my script (look at my example scene terrain) you can set dielectric color to pure black. Setting metalness to 0 means direct specularity will be removed, even if you use GGX Unity PBR model. I discussed this some time ago with n00body, he asked me to wait for a moment till he make some research on his side, apparently he decided to solve this problem this way. Although damping occlusion means we won't receive any ambient (diffuse and specular reflections) either.

    Tom
     
  50. Multithreaded_Games

    Multithreaded_Games

    Joined:
    Jul 6, 2015
    Posts:
    121
    Thank you Tom!

    With sharing normal maps, height maps, and atlas textures we were able to take a terrain and split it up into 25 different meshes (reducing batches and set pass calls considerably.) The save file went from 1.1GB with 25 separate meshes to 86KB (smaller than it was when we had one terrain without actually saved combined textures. TIL.)

    Thanks again! Few things feel better than reducing draw calls in your game.

    -Andy
     
    RomBinDaHouse, hopeful and tomaszek like this.