Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    OK, thanks.

    Do you think this DX11 texture handling array functionality will be available in Unity 5 ?
    Or am i asking something you don't know either here, cause that sounds fantastic.
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I haven't hear about this. You need to ask someone else :).
     
  3. Uzopoza

    Uzopoza

    Joined:
    Feb 26, 2013
    Posts:
    39
    Where I can change UV blend routing or reset slider on 8th layer?
    In attach my LOD manager settings

     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You need to enable at least first pass - then you'll have foldout for this enabled. Look at my first steps video (new version).

    Tom
     
  5. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Hey, I'm having this odd problem, and I can't work out what's going on. I'm using TC, RTPv3, and AFS is in the project (AFS is not in the scene). I'm using deferred rendering. ReliefShaders_applyLightForDeferred is applied to the camera.

    As I move around, the area in front of the camera is this very light colour. I had a similar problem before, where the area further away would be completely black.

    Any help would be greatly appreciated!

    Edit: Using DX11
     

    Attached Files:

    Last edited: Aug 18, 2014
  6. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    How to I remove caves? (Alpha texture)
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    The script should be attached to the main (directional) light, not camera. Refer to my new video and docs. This Should solve the problem. If the problem is also experienced in forward you can also have issues with detail normalmaps. Check if they are properly managed (combined) in combined textures / normals tab.

    Cut holes feature can be disabled in LOD manager. Place white alpha channel in global colormap to remove them, too (when the feature is used). Refer to my docs.

    Tom
     
  8. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
    Capture.JPG After applying the settings for DX11 mode/PC, adding 1st pass and recompile.. I get a weird tiling effect... See screen capture below. I am currently using Unity 4.5.
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    How many terrain tiles do you have on the scene ?
     
  10. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
    Not sure.. I used WC for this.. Extracting a 16km x 16km area. tiles are = to 15x15
     
    Last edited: Aug 19, 2014
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I could imagine it's something like 16x16 looking at this liting issue. When you're using WC - after placing terrain objects you can add RTP component manually (with multiselection). Then - I'm not sure but this is probably what can be done in WC - you can automatically assign global color textures from WC to RTP. When using such number of tiles uncheck "U4 materials" in LOD manager.

    Tom
     
  12. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
    Thank you Tom, I will give this a try and let you know of the results.
     
  13. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
  14. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
    Any help with this.. would be greatly appreciated.. ^
     
  15. JOPs315

    JOPs315

    Joined:
    Aug 12, 2014
    Posts:
    7
    Capture.JPG I was able to get RTP working... somewhat, but I have this weird thing happening here with theses tiles
     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If you don't use materials (you shouldn't or you'll kill CPU with such number of tiles... :) ) this might mean that some tiles got different reference to globalSettingsHolder object inside ReliefTerrain object attached to a tile. Normally they all should have the same, shared globalSettingsHolder object. Quickest way to check if this is the case (this is a bug, I know) is selecting one tile and going to any RTP section in inspector. Then when you select the other tile (which differs in look) RTP inspector there will be probably in different "state" (section). This means that your globalSettingsHolder object is not shared across whole scene, but, somehow different tiles uses different globalSettingsHolder which is supposed to be the same for whole scene. I'm not sure if this is RTP bug or WC causes this somehow when managing automatially RTP. You could ask nathaniel about it. This moment you can remove RTP from every tile (multiselect them and remove RTP component). Then apply it again. First for one tile, then via multiselection for the others. RTP globalSettingsHolder should be the same then. The only problem for you is assigning global colormaps (and global normalmaps if used) to every tile. If WC can't do it separately, you'll probably need to make it by hand or write script for that (tglobal colormap variable is exposed as public for every ReliefTerrain object and listed in my pdf so this is not that hard to make).

    Tom
     
  17. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Hey, any plans on a timeframe for compatibility with Unity 5? As expected, there's a bunch of errors :)
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'll try to look into this as soon as I get beta.
     
  19. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Any news on a multiterrain, 8 textures tutorial?
     
  20. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    Where is location of LOD data?
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Sorry, don't understand question... Which LOD do you mean. Shading LOD level (like POM, SIMPLE), LOD manager object, another levels ?

    Tom
     
    Last edited: Aug 21, 2014
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I took a look on this and it seems ... not that bad :), but as you probably know we can not discuss U5 beta issues in public... After installing RTP - use "patching" functionality (will convert scripts to versions that can be compiled). Then change 2 remaining error lines with opposite condition ".NonDirectional" in if statements. Then this will work. But still - U5 introduces changes in rendering pipeline. At this moment you can't use lightmaps (Unity's) - check nolightmaps in LOD manager or shaders won't compile for forward rendering path. Another issue is that 8 layers mode in one (first) pass doesn't work. Use 2 passes (4+4) or simply terrain that use only 4 layers (then only first pass will be used). I reported this to Unity and hopefully they will fix it before U5 is out.

    Yes, I've got it in my schedule for "near future" :). I'll proceed with more tutorials. You might notice there is new first steps tutorial done as it was most urgent "tutorial" job. So - as you're waiting for this I'll probably do it as next tutorial.

    ATB, Tom
     
    Last edited: Aug 22, 2014
    yezzer likes this.
  23. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    Hi Tomaszek

    just a question :D
    I use the uv blend to hide grass on the sand?
    The UV repetition is too visible


     
    Last edited: Aug 21, 2014
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's probably not related to UV blend, but heightmaps - grass layer bleeds on bumps of sand ("wins" in heightblend selection"). Try to increase sand coverage here (manually using Unity's terrain brush). When coverage in control splat texture is set to 1 you should get grass there.

    Tom

    P.S. Very tasty screenshot :).
     
  25. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Complete noob here, so please excuse this probably stupid question :p

    I am dabbling with Unity for the first time, and I am playing around with RTP at the moment. I have it working on my terrain (which now looks awesome!) however I wanted to mess with the water feature. When I load in RTP, global wetness is at 1 by default and the terrain is darkened by the effect. However no flowing water is actually visible anywhere on the terrain at all. What am I missing?

    EDIT

    Ok, so it was Water Level that was preventing the water from being seen! I can now see the water itself, but no flowing animation :(

    Here are my settings, and what I see on the terrain
     

    Attached Files:

    Last edited: Aug 21, 2014
  26. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    Thank ;) But, it's your work!
     
  27. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Nice, saw the new video and its a very good one : )
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You need to have perlin normal texture active. If you haven't visit perlin normal tab in inspector - do it. It's shown in my First Steps video tutorial (new one) - this produces combined texture. Then - make sure your layer use at least PM shading level. By default when you use 8 layers - layers 4-8 are marked to be rendered as SIMPLE which will not show you ripples (taken from perlin texture). After proper recompilation of RTP shaders in LOD manager you can adjust these settings per layer.

    Tom
     
  29. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    LOD manager.
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Follow my video tutorial - first steps. It's presented there. This the object added to the scene where you manipulate RTP features and recompile shaders.

    Tom
     
  31. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    I want to restore values from my backup or reset to default.
     
  32. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    "change 2 remaining error lines with opposite condition ".NonDirectional" in if statements. Then this will work."

    Thanks Tom!
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    To reset LOD manager to its virgin state its possible only when you reimport shaders from RTP package. For restoring RTP object (ReliefTerrain script) attached to your terrain you can use restore to default button at the bottom of inspector. Refer to my documentation (pdf).

    Tom
     
  34. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Thankyou! I needed to head to the perlin tab to initialize it! my bad.

    I experience an issue with the DX11 player setting in U4.5.3f3 where I need to turn it off to get RTP to display on my projects terrain. Switching it back on usually ends up with black terrain. It could well be due to running unity on my laptop with integrated graphics.

    Thanks for the response, and RTP is absolutely amazing!
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Apply ReliefShaders_applyLightForDeferred.cs script to the main directional light and this should work in DX11.

    Tom
     
  36. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    Hi,
    A video of my project with RTP3 + Terrain Composer.
    The island is made with 16 terrains of 2500 x 2500.
    Work fine in 64b

     
    _met44, tomaszek and Don-Gray like this.
  37. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Hey, so I have spent the past three days really digging into RTP3 but I have one outstanding issue that I can't skirt, help really appreciated.
    I am using Terrain Composer, AFS and RTP3.
    I can get the scene looking great but if I save the scene or when I first open I see the terrain as black or highly tiled without much of the effects applied until I go to the terrain composer and hit SetAll on the splatmap. This is troublesome as everytime I close and reopen the unity editor, save a scene or compile a verision it doesn't apply all the effects.
    my latest compiled version has the terrain looking like this.

    when it should looks like this in the editor after I hit <Set All>

    and this when I hit save, or first open unity, or Alt-Tab out.
     
  38. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Okay so the <SetAll> does the same as the Refresh All on the Settings>Main tab of RTP3 with the terrain selected. This is not occuring by default and is not saving when I save the scene
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Beautiful...

    This is the know issue of refreshing shaders parameters. This happens when you use materials (so preferably in setup of relatively small number of terrain objects present). Once I fixed this in RTP3.1c I restored to previous functionality in RTP3.1d. You can open ReliefTerrain-FirstPass.shader and look at comment in line 17-18. Uncommenting material property section will resolve your issue, but beware - any property on the material list impact CPU hit adversely. The issue can be nasty in editor (you need to use RefreshAll button every time you save scene or alt+Tab) but this should not be the issue when you build your game (terrain is preapred at Awake call). This is dilema here - fixing issue can make your life easy in editor (uncomment property block in firstpass shader) but you'll notice in profiler that every terrain object in scene eats much CPU. So - the option is - uncomment this when working, but remember to comment it back when build the game.

    Anyway - don't worry that something hasn't get saved. Everything IS saved - the only issue is that Unity looses parameters that need to be present for shaders (they are not passed to terrain material after scene save or alt+tab).

    Tom
     
  40. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Thank you so much for a timely response, the issue was associated with having U4 and far distance selected in the RTP3 manager. Although the issue persists as you described it doesn't stay once I compiled so there is no issue.
     
  41. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Quick question with the geometry blending. Does it work with group LOD component for models?
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I haven't checked, but I doubt. you would need to process all LOD mesh levels (preparing correct vertex colors for blending).

    Tom
     
  43. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I suspected as much. I would think if anything you would see an obvious pop between the LOD's.
     
  44. minhdaubu2

    minhdaubu2

    Joined:
    Jun 10, 2014
    Posts:
    76
    Please help me Tom
    -Affter i update relief terrain (form 3.1 to 3.1d) it like this
    All setting is the same, just import, then reset RTP manager, i also re-attach Relief Terrain script to terrain.
    Before

    Affter

    All setting is the same :(
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi, are you aware about attaching script to main directional light (described many times before) ? Please give me exact LOD manager setup for shader recompilation. Quick idea is - do you use "no colormap at far distance" ? If so - there might be problem in DX11 indeed. I can give the fix then here on the forum here. This is not included in RTP3.1d (will do in 3.1e):

    Find this line in RTP_Base.cginc and RTP_AddBase.cginc:

    Code (csharp):
    1. float colAlbedoRGBmax=max(max(colAlbedo.r, colAlbedo.g), colAlbedo.b);
    and add this line below:

    Code (csharp):
    1. colAlbedoRGBmax=max(colAlbedoRGBmax, 0.01);
    If the problem is what I suspect this should fix the issue (remember to recompile shaders and Refresh All in terrain settings too).

    Tom
     
    Last edited: Aug 26, 2014
  46. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    NullReferenceException: Object reference not set to an instance of an object
    ReliefTerrainEditor.OnEnable () (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:70)

    :(
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Which RTP version do you use? It's virtually impossible to have such error in this line. Although you need to be careful about adding/removing terrain layers after you added RTP component to terrain object. Null refereces are most frequently caused by this.

    Tom
     
  48. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Hi Tom, what are u thinking about Unity 5 and RTP? :)
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Already answered a few posts above
     
  50. Iver_88

    Iver_88

    Joined:
    Aug 28, 2014
    Posts:
    6
    Hi. I bought this asset but after import, there is an error:

    Assets/ReliefPack/Editor/ReliefTerrain/GeometryVsTerrainBlendEditor.cs(36,33): error CS0117: `Tools' does not contain a definition for `current'

    How can i fix this error?