Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our 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
    Hi, I've just published next video tutorial which covers different RTP work modes:

    1. Multiple terrains with 4 layers - comparison using terrain materials or not
    2. Rendring differences between materials / non materials mode
    3. 8 layers mode feature
    4. 8 layers mode - options
    5. Grouping terrains (independent terrains setup inside scene)
    6. RTP used on arbitrary mesh



    Also - RTP3.1e update is available. Minor bugs fixed and new Skyshop integration - IBL diffuse is now based on SH (spherical harmonics) calculations instead of IBL diffuse cubemap when skyshop integration is enabled in RTP LOD manager. RTP takes SH global values (w/o sky blending) and uses for diffuse IBL.

    ATB, Tom
     
  2. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Awesome, thanx for the hard work : )
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yes, I'm also sorry we can't use multiple terrains with 8 layers in first pass, but Unity simply doesn't give _Splat0 to _Splat3 output for separate terrains then (when Splatcount tag is set to something different than 4 - i.e. 8 we don't have textures available. In U5 beta it's even worse - we can't use 8 layers mode at all - submitted bugreport on this, I hope they will fix it before U5 official release).

    Tom
     
  4. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    No problems, i planned on using 2 passes anyways : )
     
  5. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    New terrain system is coming... It will have better sculpting and brush tools but I hope it doesn't make RTP useless...
     
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Not a new terrain system, just some tweaks. New terrain system will not come in quite a while.
     
  7. Lanaany

    Lanaany

    Joined:
    Dec 20, 2013
    Posts:
    14
    Hi Tom,
    Could you please provide an detailled workflow, how to setup a scene with skyhop? I managed it once, a few month ago but I was not able to get it to work once again since then :(.

    Best,
    Lanaany
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'm just during process of making new tutorial videos. Currently by some other user request I'll cover lightmapping tricks and RTP's global ambient emissive ("RTP internal lightmap") feature. Then I could go for PBL/IBL tutorial with Skyshop integration. Basically - you need to do:

    1. Enable skyshop vubemaps sync in LOD manager
    2. enable IBl diffuse/IBL specular in LOD manager
    3. put Skyshop sky object (global) in scene.
    4. tweak IBL settings per layer (like IBL exposure, etc.) - remmeber that IBL specularity depends on layer specularity in general. If you have dull texture (0 specular popwer) you won't see any specular IBL.

    You could go thru my pdf docs. There are many things covered in detail.

    Tom
     
  9. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    Damn, update resets LODmanager...
     
  10. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    Interfering terrain replacement shader found in your project ! Unless you're using materials on RTP terrain you should REMOVE another shaders.

    I keep getting this warning in 4.6... Shader file is Nature/Terrain/Diffuse/Compiled-FirstPass-Web.shader. Otherwise everything works fine.

    So you save builded shaders in /Temp/.
     
    Last edited: Oct 6, 2014
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I can't remember when I saved shader to /Temp/ ? You could explain it maybe. Anyway - if you've got shader - no matter its filename - named Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass you'll have this warning in RTP. It simply tells that when no material is used you have 2 global terrain shaders which will interfere - it will be inpredictible which one will be used (RTP's or the other one).

    Tom
     
  12. Yog0

    Yog0

    Joined:
    Oct 1, 2013
    Posts:
    14
    Hello Tomasz

    I wrote a script that switches out the global color maps on two terrain tiles, and unfortunately the RefreshTextures() function won't execute.

    The console shows the following error:
    BCE0017: The best overload for the method 'ReliefTerrain.RefreshTextures(UnityEngine.Material, boolean)' is not compatible with the argument list '()'.

    Any insight into what could be causing this? My code is pretty much straight out of the documentation.

    rt00.ColorGlobal = NAIP00;
    rt01.ColorGlobal = NAIP01;
    rt00.RefreshTextures();
    rt01.RefreshTextures();
    Where rt00/rt01 are the terrain tiles as a gameobject, and NAIP00/NAIP01 are a texture datatype

    Currently I have RefreshTextures quoted out, and I have to click the taskbar to get them to switch.
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You're probably in kind of strict script mode which doesn't accept default params (?). Try this:

    rt00.RefreshTextures(null, false);
    rt01.RefreshTextures(null, false);

    Tom
     
  14. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    Tomaszek

    Yes, in unity 4.6 i have this errors too. And i dont know what i do with this errors. I dont have another shader in my project. What will advise? Just ignore it?
    rtp_errors.jpg
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Just click Show me and RTP will select interfering shader in your project. Tell me what's this (screenshot maybe). This should be shader that will make you problems when you don't use materials in RTP (then we can use only one, global terrain shader per project).

    Tom
     
  16. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    tomaszek

    Thanks you for fast answer. Of course. Below screenshot:
    rtp_errors2.jpg

    P.S. I am used materials. This bug appeared in unity 4.6. In 4.5.4 - it's all right.

    Thanks.
     
  17. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Its Unity 4.6 specific bug. This shader is Unity 4.6 build-in shader, its not inside assets folder.
     
  18. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    Someone who understand please make a bug report... It's pretty annoying. : /
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    This shader seems to be not interfering (its name is not Hidden/...). So I'm wondering why RTP gets its name to warn you. Anyway - you can always click "Don't bother me again". Esp. when you use materials - any interference is harmless for RTP then.

    Tom
     
  20. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    Pressing the button will close window but it will come back.
     
  21. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    I'm curious, other than Unity 5 integration, what is in the pipeline for RTP? Like are their plans for new RTP 4.0 features? Or are you done developing new features?
     
  22. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Yah, it keeps getting back, very annoying, lol. Still, Unity 4.6 is in beta, so no right to complain.
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    +1 :) But it shouldn't get back until new scene is loaded or Unity restarte. I'm I right ?

    (I've got another problems to resolve meantime since I'm working on new tutorials I still need to tweak/fix some minor issues in current RTP versions).

    What's missing in RTP3.1 ? :)

    I'd like to see what Unity will come up with U5. But if they won't fix some most annoying issues, I'll think about further work on this. This, however, might mean a bit separate new product (which is not only shader system) but something more (terrain rendering from scratch). Everything depends on how things will go on. Working on new features, or even new version is very risky in current market conditions (other AssetStore developers can easily understand what I'm talking about - AssetStore is place for regular work only for only a few developers who can earn enough here and I'm still small fish no matter how hard I try and how cool packages I'm trying to deliver).

    Tom
     
  24. Lanaany

    Lanaany

    Joined:
    Dec 20, 2013
    Posts:
    14
    I did all you said, but I'm still not sure if it really works. At least I can't see any difference on the textures when I change the Intensity-Sliders in the Skybox-object. The only influence I see is when I click the "HDR"-Button of the Specular Output of the Sky-shader. Is it normal, that these Slider don't have any effect on the terrain?

    Best,
    Lanaany

    HDR-On, low diffuse:
    upload_2014-10-7_23-20-22.png

    HDR-On, higher diffuse:
    upload_2014-10-7_23-20-43.png

    HDR-Off, low diffuse:
    upload_2014-10-7_23-20-36.png
     
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,290
    Are any DX11 specific effects in the pack ? Or everything is based on parallax ?

    Thanks
     
  26. adammil2000

    adammil2000

    Joined:
    Aug 25, 2013
    Posts:
    19
    Hi, I am using 3.1 and I use this script below to try to change the terrain texture at runtime (by pressing a key). It sort of works, except I have to alt-tab out of the running build and back in again for the new texture to display. Alt-tab is forcing some sort of redraw which I need my script to be doing instead. Any ideas how to achieve this in my script? Some refresh or redraw call perhaps?

    Code (CSharp):
    1. public class ChangeAtlas2 : MonoBehaviour
    2. {
    3.     Texture2D tex;
    4.     ReliefTerrain rt;
    5.  
    6.     // Use this for initialization
    7.     void Start()
    8.     {
    9.         rt = gameObject.GetComponent(typeof(ReliefTerrain)) as ReliefTerrain;
    10.         tex = Resources.Load("ROAD_HEIGHT") as Texture2D;
    11.         rt.globalSettingsHolder.splat_atlases[0] = tex;
    12.         UnityEngine.Debug.Log("Loaded texture named " + tex.name);
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update()
    17.     {
    18.         if (Input.GetKey("9"))
    19.         {
    20.             tex = Resources.Load("Sand_diffuse") as Texture2D;
    21.             rt.globalSettingsHolder.splat_atlases[0] = tex;
    22.             UnityEngine.Debug.Log("Loaded texture named " + tex.name);
    23.         }
    24.     }
    25. }
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    IBL intensity/exposure in RTP is controlled per layer (PBL settings section on each layer). Skyshop sliders doesn't work here. Integration with Skyshop means RTP takes its spec/reflection cubemap (use HDR - it's selected in RTP by default) and IBL diffuse spherical harmonics coefficients. You can also rotate your global sky and RTP can follow this, too.

    No, It's POM. You'll, however benefit DX11 more compact shader compiled code thus in DX11 hardware you'll get it working faster than compiling to DX9 (you can check this turning on/off DX11 Unity mode).

    Was talked over recently (look at Yog0 problem above). Solution is refreshong function that must be called:

    Code (CSharp):
    1. public class ChangeAtlas2 : MonoBehaviour
    2. {
    3.     Texture2D tex;
    4.     ReliefTerrain rt;
    5.  
    6.     // Use this for initialization
    7.     void Start()
    8.     {
    9.         rt = gameObject.GetComponent(typeof(ReliefTerrain)) as ReliefTerrain;
    10.         tex = Resources.Load("ROAD_HEIGHT") as Texture2D;
    11.         rt.globalSettingsHolder.splat_atlases[0] = tex;
    12.         UnityEngine.Debug.Log("Loaded texture named " + tex.name);
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update()
    17.     {
    18.         if (Input.GetKey("9"))
    19.         {
    20.             tex = Resources.Load("Sand_diffuse") as Texture2D;
    21.             rt.globalSettingsHolder.splat_atlases[0] = tex;
    22.             rt.RefreshTextures(null,false);
    23.             UnityEngine.Debug.Log("Loaded texture named " + tex.name);
    24.         }
    25.     }
    26. }
    ATB, Tom
     
    nasos_333 likes this.
  28. adammil2000

    adammil2000

    Joined:
    Aug 25, 2013
    Posts:
    19
    Hi Tom,

    Regarding your solution to my earlier question: "Solution is refreshing function that must be called". It didn't work. I still have to alt-tab to see the texture update. Any other ideas?

    Thanks!
    Adam
     
  29. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,290
    Great, amazing work :)
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You can try with this refreshing function:

    Code (csharp):
    1.  
    2. rt.globalSettingsHolder.RefreshAll();
    3.  
    Tom
     
  31. Bigpete591

    Bigpete591

    Joined:
    May 7, 2013
    Posts:
    60
    I have purchased RTP and TerrainComposer and although they are amazing programs, I am terrible at using them!

    Is anyone interested or know anyone that might be interested in getting paid to make terrain for levels in a new hardcore fantasy MMO called Reagent?

    We have decided it would save time and yield higher quality to hire an expert to make the terrain we can use in our MMO levels (about 12-15 small zones, each about 250-250 in size). We can do the rest once we have the base terrains for the levels! Most of the programming and content is already finished, we just need the terrain for each level to put it all together.

    Our levels will be small, we don't want any large open spaces, just some areas for mobs and constricted pathways with mountains limiting where the player can go. I can draft the levels on paper and send it to the terrain artist to build.

    If you know anyone interested, please have them email me at thaiblazo@gmail.com - I am hoping the right expert can generate each small terrain in a few hours. We have purchased TerrainComposer, RTP, and can buy any Texture/Vegetation Packs needed to make each terrain look beautiful. Please get the word out to anyone you know that has experience making terrains for use in a fantasy mmo!
     
  32. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Given the world position, is there any functions to get texture ID (with the most influence?) I needs this adapt UFPS footstep manager to RTP, originally it reads splatmap from terrain, and based on weight, returns the int of texture used at this sampled point. I could use the actual terrain splatmap data, but in my game all my terrains are meshes, and so here I'm stumbled on how to approach this.
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Even on mesh RTP uses splat control maps for coverage. I also use this to detect which is "most prominent" layer under cursor when we press L on keyboard to quickly select such layer (see my first steps video). You can even try to get it from the code placed in my editor (check where L key pressing is detected in ReliefTerrainEditor.cs).

    Tom
     
    RyuMaster likes this.
  34. Lanaany

    Lanaany

    Joined:
    Dec 20, 2013
    Posts:
    14
    Thanks for the quick response. Would it be possible to enable the sliders for RTP-Terrains in the future? The possibility to handle the IBL-response of each layer seperately is quite nice, but I would really appreciate if there was a way to handle it globally through the sliders, once each layer is set.

    The global sky rotation seems to have no effect even if 'skyshop cubemaps rotation' is set.

    Best,
    Lanaany
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yes, I could add global Skyshop exposure, too. Might be an option for next release. Sky rotation should work as soon as you enable this suboption in LOD manager (next to skyshop integration checkbox).

    Tom
     
  36. Lanaany

    Lanaany

    Joined:
    Dec 20, 2013
    Posts:
    14
    Thank you, sounds great! It would be nice if there would be an option to use the skyshop handles, as you need them for all other objects, materials, grass... in a scene.

    Unfortunately, the sky-rotation still doesn't work, I have double-checked the 'skyshop cubemaps rotation' and recompiled the shaders, but I can't see any effect on the terrain.

    All the best,
    Lanaany
     
  37. adammil2000

    adammil2000

    Joined:
    Aug 25, 2013
    Posts:
    19
    Hi Tom,

    That worked! Thanks!!!

    Adam
     
  38. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    I get this in Unity 5bx

    Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs(2540,216): error CS0117: `UnityEngine.LightmapsMode' does not contain a definition for `Directional'
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You need to fix it manually. As I remember I answered this here:

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

    Will look into this and get to you (here) soon.

    Tom
     
  40. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    "You need to fix it manually"

    Yes, thanks, never tried it back then, but was easy and I wasn't sure it would be for me.
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    New tutorial describing RTP vs. Shadow Softener usage.



    ATB, Tom
     
  42. iamsteele

    iamsteele

    Joined:
    Mar 25, 2014
    Posts:
    29
    Hi, just purchased RTPv3 Last night, loving it so far!

    I have a quick question, which I'm sure has a simple answer, but given how quickly people seem to reply on this thread I figure'd that I would ask it here:

    I enabled caustics, and can see them appearing on the grass in the demo, but they do not apply to the sand layer for some reason. I have adjusted the height up and down and referenced my water object and either way it appears not to apply caustics to the sand layer... any help?
     
  43. iamsteele

    iamsteele

    Joined:
    Mar 25, 2014
    Posts:
    29
    fixed by savings the settings from the demo as a preset and updating the settings in my implementation.. .not sure where the problem was.
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I guess your problem is that for example scene and 4+4 configuration sand is add pass shader, so you need to enable it also in Add Pass (LOD manager). I made it separately because in most cases you might not need caustics on both passes (it costs a bit, so makes no sense to render it where it's not needed).

    Tom
     
  45. crazyhorse666

    crazyhorse666

    Joined:
    Feb 25, 2012
    Posts:
    37
    Hello tom ,
    i am currently knocking up an architectural model of a zone in paris i am implementing your rtp 3.1
    i cannot seem to get rid of black perlin artifacts see pic attached i have maximised perlin normal distance start and fade length to get the visible cone as big as possible but still not all the terrain is visible what can i do ??
     

    Attached Files:

  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    From you screenshot I can't tell what's wrong. I can only see that RTP renders black beyond its far distance. Might be so many reasons. Is it forward or deferred ? What's your exact LOD manager setup. How many layers do you use. What's your light setup ?

    Tom
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I found bug as Skyshop changed global variable name. In new RTP3.1f version (should be available soon) this is fixed. I also plugged Skyshop global diffuse IBL, spec IBL and master exposure sliders to RTP.

    Currently I'm waiting for new RTP3.1f submission which will also fit to new Lightmapping video tutorial (45 minutes - covers all lightmapping scenarios)

    Tom
     
  48. Lanaany

    Lanaany

    Joined:
    Dec 20, 2013
    Posts:
    14
    Brilliant! Can't wait to try it out, thanks a lot!
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Lightmapping video tutorial is ready, but RTP3.1f (which I used making video) is still on the way. I hope will be tomorrow.



    The video covers:
    1. single lightmaps with RTP's bumpmap recovery
    2. dual lightmaps (bumpmap recovery)
    3. directional lightmaps - using mesh proxy to fix terrain missing tangents
    4. RTP's global ambient emissive map & brief integration with geom blended tunnel (on example scene)

    Tom
     
    Last edited: Oct 12, 2014
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Good news - I've just saw RTP3.1f is available on AssetStore, so you can follow Lightmapping video with current RTP version which I was making tutorial on. Remember to "backup" (write down ?) LOD manager settings because installing new RTP over existing one will reset shaders settings to their initial state.

    ATB, Tom