Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. joe_ftg

    joe_ftg

    Joined:
    Nov 9, 2015
    Posts:
    42
    Okay, I realised that it wasn't displaying the normal maps so I hit Refresh on one the layers' normal texture, which recreated the combined bumpmaps. Not sure why it had lost them as I haven't changed the layers for weeks but it looks correct again now.
     
  2. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @tomaszek It seems you weren't able to reply to my other post so I'll have to post here. You asked me what I'm trying to do with your Tessellation and I ask simply if your tessellation shader can allow painting like this:
    I really want to be able to do this with RTP and get snow/water and have the ability to control brightness, specular etc for each texture. Is this currently possible with RTP? I haven't seen this in any RTP video demo.

    In the video I'm only using 4 Displacement textures.. The shader just needs the depth files, terrain size and depth adjustments then I can actually paint the terrain with the displacement shaders to any location rather than just using a global splat map that has some displacement in it.
     
    Last edited: Apr 8, 2016
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Hmmm, you could check if adjanced terrains use the same or another globalSettingsHolder reference. Are they placed inside separate parents in hierarchy ? If not, try to remove RTP cscript from the terrain that doesn't give you detail normalmapping (it looks like it doesn't). Then reapply it again. Look at combined textures tab if combined normals textures are in place.

    Tom
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794


    6:28 - "displace detail heightmaps" in LOD manager. "Depth files" you're refering to are simply detail heightmaps set per layer in RTP. Remember to expose height info in alpha channel. You will use it in addition to displace/smooth terrain mesh by global height&normal texture. It is shown on the above video as well. With such global tessellaion you can remove terrain LOD popping and reduce drawcalls (which shader you're refering to probably can't do).

    Tom
     
  5. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    thank you for info. how about when my terrain is so big that it will slice it to smaller meshes should i but rtp component to every mesh?
     
  6. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8

    I'm using speedtree models, so it's speedtree shader for unity
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    yep - RTP component to every mesh - like on terrains.

    If object you're refereing to uses not RTP shader but Unitys - I can't help.

    Tom
     
  8. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @tomaszek I've tried everything in the video although that video was for an older RTP it doesn't show paint strokes. I have the textures now correctly displaced by changing the depth map to alpha 8 but if I choose the unity texture it doesn't show any paint displacement painting using the terrain brush. I'm using 4 texture slots and they are all the same size (in my case it's 4K) Tried refreshing and compared the tessellation video with this one
    to get an idea of how to start painting if there was something I missed but I am stumped. The other terrain shader does have a smart LOD for Tessellation and was very easy to set up.

    Correction, with RTP its still not displaced..it just was good looking normal mapping, tried adjusting parallax settings and it just seems to stretch the textures -but yes painting doesn't work either unting the Unity terrain painting tool. I just remembered you guys talking about a bug fix.. -might be the issue.
     
    Last edited: Apr 9, 2016
  9. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    I am having a problem with a terrain. whenever I add relief terrain pack script. it adds the _RTP_LODmanager but my terrain turns white. I have no errors no nothing. unsure why this is happening. i have the latest RTP.

    edit seemed to work again suddenly. hmm after I went into your example terrain scene to check if urs worked. and went back to my scene its fine now. hmm


    now its not reacting properly to light.

    https://www.dropbox.com/s/7d7nu3el66qkje2/lightissue.jpg?dl=0

    k seems to be fixed. updated to 3.3d.
     
    Last edited: Apr 9, 2016
  10. xiaden

    xiaden

    Joined:
    Apr 11, 2016
    Posts:
    1
    So, I'm probably missing something basic here, but RTP doesn't appear to be working correctly for me. Checking Myself:
    I started a new project,
    added just this asset,
    created a terrain,
    added eight textures,
    attached RTP engine,
    LoD object is auto initiated,
    and recompiled just like that... to a pink "broken shader" terrain.

    getting an error of:

    Shader error in 'Relief Pack/ReliefTerrain-FirstPass': maximum ps_5_0 sampler register index (16) exceeded at Assets/ReliefPack/Shaders/ReliefTerrain/RTP_Base.cginc(661) (on d3d11)

    Compiling Fragment program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON RTP_PM_SHADING
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING

    Did I miss something there, or what is going on? I should be able to recompile with default settings :/
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Opened RTP in U5.3.2. Compiled with tessellation and detail displacement (look at tess2.jpg attached). It works. We can see parallax props influencing displacement on tess1.jpg screenshot.

    When you're in tessellation mode you can't paqint heights interactively anymore. Wokflow is different. First you make terrain and construct its shape. Then you prepare height&normals texture like on my YT video above (tessellation). Then you compile shaders to use tessellation and apply prepared height&normal texture as global map that defines both - terrain shape and its normals.

    Tom
     

    Attached Files:

  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Which set of features do you use in LOD manager ? Seems there are too many textures requested. Also - in Unity 5.4beta that's below beta 10 Unity requests at least 5 textures internally which makes using RTP difficult - almost no setup can be compiled. They fixed this on beta10 and up though. Still you can't request too many features at once.

    Tom
     
  13. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    Last edited: Apr 11, 2016
  14. Jinppa

    Jinppa

    Joined:
    Apr 11, 2016
    Posts:
    6
    Thanks for this amazing package tomaszek!

    I had the same problem as Leetha did, when using RTP with Substances. With the newer Substances (versions 3, 3-1 and 3-2) you will get that pinkish normal map. For some reason, using older version 2.0 Substances (Bitmap2Material_2.sbsar) with RTP works and produces normal normal maps (pun intended).
    I'm a newbie so I don't know why that works or what's changed between the Substance versions, but I hope this information is of any value to you. :)

    With best regards,
    Jinppa
     
  15. Lasse-Loepfe

    Lasse-Loepfe

    Joined:
    Mar 28, 2014
    Posts:
    25
    Hi,

    i'm using now the new glitter function, which is very nice indeed. However there is a point that I don't know how to do it. I woudn't want the glitter to apear in shadowed areas... is that possible?

    Best
    Lasse
     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    If the tool you're refering to can do vertex color painting with normalization (when you paint red channel, the others should get dimished so the sum of color values is =1) - then you can use it with RTP standalone shader. RTP used on mesh (see my example scene with the same "terrain" as on regular terrain scene) - you need controlmaps which are textures - like in the case of terrain (splat control maps).

    I can't test it even for B2M3 - I've got lower license (and B2M3 is pricy...) with no way to upgrade from 1.6 at lower cost. You can always export textures manually using b2m functionality (small gearbox at the top right corner of b2m inspector).

    glitter adds overbright to specular color output, so what you see is ambient light boosted several times on sparks. Thats the color of glitter. Alpha channel of glitter makes some parts more glossy. If you reduce glitter color and leave glitter alpha higher you will have glitter on non shaded areas only - but only at certain angles looking against the light (light regular specular highlighs are produced).

    Tom
     
  17. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    424
    I've been running into the issue where the perlin noise appears black - last time it worked again after i accessed the Settings - Perlin Tab, but this time i just can't get it away. I've tried: Recompiling, Reloading Scene/Unity, Removing/Adding the Perlin Map, Refreshing...



    Any ideas?
    Thanks
     
  18. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    can standalone shader use more than 4 textures?
     
  19. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    is this blackness moving with the character/cam?
    last time i had this i had set the height extrusion too high (using pom).
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    It looks like perlin normals are applied, but there is probably no ambient light working on your scene. Does perlion settings (tiling for example, strength per layer) react to your control ?

    If not try RTP3.3d from my server (it's necessary for multiterrain support).

    http://www.stobierski.pl/unity/RTPUpdate.php

    No. It can't.

    Tom
     
  21. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    424
    @tomaszek well no the normals are not applied at all. It just makes everything darker. Sorry that was a bad screenshot, it looks like perlin noise because there are actually 2 textures - and one of them goes dark.

    I've tried removing/adding the perlin texture, without success.

    I'll give 3.3d now a try. I am using multi-terrain.
     
  22. TDH_DrThirteen

    TDH_DrThirteen

    Joined:
    Jul 3, 2014
    Posts:
    42
    Hi Tom,
    I kind of have a unique problem with RTP and Dynamic Batching.
    I'm using Dynamic Batching for my Speedtree Billboards. But the problem is that as soon as I enable Dynamic Batching and use RTP at the same time the profiler shows that Batch.CmdDrawDynamic uses a lot of GPU time. When I switch the terrain shader to the built-in one the GPU time of Batch.CmdDrawDynamic changes from 1.6 ms to around 0.3.

    Even with just two Speedtrees on the terrain this problem still occurs.
    I am not sure if that is a problem with RTP or if it is a Unity problem.
    Do you know anything about that issue?

    BTW I'm using Unity 5.4b14 with RTP3.3c.

    Thanks in advance.
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    RTP is just a shader. More complex than built-in, but batchingST billboard treesshould theoretically has nothing to do with terrain surface shading.
     
  24. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Hey : )
    Using your awesome shader in another project now but have some issues with lighting of the terrain.
    Im using Unistorm package as a light-source and all is well at lower lightlevels during the night and morning, but as the intensity increases the terrains light gets capped somehow so in the middle of the day all the objects are fully lit but the terrain looks like its in the shade, not getting as much light as the rest, any idea why this is happening?
     
  25. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592

    Thanks, I have already Unity 5.3.3, and with the latest RTP update (still 3.2e) it seems to be no more black switching terrains available.
    But the problem with "alphamapTextures" is again available. camel82106 gave you the fix for
    "PropertyInfo info = terrainDataType.GetProperty("alphamapTextures", BindingFlags.Instance | BindingFlags.NonPublic);"


    where NonPublic must be changed to Public.
     
  26. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    245
    @tomaszek

    Hey Tom,

    I know that I've asked about that before but I'm not sure that I understand how it works and may work in the future. Anyway I would like to ask about the progress and plans if you don't mind :)

    Do you think that with array textures support we can get like 16 (4 splatmaps) or even more layers in future RPT versions with similar features as at the moment for 8 layers (heightblend between all layers, POM, global maps, perlin etc.)?
    I have no idea if it would require more passes than now (afaik it's 8 layers in one pass).

    I know that you said that coverage could be problematic for higher number of layers. But what if someone can sacrifice the performance/memory impact that would be generated by more splatmaps (and maybe more passes at the same time, just guessing here) to get more layers with RTP features.

    I'm not even thinking about some crazy number of layers. But possibility to use more layers than the actual 8 (2 splatmaps) (so maybe like 16 (4 splatmaps) or 24 (6 splatmaps)) with RTP features would be great and probably also sufficient for most cases.

    Thanks
     
    Last edited: Apr 14, 2016
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Forward or defererd ? In deferred you could check how separate gbufgfers look like. Maybe there is something wrong with normals. In RTP3.3c I changed lighting specular model to blinnphong (to remove specularity on completely rough surfaces). In forward terrain object might be lit different then comparing to the rest of a scene.

    alphamapTextures property got public in certain Unity version. In latest RTP3.3 (take 3.3d from my server) it should work. As RTP3.2 uses quite "custom & legacy" lighting I won't put much effort into mainteing this. Rather focus on making 3.3 working on U5.3 and up.

    I discussed it already. Such things would be opened for implementation in U5.4 when texture arrays and uniform properties for shaders would be working fine. U5.4 is still beta. I'm much focused on my team game project now, but at some stage I'd love to give you RTP4 with all these bells and whistles , slick, modern "no fuss" terrain shading tool.

    Tom
     
    docsavage and sqallpl like this.
  28. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    245
    Great to hear that. Thanks!
     
  29. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    hey wanted to ask for confirmation, I can't use the geoblend tool with LOD groups correct? Also I find it a bit finicky even with base models. for example I will pick the model add a geo blend script to it, then select the terrain rebuild, and try to paint to blend (even with a collider) and nothing happens. no error is shown though. thoughts?

    nevermind solved it. :) though it seems to be a bit iffy on when it wants to work.
     
    Last edited: Apr 15, 2016
  30. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    i updated my layers to 8 on my terrain now my terrain is glistening/shiny. thoughts on what i did wrong?
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    In deferred you need to go for 8 layers rendered in first pass (look at LOD manager First Pass options - 8 layers)

    Tom
     
  32. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    I think I am fine with the 4 pass :p think it may be overkill for this terrain project :p but good to know when I start my new project with terrain. thanks :)
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    4 layers will work definitely faster. You may look at sticked geom blend feature when you would need to decorate terrain in some places with different texture:



    Tom
     
  34. Apolyon6k

    Apolyon6k

    Joined:
    May 5, 2013
    Posts:
    32
    Hi,
    I have a few strange artefacts on my terrain that I cannot figure out:
    Grab 20160415224407 w1900h1200 x612y136z-904r280.jpg Grab 20160415224424 w1900h1200 x600y135z-898r28.jpg Grab 20160416194214 w1900h1200 x717y181z-439r309.jpg Grab 20160416194241 w1900h1200 x754y158z-391r31.jpg Grab 20160416194254 w1900h1200 x778y155z-397r6.jpg
    The first two are difference between original and tessellated terrain (I assume). The other ones started to appear after the latest update (3.3d).

    Another thing I was unable to do was getting flowing water to appear on my terrain. In an early test with RTP I got flowing water when I filled the whole terrain with water but at some point it only got wet, not sure what I did to change that.
     
  35. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,311
    Hi, I decided to try out Tesselation but my detail grass is floating above the terrain wherever there is a ridge or change in steepness. Are there any tricks to fix this?
     
    Last edited: Apr 16, 2016
  36. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,311
    One more question... if I go to terrain settings and change the Material to something other than RTP, and then click on something else, it gets automatically set back to RTP. Is there a way to stop this from happening, so that I can temporarily use a different shader? (In this case I need to be able to see the actual underlying terrain mesh without tesselation without having to recompile the shader to turn on/off tesselation every time.)
     
  37. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    oh yeah good idea! :p besides its a desert scene in new mexico, so i would imagine 8 layers would be overkill lol
     
  38. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    wanted to ask, does rtp support depth maps? for terrain? if so, how do I enable it??

    Also, does RTP support automatic rock placement, or grass shrub placement via a splatmap or similar? or how is it done if it is available.
     
  39. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    hey i noticed my base map distance is set to 100. how do I enable it to draw out further?
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Depth maps ? You mean for parallax ? If we're on the same page - put your depthmaps into "hight map" slot of each layer. This is how we name them in RTP. Your maps need to be of the same size and have alpha channel where dpeth/height data is stored.

    For functionality of placement we're talking about different product. RTP is about terrain shading, not terrain managing. For such purpose you might look at solutions like TerrainComposer.

    It's intentional and it's set by RTP. Your terrain IS drawn fine above the limit, but with less detail. It's not used like Unity does where above basemap distance you've got solid diffuse color.

    Tom
     
  41. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    am I able adjust that limit? to say 200? if so where would I be able to enable or change that?
     
  42. GameTechnix

    GameTechnix

    Joined:
    Oct 5, 2015
    Posts:
    84
    Hi Tom,

    Quick question, I know you have had this many times before.

    I just installed RTP and it works fine. However at some stage it loses the terrain materials and I get pink textures in the near plane and black textures at a distance. Sometimes it comes good by itself and sometimes not.

    Is this a common bug? or maybe something todo with my Radeon 290x drivers?

    Do you know what the fix for this is? (apologies if it has been answered somewhere before, its a big thread!)
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    You can limit parallax extrude depth using "Layer extrude reduction" checked in LOD manager, but this is advised to make heightmaps that works out of the box. The option I'mr efereing to is for convinience of tuning terrain parameeters. At the end - bake values in heightmaps directly (we sace a bit of unnecessary calculations in shader shader).

    Give me what's the output of ReliefTerrain-FirstPass.shader inspector. Is it compiled fine ? The same for other shaders in the same folder - are they compiled fine ?

    Tom
     
  44. GameTechnix

    GameTechnix

    Joined:
    Oct 5, 2015
    Posts:
    84
    Yes there is a compile error:

    Shader error in 'Relief Pack/ReliefTerrain-FirstPass': Program 'frag_surf', error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers (on d3d9)

    Compiling Fragment program with LIGHTMAP_ON DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON UNITY_HDR_ON RTP_PM_SHADING
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    You're trying to compile with too many features at once. 8 layers mode also consumes more than 4 layers (try 4 layers tih atlasing to save 3 texture samplers). Also - in Early U5.4beta (<beta10) you will experience huge problems with compiling any LOD manager setup because Unity uses up to 7 textures by itself. In later betas it's fine, but only in DX11. For dx9 we still have problems with resources available.

    Tom
     
    GameTechnix likes this.
  46. GameTechnix

    GameTechnix

    Joined:
    Oct 5, 2015
    Posts:
    84
    Thanks Tomaszek,

    I disabled baked GI and recompiled, all seems to be working again. Seems to be a sampling issue.
     
  47. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    857
    why does my terrain start off black, I have to go into your demo terrainscene.unity and back to my scene to enable it again. thoughts?
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Attach the same script as you've got on my example scene placed on main directional light. You're in deferred, aren't you ? :)

    Tom
     
  49. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,311
    Re-asking: Is there any way to temporarily turn off either: A) Tesselation or B) the RTP shader entirely, without needing to recompile the shader? I'd like to be able to switch between seeing the actual terrain mesh and the tesselated version in the editor, and currently if I change the shader on the terrain settings to something other than RTP, it works for a second but if I click anything else, it automatically sets itself back to RTP.
     
  50. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Adda copy of the terrain without tessellation, that you can enable/disable : p
     
unityunity