Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Ive got 5.5 version

    Edit :- removed d3d9 still got white textures.
    Edit 2 :- still getting these compile errors even though d3d9 has been removed from build. These errors appear when trying to recompile shader.

    Shader error in 'Relief Pack/Terrain2Geometry': 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 'Hidden/Relief Pack/ReliefTerrain-FarOnly': 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)

    Shader error in 'Relief Pack/Terrain2Geometry': function "Unity_GlossyEnvironment" is already defined at /UnityStandardBRDF.cginc(288) at /UnityImageBasedLighting.cginc(520) (on d3d9)
     
    Last edited: Dec 1, 2016
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In player settings, other settings there is automatic targets option, you can make it manual and remove dx9 variant. But it's not necessary here. Use it when you try to push RTP with higher number of features at once which often ended up with excceeded sampler texture limit. Example scene opened in Unity 5.5.0f2 (I believe f3 doesn't change anything here) works both in DX11 and in DX9. Make sure you're using RTP3.3e _for U5.5_ version.

    Tom
     
  3. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    Hi Tom,

    Definitely using 5.5 version and have removed d3d9 in build settings but the errors still appear.

    Tried removing all options but still fails to compile shaders.
     
  4. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi Guys, had the same issue with white terrain on 5.5 here. The asset store kept serving me 3.3e built with 5.4.

    Go to:

    C:\Users\YOURNAME\AppData\Roaming\Unity\Asset Store-5.x\Tomasz Stobierski\Editor ExtensionsTerrain

    and delete the local package.

    Go back to the asset store and redownload. It should be correct.

    Works on DX9 and DX11

    EDIT: Also worth going to a new scene in your project and fully deleting the old RTP folder.
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Support page for me as publisher links to this "main" product forum which is RTP (misleading I know...), but on UBER product page:

    https://www.assetstore.unity3d.com/en/#!/content/39959

    there is a link to "Forum & demos"

    https://forum.unity3d.com/threads/uber-standard-shader-ultra.335493/

    Where you can find webplayer demo:

    http://www.stobierski.pl/unity/UBER.html

    For performance - each refractive object grabs previous output screenbuffer state as texture, so when transparent objects are correctly sorted back to front (they are supposed to be done by Unity itself) stacked refraction should work. Don't ask me if it's "fast" or not. Depends on too many factors, hardware used, scene setup, number of objects, number of lights (transparent objects are rendered in forward lighting path), depends on your expectations...

    If you'd like to become one of my happy users - feel encouraged :) - look at this:

    UBER_refr1.JPG UBER_refr2.JPG

    ATB, Tom
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I intentionally marked U5.5 version in verinfo.txt file placed in ReliefPack folder for ussers to be sure they have right version - as @Karearea mentioned above Unity sometimes get stucked and even if you're in Unity 5.5 can give you U5.4 package version. You might try also to redownload package in AssetStore page (in Unity) then import it again (deleting old RTP versio).

    Tom
     
  7. ArtisticSliz

    ArtisticSliz

    Joined:
    Jan 4, 2014
    Posts:
    40
    upload_2016-12-1_13-25-50.png

    Since my question is here, I'll continue here. (Let me know, Tom, if you'd prefer I move it to the Uber-specific page.)

    It seems to me that the white bleeding into the refraction is not a reflection of the object in front of it, but a refraction of the screen grab rendering the front statue as part of the refraction. Am I wrong? Is it simply a reflection that is rendered strangely?

    There are no backface reflections/refractions on these objects, but is it possible to make that happen? Can you double-face refractive objects with your shader?

    Otherwise, the multi-object refraction looks fantastic. I'm really excited by it.
     
  8. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    Thanks for that you are a star. Pulling my hair out because the readme said 5.5 so i didn't question it. All fine now
     
    Tethys and Karearea like this.
  9. TechDeveloper

    TechDeveloper

    Joined:
    Sep 5, 2016
    Posts:
    75
    same happened to me.. I just wish I'd remembered this issue before pulling my hair out.
     
    Tethys likes this.
  10. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Thanks for letting me know about being able to upgrade during the sale. I just bought Uber and RTP and couldn't be Happier!!! :)
     
  11. karelium

    karelium

    Joined:
    Oct 11, 2014
    Posts:
    5
    Set that texture to Bilinear filter and increase "Aniso" level to 4 or higher. The lower level, the faster render so don't just set it to the highest value in first place.
     
  12. TLMultimedia

    TLMultimedia

    Joined:
    Feb 19, 2014
    Posts:
    61
    Hi Tom
    I appreciate its out of your hands. I wasn't really requesting but wondered if it may have been something you could opt yourself. I did mention to a Unity rep at our user group (last night in fact) the issue of sale prices not always reflecting in 'upgrades'. I have RTP and was looking with interest at UberShader as it happens.
    I like the look of UberShader for some of the fancier features such as SSS. I do use Shader Forge but it never hurts to have alternative shader solutions.

    Best - Tim
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Unity first draws opaque object, so statue being in the front is present in screen buffer while refraction happens on transparent objects drawn later. It's _approximate_ (to fool one's eye if you prefer) solution. Maybe in next 5 years full realtime raytracers hardware will be available, but still - not now :).What I implemented was to have as eye-candy refraction effect as possible with moderate cost.

    Backface reflection - we don't have any visual data avaialble. SSSR solutions sometimes take into account geometry not seen on screen to deliver reflection data to objects, but thats definitely expensive...

    So - for scientific like comparisons forget about UBER, for pleasing gamers - consider it as working solution.

    Tom
     
    Last edited: Dec 2, 2016
  14. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    the white terrain issue comes back once you try to refresh the terrain shader in the scene
     
  15. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    nevermind it was snow
     
    hopeful likes this.
  16. Lacvapps13

    Lacvapps13

    Joined:
    Oct 18, 2016
    Posts:
    6
    Hello, when I switched to unity 5.5 I re downloaded your asset, uninstalled and reinstalled but now if I try to do 8 layers in the first pass this happens and basically any layer in 5-8 is black on the inside and the edges are colored. What did I break?
     

    Attached Files:

  17. osmondmcleod

    osmondmcleod

    Joined:
    Jan 6, 2016
    Posts:
    5
    Hi Tom

    Thank you for your great RTP asset. I am now using it on my second game, but i have an issue i need your help with

    I set up my terrains following your video. I have a global normal map i would like to use

    when i go into LOD Manager and enable global normals and recompile, the global normal option does not appear in the global maps section

    I would rather not use tessellation as i put a lot of custom detail into my normal maps.

    Can you please help me get the normal map option back onto global maps tab? I need to be able to just drag and drop my global normal. but the recompile does not seem to work when i go back to the terrain and go settings/global maps. What am i missing?

    Looking forward to your reply. Im sorry for the PM. I could not post in the forums for some reason.



    thanks again.



    Glenn
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Use either 4 or 8 layers. Then, if you['ve got 8, set * layers mode" in LOD manager and recompile shaders it should work.

    When tessellation is active there is no global normalmap available (because tessellation texture stores both - global heights and normal data). Otherwise when you turn off tessellation in LOD manager you should be able to check "global normalmap" in LOD manager as separate option. After recompilation when you select terrain ReliefTerrain inspector should give you global normalmap slot under global maps tab.

    Tom
     
  19. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Hello, how much texture sample your asset support?
     
  20. osmondmcleod

    osmondmcleod

    Joined:
    Jan 6, 2016
    Posts:
    5
    Hi Tom

    I understand this. Tessellation is the first option in the LOD Manager and this is what i am turning off.Even with this off, and global normal enabled, and recompiled, the global normal option is still not available under global maps
    It seems the LOD manager is not picking up that the Global Normal map option is selected.

    Thanks.

    EDIT:

    I started a new project and went through the set up process again. Adding my 4 textures then the RTP component. Everything worked this time. The only difference is the 4 textures i added in the build i had problems with were the same default checker texture that came with unity. Maybe this had something to do with it and the placeholder textures I used somehow didn't allow the layers to be generated for RTP property. I don't know, but i am glad its working now.
    Thanks Tom. So glad i can keep working with your asset.
     
    Last edited: Dec 3, 2016
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP3 - up to 8 detail layers. Are you asking about how many times RTP samples texture (for sake of performance comparison) ?

    Incoming RTP4 - virtually unconstrained (but using texture arrays of dozens textures would eat your GPU RAM quickly :) ). Don't ask about RTP4 release date (ready when it's ready).

    Tom
     
    Seneral likes this.
  22. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    I've upgraded to 5.5 and got white terrains (using 3.3e *for 5.5*).
    Fixed by deleting RTP and reinstalling as @Karearea suggested.

    But then I committed the upgraded, working 5.5 project to SVN, and updated the changes on my second machine. White terrain again.
    Tried rebuilding shaders, got the d3d9 errors again.
    Tried deleting Library folder and doing a full project reimport, still broken.
    Deleted RTP folder and reinstalled to fix it, and again committed the changes to SVN.

    Now my environment artist has updated to 5.5 and has the white terrain.
    How can I fix this for my team so that it will propagate correctly through version control? I don't want to walk them all through reinstalling RTP...
     
  23. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    I *think* that they just need to delete the "Relief Terrain" folder to force Unity to flush it's metadata, then let SVN repopulate the folder and Unity re-import it. Still irritating, but seems like a Unity metadata issue rather than anything you could fix Tom.
     
  24. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    I want dynamic decal and tire tracks on my terrain, what would you recommend that would work with your shader?
     
  25. schricke-louis

    schricke-louis

    Joined:
    Feb 11, 2016
    Posts:
    14
    Hi, i did some puddles with Water feature but i can't find how make reflection on water

    Thanks
     

    Attached Files:

  26. Yokogeri

    Yokogeri

    Joined:
    Oct 14, 2013
    Posts:
    21
    Hi Tom - just a heads up:

    After 2-3 hours of debugging i noticed that creating a tesselation map with the RTP tools automatically sets the created tesselation texture to sRGB. This makes the tesselated terrain look extremely choppy and ugly.

    A simple fix is to manually disable sRGB in the texture, even though i would have prefered the tool to disable this automatically.
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Thanks for the tip.

    You can use any existing decal solution or RTP geom blend shader sticked to the ground. However sticked RTP geom blend objects are rather editor like and not runtime. You could get my editor code and put it into your custom decal solution though. in RTP it's nothing more than sticking transparent geometry to the terrain.

    Your puddles would simply get reflection probe (main one). If you'd like to have it dynamic you'd need to go for screenspace realtime reflections (part of Unity's cinematic post fx package available for free on AssetStore). Render terrain in deferred then (not use 4+4 setup in case you've got 8 layers, use 8 layers in first pass instead) and you should get reflected things intersecting puddles.

    I need probably to check it again in U5.5 because Unity changed how textures are managed to be linear. Yes - height&normal map for RTP tessellation need to be sample linear with no gamma bias.

    Tom
     
    schricke-louis likes this.
  28. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Just about to post tessellation feature is not working properly on 5.5. Heights are completely different to the terrain i presume it is something to do with the texture issue above.

    EDIT:- IT IS! disabled sRGB and everything is wonderful (Bar the hour of frustration)
     
  29. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Hi,
    we notice some strange streaks and z-fighting on a geom blended mesh.
    Regarding to older posts this has been an issue with opengl and/or deferred.
    We are on the latter. Is this still an issue in the newest version (which we haven't upgraded to, I think, yet).
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's more like static batching realised different way for underlying geometry (that's "terrain like") and overlying geom blend mesh. Make sure this is not the issue on your side.
     
  31. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Thx, static batching was it. So we cannot rely on static batching for blended meshes? I don't suppose dynamic batching will work for our meshes since they probably end up having too many vertices.
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You can, but do it yourself manually like I presented on my geom blend YT video. This way underlying and overlying can be grouped the same way giving the same vertex pos results in world/screenspace (thesetiny inconsistencies gives this zfight effect).

    Tom
     
  33. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    Hello,

    We are using RTP for terrain that is generated at runtime. I generate a global normal map at runtime but I think I am doing something wrong because it does not quite match the terrain normals. I think my conversion from the terrain normal to color for the global normal map might be wrong.. Here is the code I use for conversion:
    _x and _y are from 0-1 and xx and yy are in texels

    norm = sourceTerrain.terrainData.GetInterpolatedNormal(_x, _y);
    _Nx = Mathf.RoundToInt(Mathf.Clamp01(norm.x * 0.5f + 0.5f) * 255.0f);
    _Nz = Mathf.RoundToInt(Mathf.Clamp01(norm.z * 0.5f + 0.5f) * 255.0f);
    globalNormalMaskTexels[yy * width + xx] = new Color32(255, (byte)_Nz, 255, (byte)_Nx);

    Kevin
     
  34. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,267
    I used RTP today for the first time and it's awesome, especially to get something started without knowing anything about the asset.

    I do have a little wish list though, if I may:

    * Allow disabling of the gui (LOD manager) in the terrain example scene. I didn't find a property in the inspector, so I just removed the code for it.
    * More examples ;)
    * I bought UBER and RTP. So a snowing scene would be great to have in addition to the snow covered terrain scene in RTP.

    Thank you very much for you consideration :)
     
    Last edited: Dec 12, 2016
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    At first glace you do it correct, but maybe texture (yy) scanlines are inverted ?

    Generally RTP and UBEr would need some uniform global weather controller (to cover UBEr objects and RTP objects simultaneously). Now they are controlled separately.

    Tom
     
  36. hmroz

    hmroz

    Joined:
    Jan 28, 2014
    Posts:
    5
    Hi Tomek,

    I have some problems with restoring preset and refreshing terrains ( RefreshAll(), RefreshTextures()). Everything works fine in the editor but when I build the game, calling those methods makes all textures look gloss, turns off snow and blend replace etc.

    It looks like it turns off rtp and changes material to the standard one? I use Unity 5.4.3 and RTP 3.3e.
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Could you give me a few steps to reproduce ? Like: example scene, make 2 presents, make a build with button to switch between presets.

    Tom
     
  38. hmroz

    hmroz

    Joined:
    Jan 28, 2014
    Posts:
    5
    It can be seen in RTP example scene. I just created simple preset that changes sand saturation and add this code in Update:

    if(Input.GetKeyDown(KeyCode.R))
    {
    Terrain terrain=(GameObject.Find("Terrain").GetComponent (typeof(Terrain))) as Terrain;
    ReliefTerrain script=terrain.GetComponent(typeof(ReliefTerrain)) as ReliefTerrain;
    ReliefTerrainPresetHolder preset = script.GetPresetByName("TerrainPreset");
    script.RestorePreset(preset);
    }

    After pressing R the first time, nothing happens (I don't know why - both in build and editor) but at the second time it makes a mess with textures (only in build, it works fine in editor).
     

    Attached Files:

  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yes, found it. Using presets in build is problematic as I clear editor unused textures refereces in ClearAuxTerrainTextures.cs

    Open this script and find this place (at the end):

    Code (csharp):
    1.  
    2.   if (terrains[i].presetHolders!=null) {
    3.   for(int k=0; k<terrains[i].presetHolders.Length; k++) {
    4.   if (terrains[i].presetHolders[k]!=null) {
    5.   terrains[i].presetHolders[k].BumpGlobal=null;
    6.   terrains[i].presetHolders[k].SuperDetailA=null;
    7.   terrains[i].presetHolders[k].SuperDetailB=null;
    8.   terrains[i].presetHolders[k].TERRAIN_WetMask=null;
    9.   terrains[i].presetHolders[k].TERRAIN_ReflectionMap=null;
    10.   terrains[i].presetHolders[k].Heights=null;
    11.   terrains[i].presetHolders[k].Bumps=null;
    12.   #if !UNITY_WEBGL
    13.   terrains[i].presetHolders[k].Substances=null;  
    14.   #endif
    15.  
    16. //  terrains[i].presetHolders[k].controlA=null;
    17. //  terrains[i].presetHolders[k].controlB=null;
    18. //  terrains[i].presetHolders[k].controlC=null;
    19.   }
    20.   }
    21.   }
    22.  
    23.  
    You can comment it out.

    After applying restorepreset you can add script.globalSettingsHolder.RefreshAll(); to port script variables into terrain material.

    Tom
     
  40. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    I am trying to update all our RTP textures with a different size. I am finding this REALLY HARD because when I try to change or even remove any normal map, RTP reports a size mismatch and instead opens the texture import properties for the paired normalmap.
    Can I disable this feature while I update all the textures? Obviously they will all match *when I'm finished*.
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Don't keep RTP script selected when you modify normal texures in your project. "When you finish" you can click refresh at all pairs (for normsl) / quads (for heights) for RTP to rebuild combined textures. Sure you can find it in ReliefTerrainEditor.cs and disable actions when texture reference changes in inspector (at your own risk :) )

    Tom
     
  42. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    Sorry, I don't understand how I can NOT select the RTP script when I'm assigning new textures on the RTP script?

    However, I've hacked it so that PrepareNormals() returns success even if it fails to combine normals, allowing the paired textures to temporarily mismatch. When I update the other half of the pair it sorts itself out. Thanks for the pointers!
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    This is what I love - users who can manage some small specific issues themselves :).

    Tom
     
  44. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Hi,
    I am getting an unshaded geometry blended mesh here.
    The project is on Deferred, Linear, 5.4.0.p1.
    The mesh in question was painted on the terrain with your geometry blend tool. Whenever I save the scene or focus another application instead of the Unity editor and head back to it the mesh doesn't shade properly anymore. Looks like it is losing the colormap. Uppon inspection though the material itself looks ok.
    Hitting the sync button solves the shading issue. But it doesn't survive the "save scene" event.
    rtp_geomblend_shading.gif
     
    Last edited: Dec 14, 2016
  45. Yokogeri

    Yokogeri

    Joined:
    Oct 14, 2013
    Posts:
    21
    Hi Tom,

    Another heads up: RTP does not seem to work in the newest Unity Beta 5.6.0b1 when building the game. Not that i expected it to just work perfectly out of the box in the new beta - i just wanted to highlight this.

    It works fine in the editor, but seems to downgrade to shader model 4 or 3 when playing the game, turning the tessellation off and making the terrain look generally bad. I've tried both forward and deferred rendering, with the same results. This problem occured when using Vulkan as the main graphics API - i cannot confirm that the same result happens with DX11.
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's known issue, because not all RTP properties used for shading can be serialized by Unity. On save they are lost, but this is only editor problem. On build this shouldn't be an issue.


    Too early to make things working with first beta, but thanks for sharing :).

    Tom
     
  47. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    im trying to cut hole in a terrain but it remove entire chunk of terrain (no matter the size of the brush):
    upload_2016-12-14_23-24-42.png


    Do you have any idea what could cause this ?
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Your global colormap is of that small resolution ?

    Tom
     
  49. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Hi Tom,
    we made a build but the issue also persists within the build.
    We are still using RTP 3.3d.
     
  50. the3dhermit

    the3dhermit

    Joined:
    Mar 25, 2014
    Posts:
    10
    hi i'm using last version of unity an last version of rtp, when i'm applaying rtp engene script my terrain gets all white, and recompile shaders button dose nothing. http://prntscr.com/djfqkv