Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. Bigpete591

    Bigpete591

    Joined:
    May 7, 2013
    Posts:
    60
    This is a basic question sorry if it has been answered already...

    When I enable RTPv3.1 in TerrainComposer I no longer have the "Settings" option that allow me to change the Tile Size and Tile offset for each Texture. What happen to this?

    Also, if my texture does not have a "Normal" and a "Height" Texture for it, does this mean RTP won't do anything or are those just optional to make the texture look even better.
     
  2. Deleted User

    Deleted User

    Guest

    If you use RTP, you will have one tiling value for all textures; they can be adjusted in the inspector, as soon as you select one of you terrains
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Using detail (per layer) normalmaps and heightmaps is basically optional but it makes no sense not using them as you won't get any reasonable visual results offered by RTP.

    Tom
     
  4. Bigpete591

    Bigpete591

    Joined:
    May 7, 2013
    Posts:
    60
    Thanks Tom,

    What if my textures do not have these, for example:

    https://www.assetstore.unity3d.com/en/#!/content/19732
    *Those don't have normal or heightmaps

    https://www.assetstore.unity3d.com/en/#!/content/13001
    *Those only have a normal, but no heightmap textures

    Where do I get textures that have all 3 layers?

    Also does it take more cpu/gpu to run textures with RTP and all 3 layers enabled?
     
    Last edited: Aug 5, 2014
  5. Montreseur

    Montreseur

    Joined:
    Jan 24, 2014
    Posts:
    49
    Is anyone having issues after updating to the newest version of unity (4.5?), after doing so my terrain is completely black.
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You can dig in the web, not only in AssetStore trying to obtain tileable textures that have more outputs. Another option is using substances (either free or bought) and produce 3 necessary outputs in RTP. The other solution is using tools like B2M or CrazyBump to produce normalmaps and heightmaps out of color textures. Personally I used B2M to produce textures used as examples in my package. They are made out of free Unity terrain assets.

    Not using normalmaps and heightmaps is no good. In most cases you won't gain any performance. And the question is - why using RTP w/o proper input ? You can't get high-end visual results then. This is like trying to feed modern jet fighter with low octane gasoline... :)

    Tom
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Newest RTP works with U4.5 (I'm on U4.5.2f1). You might need to make sure RTP3.1c (or d) is installed and you have everything refreshed (like using RTP?Settings/Main/Refresh All button). Sometimes its necessary to tweak per layer brigthness, or reverting RTP settings to default, but this is rather needed when upgrading to newer RTP. You also need to watch if you don't use deferred. In this case you'll need a script mentioned a few posts above:

    Assets\ReliefPack\Scripts\Common\ReliefShaders_applyLightForDeferred.cs

    attached to your main directional light

    ATB, Tom
     
  8. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Tom

    Found the script, now the fresnel term does not break rendering anymore. Altough the effect is quite subtle (or my gloss maps are just turned down too much).


    I tried a lot to somehow tone down the artefacts. Normalizing the heightmaps did not really help. And actually, after Playing around with the LOD Settings I am not sure anymore we are talking about the same artefacts

    I turned the LOD Level to PM to see if it will remove the artefacts. While the "extrusion" of the artefacts is lower (as is the extrusion of the texture itself), the artefact is still there.

    Here is an image, with some of the artefacts marked with the red circle. These patches of Sand should be laying flat on the tarmac texture, as they are from the area where the sand texture is higher as the tarmac texture. Still the sand patches hover over the tarmac

    blend_error_3_pm.png

    I tried now a lot of things but somehow I suspect this is more than just normal artefacts around the layer edges. Also, it is visible from almost all angles, not only grazing ones.

    Is this a bug of some sort? Is my installation of RTP corrupted by some chance?

    The reason I ask this is that I often get the bug where the shader breaks in the scene view (terrain goes all black), this can easely be reverted by tabbing to the game view and then back to scene view, but it breaks quite often now after a change to any object in the scene.

    Also these kind of "floating layers" never occured in RTP 3.0... it happens now even if I remove the layers heightmap, but use a combined heightmap in the appropriate slot.


    If you cannot pinpoint these problems down to anything particular I will just completly remove RTP from my project, delete the package from the cache and re-download.


    Thanks for any help

    Gian-Reto
     
  9. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Any idea why the diffuse texture wouldn't change when I replace it in the layer? I changed it in both the original terrain layer and the rtp layers. I hit refresh on all new textures (diff, nrm, height). No change.
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In 8 layers mode details need to be atalsed. For some reason changes might not be reflected as they are supposed to. Look into Combined textures/atlas slots if textures get updated there.

    Could you provide me with 2 problematic textures (rocks and sand with normals and heightmaps) so I can check this ?

    Tom
     
  11. Uzopoza

    Uzopoza

    Joined:
    Feb 26, 2013
    Posts:
    39
    Hi Tomas!
    How I can delete RTP shader from my scene and project?
     
  12. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Ahh yes... that was the trick sir. Thanks!
     
  13. FalconCGN

    FalconCGN

    Joined:
    Jan 18, 2014
    Posts:
    33
    Hi there,

    we have a perfomance problem: Framerate drops significantly by around 50% with Relef Pack v3.

    Actually we have 16 scenes with 1 terrain (2000x2000) each and are loading up to 9 scenes/terrains at once to stream the scenes/terrains.

    I have implemented RTP Shader in every scene. I am using 12 textures (8 textures in first pass) and 4 textures in add pass, both with "POM Hard Shadows". Also snow and water system.

    Is there a way to share things across scenes? Shall I switch all scenes back PM or Simple? Do you have any suggestions?

    Thanks in advance
    Sebastian
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Remove RTP objects from your scene (LOD manager and scripts from terrain objects) and remove ReliefPack from your Assets folder

    RTP3.1 is more demanding because of physical based lighting (with IBL) and more advanced rendering (for better quality)

    12 layers is quite big amount. For best performance use 8 layers mode and "no overlap". Water+snow+POM selfshadows - nice, but can be problematic for mid range GPUs. Use only necessary features. Use U4 materials option (for 1 terrain it's the best). Introduce runtime quality settings in your game (so users with weaker hardware can play on PM instead of POM). Maybe it's possible to use only 8 layers and for additional detail using sticked geom blend meshes ? Also - more lights in scene in forward might be expensive (multiple passes required). Best performance you'd achieve using 1 directional light in forward (rest could be lightmapped using either Unity's lightmap or RTP's global ambient emissive map).

    Tom
     
  15. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    One last thing. Not sure if it is related to RTP or not though. When in Scene View (not game view) at certain angles all the terrain goes black. But only at certain views. It's like a shadow or something. Been driving me crazy.

    That's a view kind of between the shades in the picture. At a lot of angles it just goes all black. And it is only the terrain.
     

    Attached Files:

  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Do you use forward or deferred ? If the problem occurs at some angles (weird it's not a case in game view) you could try to disable some functionalities in LOD manager (like PBL fresnel) and and check if this is related to this. Which Unity version do you use ?

    Tom
     
  17. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    4.5.2. Use deferred rendering, linear color space.
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Do you have this:

    Assets\ReliefPack\Scripts\Common\ReliefShaders_applyLightForDeferred.cs

    attached to main directional light ?

    Tom
     
  19. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Yes I do. And I should also mention... this is in "unlit" mode. When I turn on lighting mode in scene view it looks as it should. Unfortunately it's a night setting... so it's really hard to work. I do not use lightmaps either.
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I see. If this happens only in scene view not in game view, it is annoying when you work on this. You can just put 1 dir light with low strength (0.01 strength and almost black color) to overcome it. When releasing a game you can disable the light.

    Tom
     
  21. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Yeah... actually I have another light in called "Working Light". I set it to what I want for visibility. Just tedious. I'd really like to find out what this is. I have seen it before, but it went away and I am not sure how i made it go away before.
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Somebody mentioned this in the past I remember. When he turned the lighting below 0.01 terrain turned black. I hope you can live with this :)
     
  23. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Interesting... Do you mean the directional light strength?
     
  24. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    From 'RTP Documentation' - "Tiling, MIP adjust and Lighting"

    Hi there Tom,
    I was wondering how to, if possible, set the Near Distance Value to something larger, performance is no issue (within reason). I'm looking to show off larger parts of the terrain from above.
    Thanks
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Look into ReliefTerrainEditor.cs and find a code section where it's set there (search for a sentence that you see as slider label). There is range specified in a line of code. Changing this is very simple.

    Tom
     
  26. Jaqal

    Jaqal

    Joined:
    Jul 3, 2014
    Posts:
    288
    I just bought your package and have been trying to get it working for the last few hours to no avail. I am using a clean project as it pretty much destroyed the terrain in my main one. In the demo scenes the terrain is bland looking with no detail. I have no idea what is causing this as it's the only thing in my assets and you seem to be getting good reviews?
     
  27. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Did you run the LOD manager script?
    Even in the demo this has to be done.
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Indeed, you need to prepare shaders for work first. It's all described in my docs. If you did -tell me exact configuration you're using (DX9/DX11//Opengl) version of Unity, forward/deferred. Exact list of features used in LOD manager. How many layers your terrain has. That I would need trying to address it (we need to be on the same page).

    Tom
     
  29. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    I have the same problem. Unity 4.5.2f1 Mac OS X Mavericks. In demo scene disabling forward rendering doesn't fix it. Shadows are not soft. Everything else is blurried but water looks normal.
     
    Last edited: Aug 9, 2014
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Have you checked opengl target platform in LOD manager before recompiling shaders ?
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    POM with self shadows are only used when you actually compile shaders to use such a high LOD level. By default shaders are compiled to use PM (not POM). Set max lod level to POM with self shadows before recompiling shaders then this check box will work (in deferred remember to place a script for light resolving - mentioned many times before in this thread).

    Tom

    P.S. Without reading my documentation you'll probably run into many more issues and you won't be able to get the best of RTP.
     
  32. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
  33. Jaqal

    Jaqal

    Joined:
    Jul 3, 2014
    Posts:
    288
    Reading the documentation was the first thing I did. Then I followed the first steps video and am having no luck. I am using a fresh project and not changing any settings besides the ones the video says to do. As far as settings everything is default. And I am using the lod manager just as the video shows.

    *I tried a fresh install on my other pc and i'm still having the same problem. I'm using unity pro 4.5.
     
    Last edited: Aug 9, 2014
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Check if RTP is installed in default location. Then make sure you actually recompiled shaders for pc (dx9 and dx11). Refresh all in settings/main. On fresh project this just must work. I'll submit new version of first steps of video tutorial very soon. You can contact me PM so we can solve problem together via skype screenshare.

    Tom
     
  35. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
  36. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    196
    Hi. Can anyone post 3 screen shots of the correct import settings for the 3 textures (diffuse normal and height) used by RTP?
     
  37. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
  38. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    196
    Thank you sundance.
     
  39. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
    Screen Shot 2014-08-11 at 4.22.36 PM.png Tom,

    I am having some serious issues with this. I am using WC by Nathaniel and he says I need to set up RTP which I had done but still no luck.... Screenshot below..
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Two missing steps (at least).
    You're on Mac, so you need to select opengl target platform (by default it's DX9 only)
    You need to select at least first pass to be compiled - by default there is no pass selected.
    Then recompile shaders.

    Tom
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    The only idea is that you probably put ApplyLight for deferred script to the wrong object (camera I see on the screenshot). If you don't specify actual light object there you could have problems in deferred. Attach this script to the main dierctional light instead (remove from camera). This might help.

    Tom

    Your grass on screenshots also looks very good and perfectly fits underlying terrain.
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    New video tutorial available. This version of First Steps is recorded full screen HD with subtitles for non-english users. Covers all steps needed to setup a basic single terrain with RTP3.1. It's done here in Unity 4.5, but RTP can be used from U3.5.7.



    So, I hope this one is enough precise for new users concerning frequent mistakes like platform selection, not compiled shaders or RTP installed in different location.

    ATB, Tom
     
    Last edited: Aug 12, 2014
  43. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Hi Tom,
    I just converted my textures from virtual to Unity with Amplify Textures and removed that.
    Seems it has caused some sort of issue with RTP, I am getting this error:
    Detail tex 0 size=1024 while detail tex 6 size=512
    UnityEngine.Debug:LogError(Object)
    ReliefTerrainEditor;PrepareAtlases(Int32) (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:4499)
    ReliefTerrainEditor:OnInspectorGUI() (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:265)
    UnityEditor.DockArea:OnGUI()

    I've checked and rechecked and all the textures I can find in RTP are all 1024 and none 512.
    Where might I be missing it?
    This causes Unity to go into Pause mode when going to Play.

    Thanks,
    Don
     
    Last edited: Aug 13, 2014
  44. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Redownloaded and installed the RTP package and this seems to have cleared up.

    Hmmm, on further review this problem seems to be triggered with another Asset Store package, PlayModePersist. Once I've selected to have the RTP setting persist after play mode, and go to the Inspector with the Terrain selected it goes into Pause mode while in Play mode.
    This continues even if I don't select the PMP, once I've done it once, it seems to stick somehow.
    I'm guessing importing RTP again overwrites the PMP flag, so if I don't reenable it, it should be OK.

    Hmm, worked the first time, but not again.
    Back into Pause mode.

    Not sure if this is involved in this pause thing:
    !IsNormalized (normal, 0.001f)
    UnityEditor.DockArea:OnGUI()​
     
    Last edited: Aug 13, 2014
  45. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Thx for answer, it was wrong object with script, i reappointed script to main light but problem still here. And only when i use dx11.
     
  46. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    In case my edits didn't spawn a new alert:

    Hmm, worked the first time, but not again.
    Back into Pause mode.

    Not sure if this is involved in this pause thing:
    !IsNormalized (normal, 0.001f)
    UnityEditor.DockArea:OnGUI()
     
  47. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Stupid alert on my issue, after reimporting and recompiling I didn't reset my settings.
    Forget the whole thing, PMP now works fine too.
     
  48. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Feature request:
    Would it be possible to make all the sections in the Layers Properties panel collapsible?
    This would really speed up workflow when editing UV Blend Scale and finding the problematic scaling texture more quickly. Now you have to select a texture, scroll down, adjust, scroll back up, select next texture, scroll back down, adjust, etc.
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Why don't you use L shortcut to select a layer ? This is described in new video (a few posts before). Focus on scene view and hovering on a layer press L. You won't need to scroll up and down then. Just click on the layer (in scene view) you'd like to adjust and press L. I assume you're adjusting layers that you're actually watching in scene view.

    I'm wondering why this problem is only on RTP rendered surface and in DX11/deferred. Do you use any 3rd party package that redefines prepass (like Lux) ? The postFXes you're refering to rely on depth/normal rendertexture, that might be a trace. You can also check this using different gloss/specular output from RTP shader. That can also can have influence here. Play with sliders to get very glossy materials and dull materials (adjusting gloss multiplier) and play with specular. Tell me if this makes any difference visually in regards to your issue.

    Tom
     
  50. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Thanks Tom, the video tutorial is very helpful.
    Never knew about selecting the Icon by the Perlin Normal slider in the Layers section, either.