Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,862
    If you go from 4x2 to 8x1 rendering take into account:

    1. 4x2 is 2 passes - Unity adds a pass for each layer quad.
    2. 8x1 is 1 pass shader because of the trick I did - setting basemap distance in Unity terrain settings to 0 forces Unity to use "far" shader which is one pass that draws 8 layers (using atlases).

    In deferred 4x2 doesn't work well anyway because of specularity blending problems. 8x1 is must then. I assume your scenario is something like - render one scene with 4 layers and another with 8 layers (which you'd like to do in 1 pass).

    So - if you go from 4 to 8 layers at runtime replacing shaders - prepare "far" (basemap) shader to draw 8 layers. prepare first pass shader to have reference to this special far shader (look at the end of first-pass shader where dependencies are set). Manage right rtp_base.cginc for both scenarios so that 2 type of shaders use different base.cginc file. You could try to not copy cginc but introduce some conditional compilation or keep #define 8layers commented out in cginc while you can define it level up in shader instead.

    Of course at all these steps you take responsibility to manage defines and compile shaders since LOD manager won't do it the way you need.

    Tom
     
  2. Trunka

    Trunka

    Joined:
    Dec 3, 2014
    Posts:
    17
    Hi Tom,

    Thank you so much for the explanation. As I mentioned above, that is exactly how I implemented.
    The last post is like "Hey Tom, I got it"

    At first try I just copied base.cginc, define Multi_compile keyword in shaders, and toggled it at runtime. It was still rendered in both Deferred and Forward, 8-9ms for both (just faster than 4x2 by ~0.2ms).

    Thus I copied separate FirstPass, AddPass and FarPass after compiled by LOD_manager in 8x1, with separate base.cginc then linked together, and keep Original shaders at 4x2. Now everything is in deferred, taking 6-7ms. When I need the old 4x2 I just switch shader of Terrain's custom material.

    So I was able to toggle between High (4x2 - detailed) and Low (8x1 with blurry aniso, Rtp_Hard_Crosspass). No problem with specularity, guess I tweaked it long ago . It was done anyway and I'm satisfied enough to move on.

    Trung

    ps: I think it is cool!
     
    Last edited: Aug 10, 2017
  3. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    107
    Hello, I'm new in RTP. My multiterrain is tiled with 4000x4000m. of tile size.

    In this video you can see one tile and two layers with the same texture and different UV blend scale (0.05 left, 0.01 right):


    Is there any ability to blend layers on a very long distance? Don't know if a Coverage feature can help me?
     
  4. Gradins88

    Gradins88

    Joined:
    Nov 8, 2016
    Posts:
    5
    Hello, can anyone help me?

    The problem is that the scene file (.unity) after applying RTP is increased by several tens of times. For example, without it, the scene was 7mb in size, after it became 350mb. In fact, I used hightblend maps on all 8 layers of terrain. The size of the maps is not large, 512x512.

    Where I was mistaken, tell me please.
    I'm not a very advanced user. Could make some very stupid mistake =)
     
  5. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Make sure to save any combined textures to your project and have RTP load it from there. Otherwise RTP will keep these textures stored directly inside your scene. Sometimes (depending on your exact setup) you might even end up with the same data in multiple copies inside your scene.
    You'll understand this better the more you work with RTP. Basically RTP creates atlases and combined textures from your terrain splatmaps to reduce texture lookups which is a good thing. To make iterating on your scene faster RTP manages these combined data sets on a "hidden" object instance in your scene. Once satisfied with the look you can unload some of this data to your harddrive.
     
  6. Gradins88

    Gradins88

    Joined:
    Nov 8, 2016
    Posts:
    5

    Oh, thank you very much.
    Progress is visible right away! The size of the scene is again 10mb

    I did not immediately understand how to write 2 atlas with textures, but after experimenting with the RTP_LODmanager component settings, I got the result!
     
    Marco-Sperling likes this.
  7. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @tomaszek , have you looked at the World manager being developed by adam goodrich which creates an api for weather, terrains and other environmental assets to work together? It would a great help if you could implement in RTP as it would allow coordination with assets.
     
  8. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    It's my first day with RTP and I'm really happy that I've purchased this. RTP might be hard to understand in terms of options to optimize performance vs aesthetic. But using the tool itself is rather easy.

    Can't wait to do blending with meshes with uber shader.


    screen_1920x1080_2017-08-20_03-36-39.png screen_1920x1080_2017-08-20_04-13-46.png screen_1920x1080_2017-08-20_04-15-07.png
     
    mukki014 likes this.
  9. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    A quick question, how do I control what I see in the distance, right now they are very simple patches of colour.
     
    Last edited: Aug 20, 2017
  10. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    I am using RTP polybrush shader on Voxeland and I have 2 issues.

    1 : The normal shadows are looking extremely dark on layer 0-2, They are good on layer 3 only.
    I checked and switched textures, the source of the issue are not the textures.

    http://imgur.com/a/8l6Wq

    2 : The UV blend for layer 2 and 3 are inverted and I can't change any of them via the LOD manager.
    I switched textures but they are still inverted. In the LODmanager I have 2 to 2 and 3 to 3. So I changed for 2 to 3 and 3 to 2, but after recompile nothing change.

    Is there a chance that you make your Tessellated shader working with Voxeland ? But maybe it is something I have to ask to Denis Pahunov from Voxeland. Anyway, having tessellated voxels would be very nice.
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Take a look at "no detail color at distance" in LOD manager - if you have this option checked global colormap is used at distance only. Other source of this behavior might be MIP filtering at far distance set per layer where you can aritificially increase MIP level selected to remove tiling.

    Can you compare with clean install of RTP and my example standalone scene ? LOD manager is meant to deal with regular terrain RTP shader. Triplanar standalone is configured separately (with options to be recompiled thru material inspector). Some specific features are configurable in shader code - look at the beginning of the sahder right after properties section - #defines are extensivelly commented.

    Tom
     
    coverpage likes this.
  12. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    the thread is quiet long now and i tried to search for an answer without any luck. is it possible to have trees blend as well with the terrain? at least the first LOD? this would have quiet an impact visually. in the latest cryengine (i believe 5,4) even foliage (grass etc) is blending with the terrain.
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I don't plan it for RTP3. RTP4 lateron - yes.
     
  14. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @tomaszek did you get a chance to look at world manager? Is it something you would consider integrating with? If not how would I go about getting the values for wetness, snow etc from RTP to send to my other assets like my weather system or changing these values at runtime from my weather values.
     
  15. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    Hi everyone...
    I have a problem Height blending is not working... Any idea ....
     
  16. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    I am still using the standalone polybrush shader on Voxeland and I have tiling issue between chunks.
    I think that it is because the shader textures in local space.

    Is there a way to texture in global/world space in order to avoid any tiling seems between chunks ?
     
  17. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Hi I'm using RTP with 3.3 with map magic on unity 2017. my question is that i need 5 layer textures on terrain. so what pass i should use ? I don't have 8 layer or 4 but 5. also my terrain get flat when using tessalation why ? and my terrain become dark.
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Check your heightmaps - they need to have alpha channel present. Another reason is theat they are of different size and RTP can't merge them into one RGBA texture per each 4 layers. Look at combined textures tab/heightmaps in RTP inspector to see if they get constructed properly.

    Take a look inside shader code - at the beginning right after properties section you can find section with defines - some of them are configurable via inspector (when you change some features and recompile shader code #defines get affected) but not all settings are available via inspector so you need to look around - there is a switch to choose between local and global space for triplanar UV mapping coords.

    You use exactly 4 or 8 layers in RTP. If you need 5 - add 3 dummy ones. This should fix dark problem. In deferred lighting you need to use LOD manager option to render everything in 1 pass (8 layers in one pass). Make sure script that associates main directional light in scene is attached (compare with my example scene - look at light).

    For tessellation follow guidelines in my YT video (simply google for geom blend relief terrain pack). It needs first height&normals texture to be preapred then attached to terrain for tessellation displacement to work.

    Tom
     
    mukki014 likes this.
  19. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Thanks for the help and quick reply. So do I need to prepare height map and Normal map? Well I have diffuse Normal and height map for all my texture. I'm only using 4 layers. But now I'm having another problem when I open or close unity snow isn't appearing or get reset but when I see it setting it says snow is enabled so if I move the slider again then snow appear. What could be the reason ? Thank
     
  20. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Oh I forgot to mention one thing. I switch back to unity 5.6 because 2017 giving me bugs. And now it's not dark even without light script.
     
  21. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    It might be easier if you do a screen recording of whatever is happening. You can use https://screencast-o-matic.com . Maybe the heightmaps are too flat with a low dynamic range so it's hard to see the heightblending effect?
     
    mukki014 likes this.
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    How do you imagine having good looking terrain w/o normalmaps? Each detail layer need to have normalmap and heightmap for blending.

    Snow is refreshed as you go to play modeso don't worry - it will work in game build (refresh is fired when you do it via Refresh button in RTP settings section or via any other slider in RTP).

    I believe newest RTP (check verinfo.txt file in my installation folder) should work fine in U2017.

    Tom
     
    mukki014 likes this.
  23. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    Well should i first create Height-normal map for tesselation ? using rtp window?
     
  24. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    hey how do you create an awesome looking terrain ? can you tell me if is not a secret. I'm asking about image effects. do you use PBR materials ?
     
  25. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    i already have heightmap and normal maps in each layer slots.
    and little dark is terrain.
    well when i first attached it to map magic everything works smooth even with triplanar shader.
    I'm using 1k color map for my terrain.
    and one more thing i noticed when i use rtp terrain with simple unity terrain rtp dont work at all.
    and you can see in the pic i have 0.854 strength but snow still not appearing in scene view and i also build a demo and snow still dont appear
     

    Attached Files:

  26. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Hi @mukki014 it's not at all a secret. I use pbr material with @aliyeredon2 lighting box that has nice presets for post processing. I tweaked it but the defaults look great as well. For the skybox I'm using allsky. I really like RTP for the fact that it has a good combination of being both realistic and artistic.

    Also I use a lot of super detail, normal noise and UV mixing in RTP. Also 8 layer POM
     
    Last edited: Aug 31, 2017
    mukki014 likes this.
  27. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    164
    hi thanks for the reply. I'm new to pbr material and rendering . do you know any tutorial for pbr workflow?
     
  28. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello @tomaszek , I need help, please. I have two critical problems with RTP Terrain.

    This is my current RTP LOD Manager values: RTP_LODMANAGER-Settings.jpg
    This is my current RTP preset (the RTP shader values on my terrains ): RTP_Preset.asset

    1)
    When I try to enable "Water/Wetness", the console shows shader errors. I use the latest RTP for Unity 5.6.1F1.
    Even though I check "simple water" or not, still I see the errors and the terrains become hot pink.
    Here are the errors:
    Would you please inform me what could cause these errors? Thanks.

    2) The other problem is very important but I'm not sure if it's RTPs fault or not. I'd like to know your opinion on how to solve it. The problem is, I've made a shader for windshields and it used to work perfectly fine. Even it used to work with previous RTP Terrain shaders. But after I upgraded RTP to the latest version, a conflict happens between RTP and the windshield Shader.
    Would you please suggest what could cause this problem? I only updated the RTP and then re-compiled it with RTP LOD Manager and accidentally found the problem. Have a look at the video below to find out more about the problem.
     
    Last edited: Sep 1, 2017
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Imported RTP3.3h (check you verinfo.txt file) under U5.6.1f1 and for the same LOD manager settings I can't reproduce the issue and shaders can be compiled.

    For the windshield problem - it's very hard to tell. Maybe your shader is based on some global values that interfere with RTP ones? Do you use grabpass? BTW - rain on the windsheild looks supercool:).

    Tom
     
    imDanOush likes this.
  30. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    It is 3.3h, I double checked. I deleted and re-imported the asset and still, I see the error. Did you used exact values of mine and did you checked the "Water" and "Simple Water" buttons?
    EDIT: I think I found a solution!! When I unchecked "Color maps for far distances only" the problem got solved!!, Therefore I think I should keep this button checked.


    Yes, I use Grab pass for the refractions. in fact, I think that cause the trouble but I have no idea how come and how that makes the trouble.
    EDIT: When I checked ""No Deferred", the problem got solved.


    Thank you!! I appreciate it.

    Four more questions:
    1. How many lights are too many for RTP Terrain shader in forward mode?
    2. What is the most optimized method for updating "global water/wetness amount" in runtime for the tiles of terrains that were loaded additively in scenes via script?
    3. I need to leave the "No Deferred" option on in order to fix to windshield effect error. Is it expensive to leave it on? I'd be glad to hear your advice.
    4. When I left the "No Deferred" option on, I noticed something strange. Not all lights show their reflection (or light coockie texture) on the terrain!! [Please watch the video below for better understanding]
    Please help. Thanks!!
     
    Last edited: Sep 1, 2017
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Your LOD manager setup in jpg doesn't have wetness enabled. I can check with this enabled. transparency/grab pass might be problematic in deferred (not sure how Unity handle it now). So - using no deferred helps - terrain is then rendered in forward. The reason you don't have all lights over the terrain is that you have "no forward add" checked - only 1 main light is handled per pixel. Rest - via SH. Uncheck no forward add. Terrain rendered in forward might be not THAT bad. First - terrain is drawn to depth - so no overdraw issues. Multiple passes are used only at terrain patches that are influenced by many lights - not whole terrain is rendered N (N is number of lights) times. You wou'd need to make a few tests to check if the performance in forward is acceptable.

    Tom
     
  32. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Thanks for your informative reply, I've learnt a lot. I fixed my windshield shader error and now I use deferred mode for the terrains. Alles gut!!.

    Just one small question! What is the most optimized method for updating "global water/wetness amount" in runtime?
    Say I have lots of terrains that are being streamed, how could - in the most optimized way - I set their water/wetness value when the ingame weather is changing to sunny or rainy?
     
    Last edited: Sep 1, 2017
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Basically something like that:

    Code (csharp):
    1. Shader.SetGlobalFloat("TERRAIN_GlobalWetness", TERRAIN_GlobalWetness);
    To keep TERRAIN_GlobalWetness in sync with ReliefTerrainGlobalSettingsHolder you can set it in script as well. Otherwise you set global shader value and should work, bu as soon as RTP call refresh function the value will get overwritten by script value (aReliefTerrainScriptInstance.globalSettingsHolder.TERRAIN_GlobalWetness).

    Take a look at this post in UBER thread:

    https://forum.unity3d.com/threads/uber-standard-shader-ultra.335493/page-29#post-3205008

    Tom
     
    imDanOush likes this.
  34. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Sorry to ask a lot, But I found out that everytime I update the RTP Global wetness value via script, I should hit the "fill all terrain with water" button to see the expected results. Otherwise, the water flow effect won't be shown.
    After further investigations, I've figured out that it is possible to do so by calling the method below for each active terrain:
    Code (CSharp):
    1. ReliefTerrain.PrepareGlobalNormalsAndSuperDetails(true, false);
    The problem with the method is, it is very expensive and makes the game freeze for more than a couple of seconds!! Even it should be called every time when a new terrain is being loaded!!

    How would I solve this problem? Thanks in advance.

    Here is a video of demonstrating the problem.
     
    Last edited: Sep 4, 2017
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Wetmask is a texture. After you "fill it with water" (you can also paint wetness to dry it out under shelters, bridges and do it via script if have info where shelters on the levels are placed) save the texture. It should make it persistent. Making wetmask texture takes some time - that's the lag you experience. However I'm not really sure hot it's related to water flowing as we can the water even w/o the fix.

    Tom
     
    Last edited: Sep 4, 2017
  36. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi Tom,

    I'm having problems with the tessellation feature (i know - again) My player character is now hovering above or sometimes below. I have watched the tessellation video a dozen times but cant seem to get it right.

    I have googled how to make a separate terrain collider like you suggest for unity 5 but cant find out how to do it anywhere. If you could explain the last minute of your tessellation video agian or link me to how you create a high res collider and then tessellated low res terrain I would be eternally grateful.
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Most briefly:
    1. After tessellation rendered terrain takes heights from texture (not from Unity raw height data) and performs optional smoothing
    2. This means - different heights as what is used for collider (and was used for original rendering)
    3. If your terrain heightmap is of sufficient resolution - use get heights button in tess section to match back heights to texture values used for rendering

    Separate collider:
    1. Use hi-res heightmap
    2. Prepare height&normals texture
    3. Turn on requested tessellation feature in LOD manager and recompile
    4. attach tess height&normal texture
    5. use get heights to match terrain data as close as possible (it never matches perfectly though - the higher res of heightmap the better)
    6. make a copy of terrain object
    7. reduce resolution of heightmap in Unity and use get heights button again (for proper culling)
    8. set pixel error and tess factors to satisfying values
    9. attach copied terrain data (p.6) for collider

    Unity will complain (warning) that collider terrain object is different from terrain used for rendering.

    This should solve hovering collider (character) problems. This does not solve problem of objects placed over the terrain (vegetation, details). Not sure how their positions are stored in terain object. If they are stored with world Y pos - we're fine (and you place trees and details after p.5). If not - you need to use different 2 game objects. One to render terrain with RTP (with no collider and terrain detail). And the other with matched (p.5) copy (p.6) that is used as collider and for details/trees rendering. The other terrain you will simply unset checkbox in Unity terrain settings to not draw terrain surface because the other terrain is used only for collisions and vegetation/trees purpose.

    Tom
     
    AndyNeoman likes this.
  38. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks for the detailed explanation Tom.

    Edit: in progress will update when I stop crying....
     
  39. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Edit 2:- I have finally fixed this to an acceptable level I think (collab updating praise be)

    The problem was a combination of issues mainly concerning several items (RTP, TC2,Terrain) all having access to the terrain data and the funny way terrains and terrain data is linked. Even having two separate Terrains/data was still failing until the solution.

    I fixed it by having two separate terrains, one with only the collider on it duplicated from original (even terrain removed) and one with everything else (but collider removed). The collider set to 1 pixel error. The other one tessellated and pixel error of 200. Everything else is setup as the excellent instructions above from Tom explain.

    If anyone ever gets stuck with this issue feel free to PM, I'm willing to start a support group for unity terrain users.....
     
  40. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Thanks for the reply but I've assigned all of the terrains a black water mask texture by a code (the code is written below).
    Code (CSharp):
    1.  
    2. //...Load a terrain prefab.
    3. Texture2D ntex = (Texture2D)Resources.Load("DeleteSoon/terrain_wetmask"); // Load the texture
    4. rtp_go.GetComponent<ReliefTerrain>().TERRAIN_WetMask=ntex; // replace it
    5. //...update the terrain prefab.
    NOTE: The texture is properly set up (it has right resolution and mip map settings and is readable ) the texture is identical to the original ones.
    The code works and the terrain has a fully black texture - means all of the terrains are 100% wet - but still the problem exist. I should click the "Fill all water with water" button or manually assign the texture for each terrain to get it work.
    Since there are 651 terrains, I'd be glad if you tell me why the code doesn't work (or why only the manual method works).
     
    Last edited: Sep 5, 2017
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    So - your wetmask are dynamically assigned/changed in your environment? Notice that wetmask used in shader is part of combined texture where RG channels are perlin normals - they are also used for water bumps (flow). If perlin normals are not well setup - flow won't work. Take a look at combined textures section - special combined - it's commented in hintbox of inspector. To ahve this functionality working permanently - remember you need to have this this combined textue saved to asset (png). Otherwise it's scene object that's volatile reference (which can be lost when we for example make terrain a prefab or in a few other cases).
     
  42. tanatos

    tanatos

    Joined:
    Oct 8, 2014
    Posts:
    6
    RTP stop reacting to any changes with no reason. There is no any error, thare was no any change or moving files, just stop react. Anyone got this problem before? how to solve that problem?
     
  43. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Yep, that was the culprit. There is no special texture for the terrains!! Just fixed that. No worries after two days!

    Well, Actually I was of the opinion that the terrains had no water mask, therefore, the problem occured. So I made an editor script for automating the process of fixing it.

    Thank you for the help!!

    EDIT: @tomaszek
    I just made a video showcasing your amazing asset in it. Would be glad to watch it. :)
     
    tomaszek and Bartolomeus755 like this.
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You would need to give me more info. Does it react on my example scene? Can you try to save preset and reset RTP on the terrain (remove component, set terrain material to default, then reattach RTP and restore preset?)

    Tom
     
  45. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    177
    Hello Tom,

    I notice that adding RTP to my test terrain (50x50) super size my scene size (1Mo => 42Mo) wich is huge ! (i have 3600 terrain tiles to equipe with RTP). Is this a normal behaviour ? there is a way to keep my scenes size with rtp smaller (loading rtp data from other file...) ?


    Other issues :

    I'm getting also a very wirred behaviour with RTP, please have a look at the attached pictures :

    1/ Issue between 2 terrain tiles


    2/ issue with light:


    3/ RTP dosnt interpret textures normal map (the grass in the last pic have a normal map configured to it in the rtp...)

    My setup:
    * Each terrain tile have 8 layer (8 textures)
    * All my layer texture are in the same size (1024x1024). The only thing is some layers have normal texture and other dont.
    * I'm using 4 Layer config in RTP LOD manager cause when i activate the 8 Layer option all my terrains goes black...

    I read the doc 2 times but still sure i'm doing something wrong...

    Edit1:
    When i try to save into file the Atlas texture (8mode layer) my terrain texture get wirrend appearence and i'm gettings this error into console :

    ps: i'm using Unity 2017.1.p1

    Code (CSharp):
    1. SetPixels32 called with invalid number of pixels in the array
    2. UnityEngine.Texture2D:SetPixels32(Color32[], Int32)
    3. ReliefTerrainEditor:SaveTexture(Texture2D&, String&, String, Int32, TextureImporterCompression, TextureImporterType, Boolean, Boolean, Boolean) (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:5909)
    4. ReliefTerrainEditor:OnInspectorGUI() (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:2290)
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    6.  

    Thank you for the help
     
    Last edited: Sep 11, 2017
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Size of scene can be huge when you manage multiple terrains and don't save textures that are produced by RTP. By default they are scene objects until you save them to textures (take a look at combined textures tab).

    Difference between tiles might be caused by either not matching global normalmaps of adjaced terrains or those terrain tiles use actually different set of textures, not the same. If you have all terrains in hierarchy on the same level then add RTP they all should share global settings and textures (unless you intentioanlly want another setup with grouping different terrains in different hierarchy anchors).

    If a layer doesn't have normalmap attached it might cause light problems as well. It's better to use proxy "flat" normal texture in such case. Normalmaps get combined in pairs RG+BA - so the original textures are not used. If something wrong happens while combining you won't have correct lighting. Take a look at combined textures/normalmaps if they got correctly combined.

    Not sure what's the issue with the atlas. What's the resolution (maybe you hit the limit as atlas is constructed with 2x2 detail diffuse textures). After you save it you're not supposed to rescale it (if you set size limit to 2k when your atlas should be 4k - made out of 2x2 2k detail textures - you can have also weird behavior).

    What's the RTP version you use? I can try on my side if I'm able to reproduce the error.

    Tom
     
  47. lmtm

    lmtm

    Joined:
    Sep 9, 2013
    Posts:
    32
    Hello guys,
    I'm on unity 5.2.3, I have 12 layers. Everything is working perfect.
    In my camera I have set rendering path as FORWARD.

    After changing it to DEFERRED and adding script ReliefShaders_applyLightForDeferred to my Light
    layers 9-12 are black.

    It is possible to solve this problem? What are next settings/steps to solve it?

    Thanks,

    Milos.
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP3 works fine on 8 layers. For more - try to arrange your environment so that separate terrain tile uses only 8 layes while adjanced terrain tiles can share layer textures (to stay consistent at least at edges). Or you can use sticked geom blend feature to increase 8 layer limit at places where it's necessary (adding paths for example).

    In time (RTP4) you'll see no constrains here though as I plan to manage for exapmple 32-64 layers w/o considerable performance hit.

    Tom
     
  49. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Hello, Tomaszek,
    Could you please give at least rough estimation how soon are you going to release RTP4 and how different from RTP3.3 is it going to be? I am asking because now I have some free time which I was going to spend on learning several new Unity technologies and packages and RTP was one of them. It turned out that RTP is not so easy to get a good grasp on all its features in a few hours and even days so I wonder if it will be more effective to wait until version 4 and then dive into it.
    Thanks,
    Dmitriy.
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If you can wait for a few weeks/months - you could jump into RTP4, meantime RTP3 isn't that hard it seems to be at first glance :).

    Tom