Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    Hi Tomasz,
    Real fast, can you think of any reason why the terrain would be totally invisible after upgrading from unity 4 to 5? I notice if i switch it off of the "custom" material (AKA RTP) you can see it, but obviously that's disabling RTP so not useful. I'm on RTP 3.2D and latest unity 5.

    Thanks!
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Check rendering mode - in deferred there are sometimes problems (due to missing custom deferred shader). Also - check tessellation features they can give impression of terrain invisible (badly dosplaced due to missing height&normal texture). Check on my example scene after importing RTP.

    Tom
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    In deferred you need to open geom blend shader and remove Fallback directive at the end to make it working. Sorry I didn't want to provide package with both versions (deferred and forward/legacy def.) that would differ with only this small tweak.

    Tom
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Looks like you're using "no detail color at distance" in LOD manager while your global colormap is nor present. That's what come's to my mind quickly.

    Tom
     
  5. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Hi, i found it was the fog settings.

    I want to change the tile size of one of my textures, how can i do this? Surely they dont have to all be the same tile size do they?

    Thanks
    Andy
     
  6. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    I'm running in DX9, not DX11, so there shouldn't be any tessellation going on at all right? It's invisible in both the editor and game.
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Oh yes, it does need to be the same. Different tiling you can use when looking at the terrain from further distance (UV blend tiling slider to be set per layer).

    Check alpha value of global color texture - if it's zero - terrain is "on big hole" :) - as far as you've got terrain holes enabled in LOD manager (which is the case when you imported RTP by default).

    Tom
     
  8. ThunderTruck

    ThunderTruck

    Joined:
    Sep 25, 2013
    Posts:
    61
    Hi Tom,
    I have the same problem of @Skittlebrau in U5f4 linear and new deferred in geometry blend shader with 'fallback off'...
    The problem is the innatural color not the blending with terrain. However the shader with the extension _U5 (water ecc..) works quite well
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Innatural color - could you give an example ?

    Most of geom blend shaders are not PBR (configurable one are), but they don't have the same PBR pipeline used as they are rendered in forward while your terrain is rendered in deferred using Unity's PBR pipeline. That's the problem of matching each other.

    Tom
     
  10. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    Thanks Tomas, that "hole" thing fixed it.
    Excellent support as always!
     
  11. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Hey Tomas,
    im running into the following when I click render control maps from source splats:
    IndexOutOfRangeException: Array index is out of range.
    ReliefTerrainGlobalSettingsHolder.RecalcControlMaps (UnityEngine.Terrain terrainComp, .ReliefTerrain rt) (at Assets/ReliefPack/Scripts/ReliefTerrain/_Internal/ReliefTerrainGlobalSettingsHolder.cs:2857)
    ReliefTerrain.RecalcControlMaps () (at Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs:534)
    ReliefTerrainEditor.OnInspectorGUI () (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:1941)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1150)
    UnityEditor.DockArea:OnGUI()

    In unity5, using your latest, 3.2d
     
  12. Macolik

    Macolik

    Joined:
    Feb 6, 2013
    Posts:
    6
    Thanks for this great asset! :)
     
    tomaszek likes this.
  13. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    RTP POWER!! :) Great work, very realistic lighting!
     
    Macolik likes this.
  14. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Is there a way of acheiving a far texture to not have any perlin or other texture overlayig it?

    My project is mostly high up near cliffs and mountains, and i have been able to get good results for the cliffs and far mountains. The problem is, I want to have the ground, the lowest flast land inbetween mountains to be like a "satallite image" so it shows fields and i just cant get a good result.

    I am also using terrain composer...

    I have tried having the fields texture as a layer, but the blend tile size is just not big enough.

    I have tried having having the fields textures has the global color map, but then the perlin noise that gets applied to it just makes it just very odd, turn that off and then the far mountians dont look good?

    How can the above be done?

    Thanks
     
  15. Earthsnake

    Earthsnake

    Joined:
    Feb 25, 2014
    Posts:
    30
    Hi Tom. I have 2 quick questions.

    1. I'm trying to add custom texture to my terrain (I'm also use terrain composer asset), when I use RTP, the texture won't show like it should be (it shows alright without RTP in terrain composer). I've edit the normal and heightmap on terrain's inspector and refresh it, what do I miss here?

    2. How to adjust lighting for making a night scene? I've followed your tutorial on youtube (lighting tutorials, there are few of them), and in my scene, there's some kind of glowing stuff on my terrain, it makes my terrain bright like its on afternoon time.

    Great asset btw, really like the shader effect, it's awesome :)
     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Perlin can be appliedper layer that means you can remove it from certain layers. The same for UB blend. Isn't it enough for what you'd like to do ? You could also go to ReliefTerrainEditor.cs and find the place where UVblend tiling code for slider is present and tweak available range (in the script just Ctrl+F for slider description to quickly find the right place in code).

    Tom
     
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Could you reapply RTP component on terrain that have either 4 or 8 layersand then try ?

    Tom
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    1. Custom texture ? You mean detail texture ? You do it using RTP's per layer detail texture slots. RTP ignores normal textures that are setup in Unity's layer normalmaps - only colormaps are taken when RTP component is added to the terrain. In TC, however, you can declare detail color, normal and heightmaps per layer for RTP as far as I know.

    2. In forward rendering path there is complementary lighting turned on by default. Tweak it in RTP/Settings/Main for the night scene.

    Tom
     
  19. Skittlebrau

    Skittlebrau

    Joined:
    Jan 8, 2013
    Posts:
    34
    Thank you, this helped a bunch.
     
  20. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    Hi, Tom.

    In DX11 all is fine. But in DX9 mode - i have pink color. DX9, Deffered, Linear space.
    I disable many function, but i see only pink color on terrain. And when i disable Triplanar in First pass - shader began works. Why? In unity 4 working normally, slow, but normally. Please, see on screenshot:
    RTP.jpg

    Thanks in advanced.

    With Best Regards, Leonid.

    P.S. Used latest version 3.2d
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Unity5 changed compiler for DX9 platform from Cg to HLSL. Unfortunately this compiler is too smart and tries to optimize code using larger number of temporary registers. Reported Unity on this but answer was there's nothing can be done. Avoid 8 layers mode in first pass. You can also open RTP_Base.cginc and RTP_AddBase.cginc. At the beginning there are two defines for HLSL in DX9. They make shader smaller but slower. If they are both enabled (which is the case I remember for RTP3.2d) - indeed there's nothing I can do... :(.

    Tom
     
  22. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    I have done exactly as you have done in your videos and I get these errors and cannot get the plugin to work. I have uploaded a video so you can see exactly as I have done. these are just a few of the errors I get upon import. RTP3.png
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Are you sure this is RTP3.2d ? Maybe you should update it in AssetStore download area (in the packages you bought tab). Maybe there is problem with older RTP version cached on your machine. Try to find package in your personal folder and remove it. Then download it again from server. Do you use U5.0.0f4 ? Is it windows (DX9/DX11) or mac ?

    Tom
     
    Unlimited_Energy likes this.
  24. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    So for the past several weeks I've been trying to figure out why the terrain scenes in my game are so ridiculously huge, like several hundred MB in size, up to 500mb with very modest settings.

    I finally got some help from a guy who knows how to deconstruct unity scenes (the creator of SECTR) and this is what he told me today:
    My first thought was, "Oh hell, is this something RTP is doing?" My settings are extremely modest. I'm only using a 4-pass in total because anything more than 100m away is just the global color/normal maps which are only 1024 in size.I even have "no detail textures on distance" and yet here we are.

    How do i clean all this stuff out?
     
  25. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Hi, I have finally got my head around RTP and starting to get good results. The problem i am now facing is i and other users have noticed around about a 30 - 40fps drop, is this normal?

    I am only using 4 textures (which are 512 x 512), and as far as i know apart from "no spec" everything else is left as it is. I have tried disabling the "fix refreshing" but that makes no difference. Is there anything I can do to help increase FPS?

    Also noticed on my PC (where everything 'looks' ok) and other users computers where they report strange things like "no textures just colors")

    I see this is the logs (including mine?)

    Code (CSharp):
    1. WARNING: Shader Unsupported: 'Relief Pack/ReliefTerrain-FarOnly' - Pass 'FORWARD' shader state not supported
    2. WARNING: Shader Unsupported: 'Relief Pack/ReliefTerrain-FirstPass' - Pass 'FORWARD' shader state not supported
    Andy
     
    Last edited: Mar 18, 2015
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Gloss MIP data is used only when you bake gloss, otherwise it shouldn't affect scene storage. I can't tell how Unity stores data inside scene file, but it indeed seems that there are often stored things that are not referenced anylonger by any object. RTP uses textures as scene objects until these textures are saved explicitly (look at combined textures tab in RTP and global colormap tab). So when actual textures are saved they are not referenced by scene any longer. Thus saving scene should invoke cleaning process. Anyway - there is a script included that's called when making a build - it's supposed to cleanup all unused textures so they are not included. This, however does nothing with scene files.

    I'd need to have your setup (exact from scene and LOD manager) then we could thing how to make it faster. What's your hardware ? How many terrains do you render ? We need to talk in terms of miliseconds used by RTP. It's AAA shader for a reason so it can't cost 5 textures looks + a few arithmetical ops like default Unity shader does. If 30-40 fps drop comes from 200 to 160 - you don''t need to worry (RTP takes as low as extra 1.5 ms pwe frame on your GPU). But if drop is from 50fps to 10fps - yes - there is something wrong if your hardware is pretty decent. Low end laptops can't be considered for AAA rendering, but low range desktop GPUs like nVidia 240 series can make it.

    About the mentioned warning - is it present on built game ? You should test it on DX9, DX11 and openGL before you release (on Windows it's possible to run Unity editor/player using "-force-opengl" - it's a bit buggy sometimes but makes a job when it comes to quick checks on validating openGL platform). If shader can't be used - fallback is used then terrain will render using basemap diffuse shader (only color no textures).



    Tom
     
  27. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    I deleted the RTP3 in Unity Asset Store personal folder on my machine and re downloaded it and the same thing is happening. I'm using the most up to date version of RTP3 3.2d and I have unity 5 64bit professional 5.0.0b17 DX11 and I have Windows 7. Same Errors are coming up.
     
  28. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    @sunseeker1988 did you delete the actual download from within C:\Users[your username]\AppData\Roaming\Unity\Asset Store?
    As the new download may not be over writing the original.
     
    Unlimited_Energy likes this.
  29. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    yes I deleted the download in that exact folder.
     
  30. Morfeuskiev

    Morfeuskiev

    Joined:
    Oct 10, 2013
    Posts:
    122
    Why you don't upgrade to newest version of Unity 5? Many Unity betas and RC are different. Latest RTP Works in latest Unity 5 builds.
     
    Unlimited_Energy likes this.
  31. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    I am downloading Unity 5. I was unaware that it was out of beta...... I never get e-mails from unity.
     
  32. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    100% working on the new unity 5.0.0f download. Thanks morfeuskiev
     
  33. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    I appreciate the words but that doesn't tell me at all how to fix anything. So we've established that RTP is including a bunch of junk that we don't need in the scene files. Cool, so how do you get rid of it?
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I can't tell how Unity mananges things internally. I made a simple test:

    1, added terrain with 8 layers (example one)
    2. added RTP component
    3 saved scene - 18KB
    4.added all normalmaps, heightmaps, derived global colormap fropm splats - these were Texture2D scene objects
    5. after saving the scene - 17MB (combined scene textures are serialized into scene file)
    6. baked gloss for layer 1, saved gloss data to the file, scene increased its size by 400KB
    7. in combined textures - saved all textures (4 combined normalmaps, 2 combined heightmaps, special combined texture that comes from perlin, global colormap)
    8. saved scene - no difference 17MB

    That's the moment Unity was supposed to remove unreferenced scene Texture2D objects (now they are saved so RTP component references texture assets, not scene objects). So - there is something wrong with cleanup process here.

    Now the funniest part. Just for test I cleared glossdata from layer1, rebaked it, saved scene. Guess what - scene file dropped down to 430KB while I haven't manipulated any other texture in RTP component. Then cleared gloss data again, saved scene - now it has 87KB. But I can't tell why it behaves like this.

    Anyway - saving all textures that RTP uses (combined, global colormap) is must. Then you can reuse them between scenes (drag&drop them between scenes in combined textures tab). But still I can't tell at which stage Unity decides about clearing temporary textures the RTP once made. Maybe trick with gloss data will work for you, too.

    Tom
     
  35. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    See what you're doing there is already much much more advanced than anything I even use RTP for. I don't do global colormaps from splats, gloss, or baking anything ever, and my scene with just one terrain and a camera is 120mb huge.

    But that sounds like a great idea. So how do I "clear gloss data from layer 1" and "rebake" stuff.

    Thanks again.
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Refer to my pdf docs. Every layer has gloss bake section, simply click bake, then save it. Then you can clear gloss data asset slot or reassign already made. There is also clear button.

    Tom
     
  37. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    The scene shrunk 200kb in size.

    Which means it's down to just 119mb. Still ridiculously, impossibly, huge, especially when i have 16 scenes, each with one single terrain in them that are now completely bloated. The scene still contains those "glossdata" textures from RTP embedded in it permanently. Unless you're willing to investigate and correct the malfunction, sadly I don't see how I can keep using RTP in our game if it's going to continually corrupt my scene files by adding 100+mb of junk to each scene file just by having it applied to any terrain in that scene.

    Any chance these old embedded textures are orphans from an older version of RTP before i updated a few weeks ago?
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Drop me a line PM, I guess we should check it together via skype screenshare call.

    Tom
     
  39. Deleted User

    Deleted User

    Guest

    Testing ToD + rtp3 + u5

    works without problems :) btw. sorry for these ugly trees... they are standard.



     
    Roni92, red2blue, Becoming and 2 others like this.
  40. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So I was putting in a day/night cycle and ran across a strange issue (see attached) with point lights on terrain when directional lighting is turned off. Could be a unity issue, but it only does this on terrain so thought I'd check here. This is in forward mode, in deferred it works fine (but have tree issues in deferred which keeps me using forward).

    So activate a point light and it works fine until you turn off the directional light. It also looks correct in the scene view, it's just the game view where stuff turns white.
     

    Attached Files:

  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I'm aware about this issue and were not allowed to turn off dirrectional light. Just keep it's intensity like 0.01. Don't worry about performance - with directional light will be the same. Also you could try to turn off complementary lighting in LOD manager to fix it.

    Tom
     
  42. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200

    Looks really nice. What is ToD?
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Hi guys, I think this package should be also interesting for everybody making outdoor scenes in Unity:

    https://www.assetstore.unity3d.com/en/#!/content/31861

    Here's demo video:



    Well, I made shaders for this with all its consequences :D. Demo above doesn't present dynamic snow included which is compatible with RTP's snow so you can make dynamic seasoning in your scene.

    Tom

    P.S. @red2blue - ToD=Time of Day (available on AssetStore)
     
    twobob, red2blue and Deleted User like this.
  44. Deleted User

    Deleted User

    Guest

    Thanks!

    Time of Day
     
    red2blue likes this.
  45. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Time Of day. note the various lighting conditions.
    I actually thought he meant TC (terrain composer at first...) but yeah TOD spins celestial bodies IIRC (or was that unistorm... hmmm) and some lighting
     
    Last edited: Mar 20, 2015
  46. BreakingPointDev

    BreakingPointDev

    Joined:
    Mar 20, 2013
    Posts:
    16
    I've been having issues since Unity 5 came out. My big issue now is when I enable RTP through terrain composer my terrain goes back to being flat and applying a heightmap does nothing. So I'm stuck with a flat terrain. When I did have it working before this issue my terrain was overly bright, turning off the ambient reflect panel in the lighting tab got rid of the extra brightness but I didn't have good ambient lighting.
     
  47. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    @UnknownDeveloper Ambient light was broken AIUI in u 5_0 up till p2? However choosing Gradient or Single Color for the Ambient /did/ work. I think that info is correct. It would result in black terrains sometimes.
    Heightmap - no idea.
     
  48. TDH_DrThirteen

    TDH_DrThirteen

    Joined:
    Jul 3, 2014
    Posts:
    42
    Hey Tom,
    I am a big fan of the Relief Terrain Pack and I was wondering if you could tell me:
    1. What are the features that influence the performance the most?
    2. Which features would you recommend that a beginner should use to get the best looking result?

    Thanks in advance.
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Overbright - you can use any kind of ambient light that comes from Unity or skip it for terrain. You can turn it off in LOD manager - "no ambient" checkbox at the top. You need to remember that RTP uses more on this - complementary ambient lighting is by default turned on. To adjust overall terrain brightness you can fiddle with RTP/Settings/Main global brightness.

    Flat terrain - if this is related to RTP - there is no explanation other than you're using tessellation features turned on, but you've got no height&normal texture used. Follow tessellation tutorial video on my youtube channel to get more info.

    1. POM with self-shadowing
    2. triplanar
    3. global wetness with droplets enabled

    Any feature turned on cause performance drop. So - when we talk about a feature - it's not thatexpensive. When we talk about most features turned on at once (which is often not possible due to resource available limitation) - this might get quite expensive on low-end GPUs.

    Default settings are rather modest in terms of performance, yet still can provide very good looking terrain. Look at features enabled by default when you install RTP (3.2d) and llok at example scenes.

    Tom
     
  50. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    Its only when you use TC and then enable the RTP with their button. Any terrain you had instantly goes flat. Maybe warrants a test? either you or TC guy?