Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. skullofaplesiosaurus

    skullofaplesiosaurus

    Joined:
    Jun 16, 2014
    Posts:
    14
    Hi Tom
    I am having trouble loading multiple color maps with auto search. I can load a single color map on a single terrain, but when I use auto search, i see nothing. No change.

     
  2. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Hi this Asset is amazing !!

    One thing would be awesome, a custom speedtree/Unity Tree shader modification for snow.

    I tested the bonus shader and your uber asset but there is no shader for tree/foliage/grass , in my case I manage to "improve" grass shader to Add white tint based on snow amount also for speedtree leafs... the final result is more realistic with small amount of tint, that without it, but at the end, snow with same tree/grass/foliage textures, or snow trees/grass/foliage without snow its not realistic at all, and there is no point to implement it (at least in my scene).

    Thanks for your hard work !!.
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If the problem is RTP related, it's known issue. You can check if your terrain tiles have proper global colormap slice assigned in RTP/Settings/Global maps.

    You can upgrade to RTP3.3d where the problem is fixed:

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

    Tom
     
  4. skullofaplesiosaurus

    skullofaplesiosaurus

    Joined:
    Jun 16, 2014
    Posts:
    14
    "You can upgrade to RTP3.3d where the problem is fixed"

    I followed your link but it requests an Order number and a date. Where do I find my order number? And, what does Date (RRR-MM-DD) mean?
     
  5. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021

    Hi @skullofaplesiosaurus,

    The order number is the same as the invoice number. In the unity ide on the asset store tab click on your login name and then select creditcard/payment. This will bring up your order history. Find RTP and the order number is the one in bold starting something like #3xxxxxxxx or whatever. The RRR-MM-DD is the date you bought RTP which is listed next to the order number. Just put it in the same format even if your region has a different date format. eg 2016-12-31

    Hope that helps

    doc
     
  6. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Hello again, so i've encountered another problem, when i zoom out, zoom in, there is area without perlin noise...

    attached screen
     

    Attached Files:

  7. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    It's how my texture looks like
    It looks like a weird layer covered it! it doesn't looks so good because there is no detail
    Any suggest why my textures looks so bad?
     
  8. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Is there a way to assign a material to a mesh to have it basically show the RTP terrain texture right underneath it? Like, acting as if it were the terrain at whatever X/Z position it's at. I've been messing with the geometry blend options but haven't been able to get it to work like I'm thinking.
     
  9. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Go to "Perlin normal" Setting and increase Fade length to 20 or better 30. I am using "Distance Start" with 50 and "Fade Length" with 30. Transitations are much better than. You have a minimum of Distance Start of 5. So working without Fade length you will always see such a round place without perlin.
     
  10. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Hey Tom, there's something really weird going on with the DirectX 9 shaders in RTP 3.2. Do you have a Unity 4/RTP 3.2 project still set up? If so:

    • Import RTP 3.2. Default settings are fine.
    • Run the terrain scene.
    • Untick "Use Direct3D 11" in the Player settings.
    For some reason DirectX 9 mode, whether used in-editor or in a release build, is causing a bunch of crazy flickering (z-fighting maybe?) on the distant terrain. On top of that, it's missing a layer of UV blending. Or at least it is with my Radeon 7850. Do you see this too? Distant terrain also comes out very sharp, like it's missing some anti-aliasing.

    I'd be happy to have DX9 mode miss some things like, but it needs to fall back gracefully.

    DX9:


    DX11:


    (I recommend opening both and flicking between tabs - the missing UV blending and sharper background on DX9 is more obvious that way)

    DX9 Flickering:


    The "sharper" background on DirectX 9 doesn't look much worse in the example terrain scene, but one of my own ground textures in particular really brings it out (I may also be using slightly different settings):

     
    Last edited: Mar 29, 2016
  11. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    The minimum perlin distance actually matches the near distance value in the Main settings. So if you really want perlin that goes right to zero, you can change the "Distance start" in Main to zero, then put the perlin setting on zero as well. I first noticed that because the terrain example does it.
     
    Last edited: Mar 29, 2016
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Perlin is applied at so called "far distance". It's set in Settings/Perlin normal tab. You can set far distance start even at 0, but you can set close distance start to zero as well (RTP/Settings/Main). This dependence is described in my docs.

    Tom
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    With a screenshot alone I can't help much. Provide me with all settings and setup you used.

    Geom blend - yes place the object and blend it completely with terrain. Then you can even disable overlying object( as it's fully transparent then) and see only underlying mesh that "mimics" terrain underneath. This might be helpful to locally increase detail of terrain shape.

    Tom
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I can check it on U4, but while it works on DX11, it's rather platform dependent problem (shader compiler output for DX9 and DX11 is definitely not the same on Unity side) rather than shader problem. Another problem is backward competibility. Unity4 I've decided to not support anymore - sorry. You can give me RTP version used and Unity version used though. I can take a quick look (provide me with LOD manager setup you're using). It might be also problem of output shader against certain hardware. For example Intel HD3000 series are of special danger (a lot of troubles with using text2Dlod calls).

    Tom

    Tom
     
  15. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Understood, support must take a lot of your time. This is Unity 4.7.1 (released 25 February), RTP3.2, and settings can all be left at default, just follow the steps in my previous post.

    The Radeon 7850 is a pretty capable card so it shouldn't have any particular trouble. I've got the latest drivers etc.

    Just tried it in Unity 5.2, same terrain demo scene still with RTP 3.2, and things look fine in DX9 mode, so you seem to be right about it being a problem with Unity's shader compilation. :(
     
  16. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I'll dig through the code a bit, but when Geom Blend creates the new mesh, is it just copying the original mesh and changing the UV's? In my case I have a dynamic mesh that's basically a section of modifiable voxel-ish terrain within a larger standard Unity terrain, so I am changing the mesh at runtime.
     
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    As far as I remember implementation geom blend for underlying object makes usage of uvs only for global mapping (so the global colormap is applied the same way on underlying geom blend object as on terrain underneath). Detail uvs are taken basing on world xz position. So it's pretty easy to make your own mesh that behaves exactly the same like underlying geom blend object - simply copy uvs like terrain underneath has using downward projection, then use the same blend base shader on material and feed it with the same properties main terrain below has. For voxel forms it might be necessary to use triplanar variant selected in LOD manager to remove stretching on voxel cliffs.

    Tom
     
  18. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Had a bit more of a look at the shaders and my DirectX 9 issues but I haven't worked it out. Interested to see what you think when you check it out yourself.
     
  19. ScottSummers

    ScottSummers

    Joined:
    Jul 12, 2015
    Posts:
    27
    Is it possible to paint on terrains and avoid stretching by using triplanar shading?

    I've been trying to it figure it out for a long time. But this is an amazing kit, thank you!
     
  20. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Hey Tom,

    So I saw an earlier post about this but the guy was building for WebGL not desktop.

    My AddPass shader is spitting out errors, causing the terrain to go pink on a windows build, here's the details:

    Initialize engine version: 5.3.2f1 (e87ab445ead0)
    GfxDevice: creating device client; threaded=1
    Direct3D:
    Version: Direct3D 11.0 [level 11.0]
    Renderer: Intel(R) HD Graphics 520 (ID=0x1916)
    Vendor: Intel
    VRAM: 2156 MB
    - unnecessary stuff -
    WARNING: Shader Unsupported: 'Hidden/Relief Pack/ReliefTerrain-AddPass' - Pass 'FORWARD' has no fragment shader
    WARNING: Shader Unsupported: 'Hidden/Relief Pack/ReliefTerrain-AddPass' - Pass 'FORWARD' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/Relief Pack/ReliefTerrain-AddPass' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/Relief Pack/ReliefTerrain-AddPass' - Setting to default shader.

    Thoughts?
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Triplanar option is part of RTP since RTP1.5 :).

    WebGL is quite limited, but give me your LOD manager setup and RTP version you're trying to make a build. I can take a look, maybe there is some relatively easy fix for this.

    Tom
     
  22. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Not building for WebGL - building for Desktop. Does that change anything?
    Using 3.3c
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Can you doublecheck the version ? (verinfo.txt file in ReliefPack folder) ? Also you can go and try 3.3d from my server.

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

    It makes no sense that only AddPass is problematic. What's your setup. Does RTP3.3c installed on fresh project work ? I mean the example terrain scene ?

    Tom
     
  24. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Trying this now.

    But what's the best way to uninstall the pack and reinstall? Because when i did that i fried my terrain stuff
     
  25. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160
    So many difficulties / glitches... :-(
    I gave up on having my terrain working with 8 layers in one pass, whatever i did try, my 4 last textures would always appears black....
    Now i am having an error with the tesselation...
    That is what happens when i enable tesselation when avalaible.
    ANd if i try to do it with a normalheight texture, the terrain simply goes flat, there again tried a lot of things, playing with all settings, even saved all the combined textures, made them readable.. everything... is there a fix for this kind of behavior ?
    PS : Working on a 16 terrains scene, i managed to make it work on a single small terrain with 1k heightmap res, but nothing other than that simple test.
     

    Attached Files:

    • erf.jpg
      erf.jpg
      File size:
      322 KB
      Views:
      2,220
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    To upgrade from 3.3 to another 3.3 you can simply install new on the top of previous and reesablish LOD manager setup/recompile shaders. For RTP3.2 to 3.3 - you need to remove ReliefPack folder. You can store you terrain setting using preset functionalities. Then after upgrading you can restore preset and tweak some settings that are different in case of new RTP version.

    Tom
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Have you followed tessellation tutorial on my yt channel ? For tessellation that uses displacement you need to prepare height&normal textures before enabling tessellation (otherwise you'll see flat terrain).

    For multiterrain setup you need RTP3.3d from my server. 3.3c has bug on this.

    Tom
     
  28. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    so this is interesting - when i install RTP to a clean project, then try to import the terrain we made, the terrain is invisible, and i cant access the terrain script because of this error:

    NullReferenceException: Object reference not set to an instance of an object
    ReliefTerrainEditor.OnInspectorGUI () (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:140)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)

    btw - on my computer all of your demos work fine in build mode.

    Am i doing something wrong when exporting the scene? What is the best way to move a terrain we created in RTP from one project to another?
     
  29. oantsmap

    oantsmap

    Joined:
    Aug 19, 2012
    Posts:
    7
    I picked this up a few days ago and had a hard time getting superdetail to work. It looks like superdetail only shows up when the LOD is higher than simple. Is that intentional? I didn't see it mentioned in the docs anywhere. We're not too interested in using parallax mapping so it seems like it would be a performance win if we could use superdetail in the simple LOD.
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Did you use preset ? On new project you've got Unity terrain made (4/8 detail layers). Install RTP. Add RTP component to terrain. Recompile shaders in LOD manager to have the same setup like in the old project. Use preset functionality to restore at least some of settings saved in previous project. If it spits exceptions it might be necessary to setup new terrain from scratch in RTP inspector. It's not that many parameters in the end. For features that uses the most params - the worst case would be water settings per layer.

    Superdetail is PM+ indeed. Heightmaps you need anyway (heightblending). Simple vs. PM shading mode performance in presence of superdetail is _not_ that much better - a few % at best. You would win with dynamic water maybe - simple dosn't produce flowing water wrinkles which is cheaper. Parallax alone is one of the cheapest features. You can decrease parallax height displacement RTP/Settings/Parallax if you don't like it visually. Notice we're talking about "regular" PM, not POM which is expensive.

    Tom
     
    Last edited: Mar 31, 2016
  31. oantsmap

    oantsmap

    Joined:
    Aug 19, 2012
    Posts:
    7
    Thanks, if it's not a performance concern we can tweak down the parallax and stick with that.

    One other thing is I locally changed the max ranges of the sliders for the near and far starts and fade. Our game works on fairly large scales and I wanted to have the layer normal maps visible from a bit further out. I'm guessing there wouldn't be any problems except for more fragment shader cycles? If that's all then maybe in the future you could increase the max values or make it configurable.
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I believe you can tweak distance limits w/o any side effects.

    Tom
     
  33. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160
    Yes i did follow your tutorial.
    Yes, all combined maps are in and working.
    Since the update, tesselation is showing up... in editor only, It shows all blue, really laggy, only at range...
    Again2.jpg


    Since the update, also run into a new issue... :
    Again.jpg

    There is a clear issue of lightning i guess between the close and far range.

    What i did try :
    Changing perlin sliders, changing color map blending sliders, disabling POM Shadowing, Changing pixel error, chaning UV Blending, recompiling shaders with a bunch of different settings everytime, ect , ect... All those things do impact the terrain, but i can not get rid of this "Fake" Shadow range...

    About to give up...
     
  34. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Hey Tom,

    Ok, I've exhausted all the options, here's what i've done and what i know:

    1. I created a fresh install of RTP, and imported the project into it. I experienced the same problem as before
    2. I do not have any problems with your demo scenes, they are fine.
    3. When i recompiled the shaders, i did get the pink effect same as in the build, but once i tweaked the settings and made it go away, it still appeared in the build.
    4. The terrain only goes pink when you get within a reasonable distance of it. If it's far away you can see it fine. I tried adjusting the LOD settings from the highest (PM? POM?) to simple, recompiled, no dice.

    All same as before - AddPass shader spits out the errors.
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    For tessellation it's optimal to go for 8 layers mode. You can effectively do 4+4 with tessellation but you need to disable "detail displacement" in LOD manager. However displacing detail works to some extent you can run into serious artifacts.

    If you're in deferred lighting path - 8 layers mode is must.

    Tom
     
  36. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Since I updated to RTP 3.2e I have again that pretty much annoying black switching terrain effect. To get rid of the black terrain I have to click on the black terrain and that over and over again. I can remember, that you told me there is a switch in a script file to get rid of this behavior. I didn't find it in the documentation, could you tell me again where this switch is?

    (Please write a line in the readme to avoid this issue. I guess everyone must have this issue.)

    Thanks a lot in advance!
     
  37. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    just out of interest:
    why is that?
    "If you're in deferred lighting path - 8 layers mode is must"

    always or just with use of tesselation?
     
  38. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    I ask for a better tessellation system
     
  39. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160
    So i removed everything, and reinstalled RTP 3.3d.
    I re-textured via TC, and and reimported raw height, ect.
    Now , everything is working again.
    Even the 8 layers in one pass is working.

    Thanks for the help and the tips.

    Although i have one more question :
    Would you have any idea why the shader craps itself, and fails to come back to work properly even after changing settings and recompiling ? Is it unity related ?
    Reason i am asking is that we are planning on a big production, and i really dont want to have that happening once the 128 terrains are in...
     
  40. Kapoosta

    Kapoosta

    Joined:
    Mar 18, 2016
    Posts:
    8
    Hi, it's me again ^^
    1.So here is another strange thing, after i use Place Tree tool in terrain tab, on each bush appears small ball of reflection probe(i guess) if i do so on a standart terrain without Lodmanager - all fine
    2. In Scene viewport everything seems fine with that rocky plant texture, but when i press play, it is very reflective..

    any ideas?
     

    Attached Files:

  41. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160
    After following the tessellation tuto, which is amazing, from 3000 drawcalls to 37 , pretty awesome . I am running into an SSAO issue. i am using Sonic Ether SSAO. I was wondering if anyone might have an idea how to fix it :
    RTP+SSAO.jpg

    It's like the SSAO is taking the actual height map to render depth , instead of the tessellated mesh.
     
  42. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    Hey Tomas,

    so I am trying to start over and see if i can replicate the steps and hopefully get rid of this pink terrain. The steps i did were:
    1. Import terrain data into empty scene, tweak settings
    2. Add RTP Engine script
    3. Refresh, recompile shaders

    Now, my terrain has 8 textures or layers, and when i do this i get 4 shader errors, and all of them have to do with there being 16 layers:

    Shader error in 'Hidden/Relief Pack/ReliefTerrain-AddPass': maximum ps_4_0 sampler register index (16) exceeded at Assets/ReliefPack/Shaders/ReliefTerrain/RTP_AddBase.cginc(391) (on d3d11)

    thoughts?
     
  43. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I am using 9 textures and I am getting this exactly the same error and my terrain is all pink. I am using Unity version 5.3.3f1.
     
  44. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    well here's the good news at least - my terrain is no longer pink. But there are some steps to get back to making it pink, i just don't remember what they are yet

    EDIT - Nope, sorry - in the scene where there was no pink, i hadnt added RTP to the terrain yet
    EDIT - ok, i'm really sorry - It turns out you were right it was the base map distance and i wasnt setting it properly. But this in turn leads to the question as to why was that happening? What am i doing wrong that distant textures/materials had no fallback? I read in your FAQ for the 3.3 documentation that this was because i wasn't using terrain materials, but that only applies to Unity 4.x and below.
     
    Last edited: Apr 1, 2016
  45. snair692

    snair692

    Joined:
    Feb 2, 2016
    Posts:
    36
    I am having a small issue in trying to get the final build to look the same as it does when I run the editor player. Basically, in forward rendering mode the terrain is not receiving any lighting from my dynamic light source (unistorm), in deferred mode, the terrain looks perfect but I have many other issues (like my run-time instantiated prefabs not receiving lighting from the dynamic light source). So obviously I want to get RTP working correctly in forward rendering mode but I can't understand why the terrain is not receiving lighting from the light source. Any help is appreciated.

    *EDIT* I am using Gamma and not Linear

    *EDIT 2* It seems to have fixed itself just now.. I think it may have had something to do with Important / not Important setting on the light source.
     
  46. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Deleted my previous post because I've made a test project (I'll PM you).

    Just check out the main scene in Unity 4 and switch Edit -> Project Settings -> Player -> "Use Direct3D 11" back and forth. I've included screenshots of what it looks like on my machine in the project in case it doesn't do the same thing for you.

    I know Unity 4 is increasingly obsolete (although the latest version is only a month old) but at the same time you can probably track down the issue a lot faster than I can. Unfortunately I have a big project that I really don't want to move to Unity 5 just yet, and going through the RTP shaders and trying things on on my own is a major undertaking especially with all the scattered #defines.

    There are three issues that I've seen in DX9 mode:
    • "Sparkly" background like everything is too sharp, like it's nearest-neighbour instead of blended
    • "Flickering" squares that sometimes appear in certain spots. This one shows up WAY worse in the default RTP terrain demo scene than in my scene, if you want to import that.
    • Some UV blending is missing, making tile repetitions more obvious (also shows up more in the default terrain demo scene).
    I've set my scene up to emphasise the "sparkly" issue as that's the one I really care about fixing. I've noticed that increasing far blend replace and perlin noise both exacerbate the issue. Another thing I noticed is that setting the the shader maximumLOD to 600 or below fixes it, but of course also loses lots of features.

    Edit: Tested on three PCs. Looks OK in DX9 mode on NVIDIA cards! So might be a Radeon-only issue I'm afraid.
     
    Last edited: Apr 4, 2016
  47. snair692

    snair692

    Joined:
    Feb 2, 2016
    Posts:
    36
    RTP lookin' nice!

    Anathama_2-4-2016-635952293487246775.jpg Anathama_2-4-2016-635952292426298507.jpg
     
    tomaszek likes this.
  48. andy-tache

    andy-tache

    Joined:
    Jan 10, 2013
    Posts:
    5
    Hi,

    I'm trying to set global wetness by rain, and so I wrote those lines:

    IReliefTerrain.globalSettingsHolder.TERRAIN_GlobalWetness = ICurrentReliefWetness;
    IReliefTerrain.globalSettingsHolder.Refresh();


    That doesn't work, and the only thing that works is:

    IReliefTerrain.globalSettingsHolder.TERRAIN_GlobalWetness = ICurrentReliefWetness;
    IReliefTerrain.globalSettingsHolder.RefreshAll();


    But RefreshAll works slow, about one second to update...

    And so I tried to check RefreshAll method, so I wrote these lines:

    IReliefTerrainMaterial = IReliefTerrain.GetComponent<Terrain>().materialTemplate;
    IReliefTerrainMaterial.SetFloat("TERRAIN_GlobalWetness", ICurrentReliefWetness);
    Shader.SetGlobalFloat("TERRAIN_GlobalWetness", ICurrentReliefWetness);


    This actually seems to work, but only when I minimise and then focus on the game. It doesn't update at real time.

    How can I update the global wetness, in a relatively fast way ?
     
  49. snair692

    snair692

    Joined:
    Feb 2, 2016
    Posts:
    36
    Andy, try .globalSettingsHolder.Refresh();


    here is some code I am using in my project:

    RT.globalSettingsHolder.TERRAIN_GlobalWetness = myWetStrength;

    if (myWetStrength > 0.1) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0.05f; }
    if (myWetStrength > 0.2) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0.1f; }
    if (myWetStrength > 0.3) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0.15f; }
    if (myWetStrength > 0.4) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0.2f; }
    if (myWetStrength > 0.5) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0.25f; }
    if (myWetStrength > 0.6) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0.3f; }
    if (myWetStrength < 0.25) { RT.globalSettingsHolder.TERRAIN_WetDarkening = 0f; }
    // Debug.Log("I refreshed the terrain");
    RT.globalSettingsHolder.Refresh();
     
    hopeful likes this.
  50. andy-tache

    andy-tache

    Joined:
    Jan 10, 2013
    Posts:
    5
    For some reason it doesn't work. I even copied all of your lines into my method. The values are set, but nothing happens until I minimise and then re-focus the game... Could it be because of Unity 5.3.2 ? or maybe because I'm using other parameters such as superdetail ?