Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    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,861
    It is all possible, but you need to control it yourself by script. ReliefTerrain component attached to each terrain chunk has acess to its public properties like global colormap texture. There is also shared object referenced by reliefTerrainScriptInstance.globalSettingsHolder. It's ReliefTerrainGlobalSettingsHolder object which exposes publicly other props like water level. Lava + wet - possible, but you need to budget one layer to be lava - there you can set water emissivenes while other layers has no emission.

    It's due to missing aniso. Top get it working don't use atlasing (8 layers mode or atlasing set explicitly in 4 layers mode). Set aniso filtering of your textures to higer level.

    Tom
     
    ryschawy and Tethys like this.
  2. Hakazaba

    Hakazaba

    Joined:
    Jul 1, 2015
    Posts:
    119
    Thanks, though i'm still unsure about the dynamic snow. It seems to be controllable by the colour map, though i want to use the colour map at the same time and if i don't disable it, it darkens the snow. Is there something else im unaware of for that?
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    global colormap can (optionally) influence snow coverage. Snow coverage can be also controlled per layer (snow coverage each layer has). Global map to control it - possible, but then you don't have global coverage map for wetness (and you need to change a commented #define switch in RTP_Base.cginc file).

    Tom
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    UBER is on Birthday Bonanza sale for next 9 days. You can get it for $30. Goes fine with RTP upgrade. You can get RTP+UBER for as low as $65 now (instead of $85 in sum).
     
    Marked likes this.
  5. Hakazaba

    Hakazaba

    Joined:
    Jul 1, 2015
    Posts:
    119
    Okay, in that case, is it possible to have the global colour map influence snow coverage, while not influencing the colour of the snow itself, while also having the layer underneath the snow still be effected by the colour map?
     
  6. punkbot

    punkbot

    Joined:
    Apr 18, 2014
    Posts:
    19
    Hi there! I'm having a strange issue with ProceduralTexture normal maps (using Substance Designer). When I look at the texture generated by Unity internally, it looks fine. However, when assigning the ProceduralTexture in RTP and clicking "Get textures", the saved-to-disk normal map is a bright salmon pink color instead of the typical bluish normal map color.

    Any idea why this might be happening?
     
  7. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    I guess you are using DX11 mode, right?
    I had this too and it is a very old unity bug and the DX11 mode is messing with the normal maps.

    http://answers.unity3d.com/questions/595829/normal-maps-turned-pink-and-orange.html
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Global colormap is meant to bring additional color to terrain. Snow uses it's brighntess (optionally) to _gently_ influence the snow coverage (by the assumption that if you've got lighting baked in global colormap dark places means - less light which means more snow because sun doesn't operate there).

    You can use global wet mask to control snow coverage (then you can't use it for wet coverage separately).

    Might be encoding issue, or texture got stucked. It's very easy to have procedural textures not available (they report -1x-1 size). Somehow when we use whoe substance as material Unity can handle it. When we access procedural textures - they got a lot of issues. To get it working you'd probably need to consider saving substance textures to disk (RTP tries hard to help users with "get textures" button, but as we see it's not 100% reliable :( ). On substance material click on gear wheel in top right corner of inspector - there is save textures option. Then you can use them regular way in RTP.

    Tom
     
  9. StonedLover

    StonedLover

    Joined:
    Apr 16, 2014
    Posts:
    47
    Hello,
    Is it possible to have a second Layer above the base texture layer? So if the player moves the layer above gets disabled in a radius of f.e. 5 Meters around the player and stays so ?

    Konstantin
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Possible, but is up to user to implement it himself (RTP has source code of shaders and scripts included).

    Tom
     
  11. drmanhattan

    drmanhattan

    Joined:
    Jul 5, 2015
    Posts:
    41
    I wonder if anyone can help me with a slight rendering issue I'm having when using RTP.

    I'm sure this has been discussed before, but when I get close to the terrain I have a weird dark effect showing up:



    Any ideas?

    Thanks.
     
  12. punkbot

    punkbot

    Joined:
    Apr 18, 2014
    Posts:
    19
    Ah thank you, I didn't realize you could export right there. That has fixed it up, thanks!
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Looks like terrain self shadowing. You can check if it's gone when you turn off terrain shadow casting in Unity terrain settings. Then - if you use tessellation you might need to sync terrain shadow caster with tessellated version - check full shadow pass in LOD manager next to tessellation checkbox. If this is still an issue - I can't help more. Unity shadows are not perfect (though they get a lot better in 5.5 with reversed floating point depth buffer).

    Tom
     
    drmanhattan likes this.
  14. drmanhattan

    drmanhattan

    Joined:
    Jul 5, 2015
    Posts:
    41
    Thanks for your help, I'll have a play around. It's something to do with tessellation as the problem goes away when I turn that off in the shader.
     
  15. karelium

    karelium

    Joined:
    Oct 11, 2014
    Posts:
    5
    Hi,
    Does it work on high-end mobile platforms at a decent frame rate? I'm targeting specifically iOS devices. I understand not all the features will be available but some of them: I want texture tiles not too visible, terrain LOD, etc.
     
  16. Aerys

    Aerys

    Joined:
    Aug 3, 2016
    Posts:
    15
    Hi,
    I have a question about the method to disable the tesselation of the terrain using the in-game settings.
    Is there a way to disable the terrain tesselation in-game?
    Thanks so much in advance
     
    Last edited: Nov 27, 2016
  17. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    The "ReliefShaders_applyLightForDeferred" script is generating 1.2kb gc per frame, is this intended?
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You can try your luck with GLES3 platforms. As far as I remember some users already got it working on newer iPads without problems - of course you can't expect great performance with expensive features requested, using vanilla features like heightblending, UV blending, globalmaps should work fine though.

    LOD manager compiles one shader set per project, so in current state it would not work out of the box, but still you could do some trick.

    1. Compile without tessellation, then copy shaders code (generated by LOD manager).
    2. Compile with tessellation.
    3. Paste copied subshader code:

    Code (csharp):
    1.  
    2.  
    3. // [...] shader properties section here
    4.  
    5. Subshader {
    6. LOD 800 // change 700 to 800 here so that tessellation variant subshader has higher lod shader number
    7.  
    8. // here's the part maintained by RTP LOD manager
    9.  
    10. }
    11.  
    12. // paste copied subshader here
    13. Subshader {
    14. LOD 700
    15. // here's the part of LOD manager subshader code copied previously (w/o tessellation)
    16. }
    17.  
    18.  
    You need to do it in all RTP terrain related shaders (first pass, add pass if used, far only).

    Then in your game settings you can use this functions:

    https://docs.unity3d.com/ScriptReference/Shader-globalMaximumLOD.html

    to set eighter 800 (to use tessellation) or 700 (to not use tessellation) parameters in maximum shader LOD calls.

    Well, not really... You could try to fix it by introducing light quaternion (rotation) variable and compare it with current light rotation. If nothing changes - skip RTP actions taken in Update() of the script. This should stop producing any unnecessary gc traffic.

    Tom
     
    ryschawy and karelium like this.
  19. mirts

    mirts

    Joined:
    Dec 26, 2012
    Posts:
    32
    Hi
    When I reload a scene in the editor and select the Terrain with RTP on it, always there is a long wait (more than a minute) and a dialogue called "Processing" that says "Padding Textures". Even if I haven't changed anything in the terrain settings. I'm using Unity 5.5.0f2 Beta
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    RTP makes atlases for 8 layers mode. In case of larger source texture size (like 2k or 4k - not recommended size) it might take some time. When you save scene atlases should be saved together, but apparently they're nnot. To make atlases reference solid save them to png files (RTP/Combined textures/Atlasing you'll find atlases used by shader to save).

    Tom
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I'm participating in a nice small Christmas event. Take a look here for more details:

    http://christmas.devdog.io/

    There is a chance to win RTP and UBER (3+3=6 free vouchers in sum) at 1st and 6th of December.

    christmas.jpg

    Good luck, although I'll wish Merry Christmas to all of you a bit later :).

    Tom
     
  22. mirts

    mirts

    Joined:
    Dec 26, 2012
    Posts:
    32
    Hi Tom. Thanks for the reply. I did indeed have 4k textures. I made them 1024x1024 now. The padding textures is faster now and it seems it doesn't happen without a reason anymore right now. I could not find the folder you mentioned where the generated atlases should be.

    I've another issue. There is a warning displayed about Cross scene references: Cross scene references are not supported: 'Terrain' in scene RusseinerBrueckeTerrain has an invalid reference to '_RTP_LODmanager' in scene Management. This reference will not be saved in the scene.
    RTP seems to work fine though despite this warning. My scene setup has the RTP Lod Manager in a "Management" scene that is always open and the terrains are in other scenes. Is that a problem?

    One last thing. I'm getting this error: Assertion failed on expression: 'm_PreloadTextureAtlasData.size () == m_DetailPrototypes.size (). That wouldn't be related to RTP, would it?

    Thanks again for your excellent work!
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I haven't mentuioned folder, but where you can find it in ReliefTerrain script inspector. Simply select terrain then Combined textures tab button in my script inspector, then atlasing subtab.

    ReliefTerrain script instance needs reference to LOD manager (it's added when not found in scene). If you've got a few scenes loaded one ReliefTerrain object in sceneA could find LOD manager in sceneB, but Unity warns about this reference can't be saved. If it still works - fine. LOD manager is meant to manage RTP shader compilation with given feature set.

    Last issue - I'm not aware about this kind of assertion, so it's probably not mine :).

    Tom
     
    Last edited: Nov 28, 2016
  24. schricke-louis

    schricke-louis

    Joined:
    Feb 11, 2016
    Posts:
    14
    I tried to use water feature in terrain directly but when i start to paint by hold shift it doesn't move, it block
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    RTP version + Unity version please. It might be realted to some editor configuration (or 3rd party plugin) that "steal" mouse/keyboard events in scene view.

    Tom
     
  26. schricke-louis

    schricke-louis

    Joined:
    Feb 11, 2016
    Posts:
    14
    Maybe i set it wrong ? Should i adjust something ?
     

    Attached Files:

  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You should be able to paint over the terrain after entering paint mode (green button). Again - it'
    s hard to reproduce your issue on my side if I don't even know your setup. Does painting work when you don't hold SHIFT ? (you can try it because wholet errain can be either fill with water or dry via buttons exposed).

    Tom
     
  28. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    @tomaszek

    I have been trying to sort an issue on the Stand alone Triplanar. For the replace method at distance, for some reason when the Replace kicks in for layer 2, it replaces layer 2's texture with layer 3's texture (bottom texture for us). This is an issue for us because our Bottom textures are stone or dirt (ceiling of cave or overhang), so as grass on layer 2 is replaced at distance it turns into stone or dirt. :( Is there some place in the code where I could change something so that Layer 2 replaces the distant texture with layer 2 instead of 3, like layer 0 and 1 seems to work( I am using the same texture for 0 and 1 so maybe I didn't notice the issue on those layers)? Thanks in advance!
     
  29. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I have multiple terrain tiles and using RTP, but i can only get Perlin normal to work on the first terrain i add the script to? I dont use a lot of options, holes mostly, no snow or glitter. I made one terrain, made a preset and the applied that preset to the secont terrain tile and then i got no perlin normal on that one : /
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    If you've got the same layer setup on all terrains it makes no sense to use preset as all settings are actually shared via globalSettingsHolder object. You prepare 4 terrains (the same number of layers and layers themselves). Add ReliefTerrain component one by one to each terrain - they will share almost all settings, only global maps are stored per terrain tile. In case you need different setup on terrains place each of them in separate transfrom in hierarchy before you add ReliefTerrain component. You can look at texture which is used as perlin in shader - go to Combined textures tab (in RTP script inspector) / special combined subtab. If, for some reason texture is not correctly present there you could drag&drop the one provided in package (I has been saved to png in my example scene). However - this texture is supposed to be correctly prepared when you visit perlin normals tab in RTP script inspector.

    Indeed, in standalone we don't have method to select route UV blend / replace from shader inspector like on LOD manager script which can manage shader code in RTP_Base.cginc. You need to do it yourself. In your shader find this:

    Code (csharp):
    1.  
    2. #define UV_BLEND_ROUTE_LAYER_0 UV_BLEND_SRC_0
    3. #define UV_BLEND_ROUTE_LAYER_1 UV_BLEND_SRC_1
    4. #define UV_BLEND_ROUTE_LAYER_2 UV_BLEND_SRC_3
    5. #define UV_BLEND_ROUTE_LAYER_3 UV_BLEND_SRC_2
    6. // below routing shiould be exactly the same as above
    7. #define UV_BLENDMIX_ROUTE_LAYER_0 UV_BLENDMIX_SRC_0
    8. #define UV_BLENDMIX_ROUTE_LAYER_1 UV_BLENDMIX_SRC_1
    9. #define UV_BLENDMIX_ROUTE_LAYER_2 UV_BLENDMIX_SRC_3
    10. #define UV_BLENDMIX_ROUTE_LAYER_3 UV_BLENDMIX_SRC_2
    11.  
    This is default routing placed in shader and I've got no idea why layer 2 routes to 3 (#define UV_BLEND_ROUTE_LAYER_2 UV_BLEND_SRC_3) and layer 3 routes to 2 (#define UV_BLEND_ROUTE_LAYER_3 UV_BLEND_SRC_2).

    Most probably I checked something at testing level and forgot to bring it back... :). Correctly default should look like this:

    Code (csharp):
    1.  
    2. #define UV_BLEND_ROUTE_LAYER_0 UV_BLEND_SRC_0
    3. #define UV_BLEND_ROUTE_LAYER_1 UV_BLEND_SRC_1
    4. #define UV_BLEND_ROUTE_LAYER_2 UV_BLEND_SRC_2
    5. #define UV_BLEND_ROUTE_LAYER_3 UV_BLEND_SRC_3
    6. // below routing shiould be exactly the same as above
    7. #define UV_BLENDMIX_ROUTE_LAYER_0 UV_BLENDMIX_SRC_0
    8. #define UV_BLENDMIX_ROUTE_LAYER_1 UV_BLENDMIX_SRC_1
    9. #define UV_BLENDMIX_ROUTE_LAYER_2 UV_BLENDMIX_SRC_2
    10. #define UV_BLENDMIX_ROUTE_LAYER_3 UV_BLENDMIX_SRC_3
    11.  
    ATB, Tom
     
    ryschawy and Tethys like this.
  31. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I am considering using RTP in a World Streamer project. One of their methods is to efficiently stream terrains, is to convert the distant terrains to low poly objects using a tool called "Terrain to Mesh". None of the tools such as "Terrain To Mesh" can convert non standard shaders to textures. I have no idea how UV's are set up on Terrains or the Converted Low Poly objects using this tool.

    I wish to avoid hand texturing thousands of low poly copies by hand if possible. Do you know of a way to easily do this using RTP??
     
  32. TLMultimedia

    TLMultimedia

    Joined:
    Feb 19, 2014
    Posts:
    61
    It's a pity the Birthday sale price of Uber Shader is more expensive than the upgrade price from RTP.
    I wonder why sale prices don't also include a 'upgrade' sale price.
     
    Killersan likes this.
  33. Killersan

    Killersan

    Joined:
    May 27, 2014
    Posts:
    76
    +1
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I might think about it with usage of some orthographic camera that would render terrain top down to
    offscreenbuffer (separately all PBR goodies like diffuse, ao, spec, smoothness, normals) then use these texture simply any PBR shader (like standard shader). RTP does not do it out of the box though, but it's doable with some effort.

    Tom
     
  35. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I have been posting to the World Streamer guys and they brought up 2 points.
    1: That since it is the far distant terrains on the horizon, That all I would need is proper placement of the textures.
    2 That it is beyond their abilities to do it with a third party shader and that I would have to speak with you.

    I have not used your tool as of yet, I have just watched your videos. And it seems that image placement is using your own custom system. This Friday I am starting with your Uber Shader. Then on the following payday I am buying RTP. My budget only allows buying 1 tool a payday. :) But I thought I would give the research a head start since I know I will be using RTP on a very large world with hundreds of terrains. And your help to get this working would be Much Appreciated!

    Here is a video showing their workflow doing this with Unity's Standard Terrain Shader:
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Good deal for people who have none of my products (buy UBER now, then upgrade to RTP). Anyway, it's up to Unity to set the sale price, so - your request is posted on wrong forum :).

    Tom
     
  37. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I think this is why it wont work for me. I use World Streamer and it puts every terrain in its own scene (and its own transform), so i need to use preset to get the same settings. The first thing i checked was of course that the perlin normal texture was in place : ) Everything works fine except for the perlin normal, which is a big thing to reduce tiling.
     
  38. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I'm one of those people that on Friday (Payday) is making a mad dash to buy the Uber Shader before the sale ends. How can I use that to Upgrade to RTP??
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Use saved perlin texture then (to keep stronger reference otherwise perlin tex is scene object that can't be shared across scenes !). You might also need to use terrain materials that are also regular assets (not scene objects generated by RTP script). Simply make material per terrain, assign it to terrain and use ReliefTerrain-FirstPass shader). Such terrain will keep all properties set.

    Simply buy UBER now, then upgrade to RTP. will be $30+$35 in sum. If you've got RTP bought first, then upgrade to UBER you'll pay $85 in sum - sorry no way to make it better for existing RTP users...

    Tom
     
  40. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Wow, simply saving the perlin map seems to solve all perlin issues, did not even have to reassign it. Awesomeness!
     
  41. ArtisticSliz

    ArtisticSliz

    Joined:
    Jan 4, 2014
    Posts:
    40
    I'm sorry if you've already provided this somewhere in this cavernous forum, but could you provide some examples of the way Uber handles refraction? I have three specific examples I'm looking for:

    1. Does it leave awkward "shadows" around objects in front of refractives?
    2. How does it handle stacked refractives, as in one behind another?
    3. What level of impact do refractives have on processing compared to simply transparent metallics?

    Thanks, guys.
     
  42. tubbz0r

    tubbz0r

    Joined:
    May 24, 2014
    Posts:
    72
    Is there support for Unity 5.5? Loaded my scene with the new unity build, entire terrain is now white, some areas are see through :/
     
  43. schricke-louis

    schricke-louis

    Joined:
    Feb 11, 2016
    Posts:
    14
    Yes i press the green button "Begin painting" in Wetmask paint tool
    When i don't hold shift i can move my cursor but it do not paint no texture appear and when i hold shift to paint it's blocks i can't move my cursor
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    RTP3.3e in version to be downloaded in Unity5.5 is available (tested briefly on U5.5.0f2 and it worked). When you upgrade project to U5.5 from U5.4 it will not work. You need to install dedicated U5.5 version.

    Checked RTP3.3e (newest) on both U5.4.1f1 and U5.5.0f2 (RTP has separate packages for these Unity versions). It works for me on example terrain scene. ard to say what might be the cause for you, I'm on Win7. Does water masking works at least for you ? In worst case you could provide it from photoshop directly to RTP inspector.

    Tom
     
  45. AndyNeoman

    AndyNeoman

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

    Is there something we have to do to get the 5.5 version or is it automatic?

    I'm also now having a problem with substances (not sure if its related) when i click get textures they are not importing correctly. Height is white and detail is black. When i look at the underlying textures in the .sbar file they look correct.
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    If you download/update package in Unity5.5 AssetStore should provide you with correct version (dedicated to U5.5). Subastances get stucked (very often). I found the way to reimport substance material (right click+reimport) in project view then try again. Make sure substance output is set to RAW. If it still gives wrong output you can try to save textures right from substance to TIFFs directly (small gear wheel at the top right corner of substance material inspector).

    Tom
     
    AndyNeoman likes this.
  47. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Getting a couple of errors and all white textures.

    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 'Relief Pack/Terrain2Geometry': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(523) at /UnityDeprecated.cginc(133) (on d3d9)

    I am using TC2 but not had a problem having the textures on before.
     
    Beloudest likes this.
  48. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    245
    Me too this issue, it seemed to happen after the Cinematic Effects were updated. Might just delete them as a test.
     
  49. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    245
    Yep white terrain here, checked the Example Scenes too - getting the above errors also. Version 5.5.0f3. It's terrible timing for me. Need to create some footage for a pitch. Perfect :(
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I've been reported about this error but I can't reproduce it. Might it be dx9 only problem ? Check 2 things:

    1. disable d3d9 platform on build
    2. make sure you've got RTP3.3e for U5.5 installed (look at _verinfo.txt file in ReliefPack folder).

    Tom