Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Which version of RTP do you use (check verinfo.txt file in ReliefPack folder) ? Unity version ? Have you update Unity since last time things wored ? Making terrain transparent means global colormap alpha channel gets black. Try to recompile shaders in LOD manager and refresh terrain (RTP/Settings/Refresh All button). How many layers do you use ? Should be 4 or 8.

    Tom
     
  2. Dwight_P

    Dwight_P

    Joined:
    Feb 26, 2013
    Posts:
    42
    Question, has anyone else has edging issues using the Geometry Blending? I've played around with all the settings, but no matter what I get the off colored edging from a distance. I have the same issues whether the lighting is enabled or disables, and it doesn't matter what Geometry Blending shader is being used either.

    At a distance:
    Untitled.png

    Close up:
    Untitled2.png
     
  3. ChrisBro

    ChrisBro

    Joined:
    Jun 23, 2014
    Posts:
    4
    My rtp version is 3.3c and unity is 5.3.4f1.
    I tried refreshing all, but nothing changed. I use 7 terrain materials if that's what you mean by layers. (in layers tab there are 7 textures.) I updated unity when 5.3.4 came out but i had no problem while i was working on my terrain. Until i opened it up again today. Here are all my settings maybe you can figure out if i did something wrong.
     

    Attached Files:

  4. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Ok some screens:







    Using deferred with linear.
    Using Max_LOD in LODManager = POM Soft Shadows
    Same for MaxLOD4-7.
    For each texture Normal Map and Heightmap have the same size like detail texture..
    As you can see in screens I am using 8 textures. starting from texture 5 the textures are black.
    Atlasing Texture were created fine as you can see.

    Using RTP 3.3c with Unity 5.3.2f1
    Hope this informations help you. This weekend I will try to create a new Terrain with Gaia so see if the problem still remains with new fresh Terrain.
     
    Last edited: Mar 18, 2016
  5. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    I'm gonna download the last update but is this fixed on deferred lighting yet? because I remember there wasn't any way to make specular look correct on deferred mode (on forward mode it was good) but in deferred mode there was a heavy specular line on directional light path :(
     
  6. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Hi there, have someone encountered this problem? Seems to be something is wrong with shader and i don't have any ideas how to fix this
     

    Attached Files:

  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Please give me more info. Do you use snow on the terrain or it's simply a terrain detail layer ? What's the geom blend shader on the cavern. Unity version, RTP version (verinfo.txt file). Forward or deferred. LOD manager setup. Lighting setup. Can you check the same on my exmple scene. There is cavern entrance which doesn't produce this glitch on my side.

    It might be your detail heightmaps combined are broken after updating Unity. Try to click refresh under all textures in layers tab of RTP. Then look at Comboned Textures tab if there is everything right and nothing is missing. Installed RTP on U5.3.4f1. It works, but there is a detail you might be not aware of - tessellation that displaces detail heightmaps (option selected in LOD manager in your setup) might work not much good in setup where we render 2 passes. Uncheck displace detail option or use 8 layers mode. Recompile shaders. You need to know that problems might be related to not even number of layers used. You're supposed to use 4 or 8. For terrain that has such number of layers apply RTP omponent then and recompile shaders in LOD manager for selected feature set.

    I see your per layer settings got zeroed at some stage ? You can restore defaults (at the bottom of RTP inspector). Or reapply RTP component again. To be safe in case of such situations you might "backup" your settings using RTP preset functionality.

    RTP3.3 uses Unity lighing pipeline. Now things look the same in forward and in deferred.

    What's your RTP version (verinfo.txt file) ? Black artifacts are placed only on cliffs and I believe I fixed this issue already. Anyway - if you're on RTP3.3c give me your LOD manager setup and number of layers used on terrain.

    Tom
     
    ksam2 likes this.
  8. Gottferd

    Gottferd

    Joined:
    Aug 13, 2015
    Posts:
    6
    what about my issue?
    Don't you have any idea where this problem come from? :(
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Your issue is so special :). I wonder if shader for deferred is actually exported for build. Do a quick test. Simply screw up the shader. Open it and put return 0 at the end. Everything will turn black. Then make a build and check if the RTP deferred lighting shader is still there (giving black output).

    Tom
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You might also noticed this - U5.4.0B10 release notes - I feel really famous having my package in "Known issues" section of this beta, but it's actually not true. I've just installed RTP with this Unity version and things seems to work. Anyway as Aras said - 3 texture samplers got saved on DX11. Now we can compile a lot of features turned on in RTP. Example scene works.

    Tom
     
    montyfi likes this.
  11. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Sorry but you didn't understand what I said, please look at below pics.


    in this pic everything looks normal for me and there in no foolish specular, but in the second pic after I change directional light path heavy specular appears on directional light path.




    It doesn't happen on forward mode! only on deferred render mode ...

    I've done all things on shader but can't remove this heavy specular direction
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In deferred (new deferred, not prepass legacy one) you need to do 2 things. Use script on directional light that provides RTP shader with global parameter - light directionfor this light. In Unity graphics settings use dedicated RTP deferred shader (included iknin RTP shaders subfolder). If this is still an issue - look here for more detailed discusion about specularity mode in Unity:

    http://forum.unity3d.com/threads/re...-v3-on-assetstore.206516/page-89#post-2504201

    RTP 3.3c is not supposed to use GGX anymore. By default it's normalized plinn-phog which produces a lot darker visibility specular term. What's you RTP version ? (verinfo.txt file).

    In RTP3.3c look at my example terrain scene. There is a new script attached to terrain that gives control over specularity when layer is set to metalness=0 (and roughness=0).

    If it still doesn't help I'd need more info about your setup.

    Tom
     
    ksam2 likes this.
  13. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
  14. Dwight_P

    Dwight_P

    Joined:
    Feb 26, 2013
    Posts:
    42
    Unity: 5.3.2f1
    RTP: 3.3c
    Snow Design: Texture with bumpmap with no use of the snow shader.

    Lighting:
    Lighting.png

    Shader (Basic shown, but issues persist with ALL RTP Geo Blending shaders):
    shader.png

    LOD (Default):
    LOD.png

    I've yet to check the demo, and will do that when I have more time.
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You can not have separate lighting for objects rendered in deferred. They use the same lighting pipeline. Simply Unity GGX implementation has very strong visibility term. A lot of people complained about terrain being "shiny". So I switched for blinn-phong with adjustable dielectric color (can be black then we have absolutely no specularity seen). In forward we can have it separately. In deferred - no, unless you decide to make your terrain shader forward only (by excluding deferred pass - #pragma surface .....exclude_path:deferred). This is how Unity works and does lighting. It has nothing to do with RTP.

    you can switch Internal-DeferredShading_UBER to blin-phong (set ggx 0 inside shader code) and select PBS2 lighting model. Then every object in scene (not only terrain) will be lit the same blinn-phong way.

    Tom
     
    ksam2 likes this.
  16. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    It's been a while since I played with this, but previously I was able to make details in things like rock jump out. I'm guessing this is the extrude setting but it's greyed out. Superdetail and Vertical Map are also greyed out. How to I gain access to those please ?

    Also, is there are way to make distant surfaces look less smooth and more bumpy etc ?

    Thanks if anyone can help point me in the right direction.
     
  17. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    Typical, just found how to activate them but extrude is doing nothing to the texture.
     
  18. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    Ah normal map missing ! Got it.
     
  19. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    hello Tom. i have same problem. i try to use uber and rtp same time
    i cant seem to find ggx from shaders codes and dont know where to find PBS2 lighting model. can you be little bit more specific what i should do?

    thank you

    -Toni
     
    Last edited: Mar 20, 2016
  20. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Unity: 5.3.2.f1
    RTP: 3.3c

    4 layers used, attached images below

    and 1 more thing, i have solid black shadows
     

    Attached Files:

    Last edited: Mar 21, 2016
  21. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Thanks tom. I just created the Terrain from scratch and added RTP Component again. After that everything was working fine. Right now I need a little bit more fine tuning for UV Blend, Far Distant Blend and Global Maps because the terrain does not look so great. Will post some screens the next days I think perhaps someone can give some tips and tricks.
    A little question: If you use RTP and UBER together in a Scene how do you handle the Custom Deferred Shader Script? Is it enough to use the RTP one for POM with Soft Shadow? Because I don't see how to add both scripts (Deferred Script fpr UBER and RTP).

    Thanks a gain!
     
    Last edited: Mar 21, 2016
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Both scripts do the same. We need only one script on one directional light is supposed to cast POM self-shadows (where used).

    In RTP look at ReplacementPBSLighting.cginc

    there is such line:
    Code (csharp):
    1. #define UNITY_BRDF_PBS BRDF2_Unity_PBS

    which turns off GGX spec model (it's available only in BRDF1_Unity_PBS function).

    In UBER it is not replaced, so GGX is used by default. RTP has deferred lighting shader narrowed to POM self-shadowing only. UBER has it all.

    When UBER and RTP are installed together you should use UBER's deferred shader in graphics settings.

    To force UBER to use BRDF2 model like in RTP, open UBER_PBSLighting.cginc and add above #define line code right after #includes at the top of file. Recompile shaders.

    Remember RTP has new RTP_TintDielectricColor.cs available that allows to define specular color of dielectrics (metalness=0) objects when dealing with metallic setup. UBER has both - metallic and specular where you can explicitly set spec color to black if you don't like any specularity for completely rough objects. RTP terrain shader uses metallic setup only. So - attach the mentioned script anywhere (it affects objects globally in scene) and adjust dielectric tint color. On example terrain scene this script is attached to terrain object.

    Tom
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Another idea - make debug/development build which will throw you exceptions in "game view" of built executable. Maybe light direction script helper throws something ? It was once a case for me, had null exception and shader parameter was never set thus self shadows were missing in build.
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Now I see - your scene has missing ambient lighting ? Can you check this with other type of objects (non RTP) ? Your setup is incomplete, do you use triplanar ? It's forward or deferred. Do how many light do you have in the scene ?

    Tom
     
  25. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Hi, so, i've recompiled lighting and it fixed my shadows, but still on cliffs same problem

    Ambient lighting - on
    No triplanar
    Forward
    1 Directional Light

    i've attached 2 images RTP terrain and same terrain without RTP
     

    Attached Files:

  26. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Yeah and 1 more thing, how can i use Vertical texture, if i have 4 layers. When i try to apply it, after recompilation RTP gives me an error, that i use 5 aux textures..Should i use 3 layers as terrain ground textures and 4th as vertical? or how does it work?
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    How does your global normalmap looks like ? Is it setup right ? For vertical texture - you try using too many textures in shader which might not compile (you can try recompile anyway - if it doesn't work terrain will simply turn pink). You could enable atlased detail color in LOD manager or disable snow and glitter temporarily (they use 1 texture) to see.

    Tom
     
  28. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Hm, at first there was no global normal map, i've added it, and it fixed my problem, but after it texture tiling became more visible and global perlin less visible and whole terrain brightnes shifted to white...Then i disabled Global normal map..aand it still works ^^ i don't know what to say ^^

    btw, should i always use global normal map?
     

    Attached Files:

  29. Gottferd

    Gottferd

    Joined:
    Aug 13, 2015
    Posts:
    6
    Hi Tom.
    I did the return 0 test and the script seems to be export to the build.
    Isn't it strange that only the terrain turn black?

     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yes, strange. But other materials might be rendered in forward (even if camera renders in deferred). For example all transparent objects are forward only.

    Check the other idea I gave you today.

    Tom
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Global normalmap is optional. Use it when you actually have right normalmap available (from WorldMachine or TerrainComposer). More - globalnormalmap requires one texture which you now can use for vertical texture...

    Tom
     
  32. Gottferd

    Gottferd

    Joined:
    Aug 13, 2015
    Posts:
    6
    Sorry, I didn't see you replied
    I will test that.

    Thanks
     
  33. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    Hey Tom, I accidentally asked this question in your other product thread, it should have been this one.

    On the terrain, how can I make distant terrain look bumpy and rough instead of smooth and flat ?

    Thank you :)
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You can ask UV blended textures to use normalmaps. It can be set in LOD manager. It establises normals when UV blend replacement slider per layer is set higher. Use perlin normal for this purpose as well.

    Tom
     
    Freddy888 likes this.
  35. Freddy888

    Freddy888

    Joined:
    Sep 13, 2014
    Posts:
    165
    Thanks Tom. I'll try that.
     
  36. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Unity 4.7 and RTP 3.2d - I switched to 8 layers mode and my terrain is distinctly less sharp now.

    The only difference here is ticking or unticking "8 layers in first pass" in _RTP_LODmanager, or I can get the same change by commenting or uncommenting just the _4LAYERS define in RTP_base:



    Any idea what I might have done to cause that (or is 8 layers mode just less sharp by necessity?)?

    I'm basically just seeing what I can do to cut down on the big Terrain.Heightmap.RenderStep3 CPU drain. I've tried changing a bunch of other settings but the blurryness remains as long as 8 layers mode is on.
     
    Last edited: Mar 23, 2016
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    8 layers mode use color atlas to save 3 textures in shader. For 8 layers we need 2 instead of 8 which would make it impossible to render in one pass. Sampled atlases modes don't benefit from aniso - that's the issue.

    Tom
     
    RonnyDance likes this.
  38. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    I also wondered why starting from 5+ layers the detail of the textures was not so sharp for near /middle distance. So this would be one disadvantage when using 8 layers I see. Hmmm...
     
  39. ittinop

    ittinop

    Joined:
    Nov 9, 2015
    Posts:
    15
    Hi Tom,

    I noticed that your terrain normalize splat automatically.
    I want to use brightness adjustment to make terrain look more random, but I cannot make splat value go beyond 1.
    Could you help tell me where I can stop this splat normalization in the shader?
    Or recommend alternative solution?

    Best,
    Ittinop
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You can't easily turn it off, because normalization behavior is associated with heightblending. For this purpose use global colormap with global brightness adjustement (RTP?Settings/Main) instead.

    Tom
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'd probably need more data. Still the question is it forward or deferred lighting path ? (look at camera or project player settings).How it's lit ? Single directional light ? Do you have fog enabled ?

    Tom
     
  42. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Thanks Tom. Is it actually not possible to do anisotropic filtering on the atlased textures, or is the shader just getting too complex at that point? I'm not using specularity or lightmaps - would be cool if I could trade that to get aniso back.
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    To effectively sample atlas I need to use tex2Dlod functions instead of tex2D which gives aniso. I hope when U5.4 get arrays and textures arrays worked out better new RTP version will appear at some point. It will benefit a lot (more layers rendered with better performance).

    Tom
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I put RTP3.3d on my server (also briefly checked against U5.4.0.b10 - examples work):

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

    Make sure all z01-z08 and zip file are downloaded when extracting (sometimes download breaks in the middle).

    zip is 22 576 432 bytes
    z01-z08 are 31 457 280 bytes

    Tom
     
    RonnyDance likes this.
  45. ittinop

    ittinop

    Joined:
    Nov 9, 2015
    Posts:
    15
    Thank you very much Tom, I will check that out.
     
  46. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    This was fast, Tom! Does this mean no blurry layers with 8 Layers and Unity 5.4 anymore? Looking forward to this update!
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You're too demanding... :). RTP3.3d means - bugs fixed on RTP3.3c rather than new features. If atlas sampling with aniso was so easy I'd do it 1-2 years ago probably.

    Tom
     
  48. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Hehe sorry. Just thought the issue would be adressed because of the current 8layer Unity beta discussion some post above, now that Unity 5.4 beta is out. I am fully aware that this is not an easy task. As you can see I was surprised by your new uploaded test version also.
     
  49. HelpMe_Please

    HelpMe_Please

    Joined:
    Feb 15, 2013
    Posts:
    33
    Hello there
    i really would like to buy your shader, the problem is that i have a bout 800 Materials in my game. Will i have to manually change every single material to your new shader or is there any automatic way?
    Also, is the performance better than the normal unity standard shader?
    Thank you
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    This is probably UBEr related question ? You can select all of your 800 materials in inspector and change shader used to UBER core one probably. As UBER shader provides a lot more features you won't avoid tweaking materials manually to some extent.

    Tom