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. edisvaldson

    edisvaldson

    Joined:
    May 23, 2016
    Posts:
    4
    How can I change the size of an individual texture? Say I want the grass to have size 5 and the cliff layered rock size 40, how would I do that in RTP? I tried changing the size in Unity's terrain script but that doesn't work. I was able to change the size in the Settings->Main tab, but it changes the size for all textures.
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Individual tile size is available for mid/far distance UV blend feature (to hide tiling at distance). It's set per layer. Shader could do it but chanes to be done are non trivial. Even if you change all places where detail textures are sampled (albedo&gloss/normal) it's also sampled for heightblending at the beginning. You (@tcn5150) can take a look at RTP_Base.cginc and RTP_AddBase.cginc and check where tex2D is called and with which tiling variable and try to change it but as I set - it's not like "one place in code" to change it.

    Tom
     
  3. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    Hello, I come from China's users, My English is not very good,there is a problem. How to control the global map - "Far blend" shows that distance, the biggest 1, but the scope is not demand, will continue to get bigger?
     
  4. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    I'm doing a helicopter simulation, demand of flight level is very low and need to display 0 meters - 200 meters very fine, more than 200 meters show Global maps; But I now there is a problem, the largest details shows that only 70 meters distance, no matter how I adjusted. How to adjust the meet the project requirements?
     
  5. edisvaldson

    edisvaldson

    Joined:
    May 23, 2016
    Posts:
    4
    Thanks for the response, that worked great.
    I'm having some other problems though. I followed the introductory video, but after I recompile the shaders I get a very different result than in the video. All the textures look very glossy, and changing the parameters and settings don't seem to have the same result. If I change the perlin, for example, it just makes everything almost black and very very glossy. Any ideas on what I need to do to fix that? I went into the terrain settings and changed material to custom before the shader recompilation, and that didn't work either. Thanks!
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    There is a special feature in RTP's LOD manager where you can ask to show only global colormap at distance (instead of blending them with detail textures).

    To adjust distances more you can tweak ReliefTerrainEditor.cs code. To find a line of code where you select distance is simple - look for text that is RTP's slider label. Then you will see in code that distances are parameters to Unity editor UI functions. You can chage them there.

    As for custom material - yes - you need to make sure it's set as "custom" in Unity terrain settings and material assigned use ReliefTerrain-FirstPass.shader. Give your exact setup (lighting, number of terrain tiles, number of layers used, rendering path, Unity version and RTP version you're using).

    Can you tell me if installing RTP gives correct results on my examples scene ?

    Tom
     
  7. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I have a layer with an emissive texture, using gloss as the emission mask. As you can see below, only the purple crystals should be emissive, but it is automatically making all the blend edges emissive as well. Is there a way to stop that from happening? I'm using four layers, deferred mode, tessellation and PM.

    Capture.JPG
     
  8. edisvaldson

    edisvaldson

    Joined:
    May 23, 2016
    Posts:
    4
    I'm using Unity 5.3.4f1, RTP 3.2
    All I did was start up an empty scene, with all the defaults, then I created a random terrain in Gaya (1 tile, 2048x2048). After that I removed the 4 default textures and added the 4 textures you use on the video. Then I went to the terrain settings and selected "Custom" for the terrain material. Next I clicked in the recompile shaders button, having the same exact configurations as in the video. When that is done I get a very glossy washed out terrain. After adding the normals and height maps, I try playing with the settings but they really don't do what it looks like they do in the video. Thanks!

    Edit: I realized I don't add the ReliefTerrain-FirstPass.shader, I'll try that now and let you know if it works.
     
  9. 14ercooper

    14ercooper

    Joined:
    Aug 3, 2015
    Posts:
    3
    I have set up the RTP shaders to compile with the feature set I want, but once I compile the shaders I get the following error from 3 different shaders:
    maximum ps_4_0 sampler register index (16) exceeded
    and the terrain renders pink at close-range and black further away. I have verified that all textures are valid and readable, and tried enabling/disabling every feature in the shader, yet it still does not work.

    Features with a checked box:
    LOD Level (all settings): PM
    Enable Holes Cut
    8 layers, no overlap
    UV blend at distance only
    Global color blend mult. and advanced color blending
    Sharpen heightblend edges
    Layer extrude reduction
    Vertical texture map
    Multi-channel superdetail
    First pass triplanar
    For add pass:
    Crosspass heightblend
    Use color atlas
    and the rest on the settings are the same

    I am unsure what is causing the error. Importing into a new project doesn't work, as well as resetting RTP and reimporting it. Unity 5.3.2 and 5.3.4 both don't work.
     
  10. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    I want to show clear point B to point C, like a point A to point B . but no matter how I adjust, maximum clear distance can only achieve B, what should I do? (D point began to show Global maps)

     
    Last edited: May 25, 2016
  11. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    I want to show clear point B to point C, like a point A to point B . but no matter how I adjust, maximum clear distance can only achieve B, what should I do? (D point began to show Global maps)
     
    Last edited: May 25, 2016
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    It will bleed I'm afraid. That's the way RTP mixes all params - at edges still your purple crystals are "visible" partially and outputs emissive component. You can try to make blend edges more hard though (in LOD manager there are option checkboxes to "make the even harder").

    Try to follow RTP workflow. Make terrain with 4 layers (no matter using Gaia, Terrain Composer, Unity "create terrain" or whatever). Then add RTP script component. Then recompile shaders in LOD manager. Then add missing textures (detail normals, heightmaps, global textures, visit perlin normals tab). It should work. If you use textures from my example scene they should have alpha channel for diffuse color - alpha channel store glossiness. If you use DXT1 textures which lacks alpha channel your such layer on terrain will be fully smooth.

    8 layers no overlap are used only when you have 8 detail layers on terrain. In case you've got 4 - don't use it. It requires more texture resources inside shader. If you need additional features (that require textures like vertical texturing). In 8 layers mode addpass shader is not used. If you need 8 layers then use 4+4 setup (w/o 8 layer mode enabled in first pass) with both passes using color atlas - this maximize number of availbe features that can be compiled in shader. The problem is that Unity "eats" a lot of textures even if they are not used or when they makes not much sense (like blending cubemaps for terrain). When you disable lightmaps in LOD manager you will save up to 5 textures as well (in case your scene is lightmapped).

    Sorry - your screenshots are unavailable on my side ?

    Tom
     
  13. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It isn't just from the overlaying of the two gloss maps though; for example, here is a screenshot where I changed all four layers to use the same textures for everything, and only one layer has emission turned on. The gloss channel (alpha on the diffuse texture) is mostly black except for little white dots where the crystals are. I'd expect the blend of two layers to look similar; mostly zero gloss except for where two dots overlap; but instead, the blend edges all seem to have very high gloss values unrelated to what the actual textures are.

    Capture.JPG

    Do edge blends just have some kind of constant gloss value like .5 or something instead of blending the gloss channels? I've never noticed it looking particularly weird with normal textures but since emissive textures use the gloss value for emission it is obviously much more noticeable.

    I tried "make blend edges even harder" but it didn't make any difference.
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Let me think. The problem of bleeding glossiness will be always present on the edge of two layers - very glossy and dull. I'm not doing whole lighting separately for each layer (which would remove bleeding). Instead, and this is the only practical solution, I interpolate glossiness between layers. Still glossiness of 0.5 looks quite shiny.

    Do Have you got it split into 2 layers - crystals on one layer with bright spots on heightmap will push crystals up due to heightblending.

    Tom
     
  15. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yes, there's only one layer with any emissive and it's only on the crystals, so the heightmap and gloss channel are white on the crystals and pretty dark elsewhere. I used the Frame Debugger to step through and when RTPBase renders the emissive render texture, it's very bright at blend edges regardless of the gloss textures on the layers. I even set "max glossiness" to zero on all layers which correctly made the crystals stop emitting, but all blend edges of that layer were still glowing. It seems like whatever gloss value it's using to determine the emissiveness on blend edges is completely unrelated to the gloss of the two layers. If there's somewhere in the shader I could just set glossiness to zero on all blending edges that would probably be fine; it makes sense that edges between two different materials would be rough anyway.
     
  16. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    One other unrelated thing I noticed: it seems metal layers do not interact well with increased brightness from any of the places it could come from, like UV Blend, Color Map, the "Brightness" slider in main settings, etc. Any shiny metal pixels seem to blow out and hit some kind of HDR limit where they become black with glitchy borders (like negative HDR colors) during the "Render Specular to Emissive Channel" part of the Deferred Rendering path. Metal only looks normal when I ensure the brightness is never above 1, which means I have to turn off Color Map and UV Blending on those layers.
     
  17. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Does RTP support substance materials? If so, what outputs does RTP require?
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I need to take a closer look at the problem then. Will get back to you.

    It doesn't use substances made runtime. There is a button for convinience that grabs substance output (diffuse/albedo color with smoothness on alpha channel, normalmap, heightmap). So - that RTP uses at shader level is regular texture. Normalmaps and heightmaps used in shader are combined together to save number of textures used (generally we've got tight limit of 16 textures for everything needed in shader).

    Tom
     
  19. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    I'm all for convenience. Sold.
     
  20. 14ercooper

    14ercooper

    Joined:
    Aug 3, 2015
    Posts:
    3
    One more issue I haven't been able to resolve with the shaders (may just be me missing something). On any slope steeper than about 5 degrees (regardless of textures); I can see the pixelated white splotches on top of my textures that were not there before using the shaders. I have tried edited every setting I can find to no avail.
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Hi, please share some screenshot to explain your issue. With your current description I'm scratching my head what it can be.

    Tom
     
  22. 14ercooper

    14ercooper

    Joined:
    Aug 3, 2015
    Posts:
    3
    Here's a few screenshots:
    Unity 2016-05-26 21-11-43-57.jpg Unity 2016-05-26 21-11-13-68.jpg
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    They looks like appearing along with some mask (detail heightmap ?). Can you try to find if it's related to any of features (snow/water) ?

    Also please check if the same issue is present on my example scene (after installing RTP which comes with predefined set of features set in/compiled in LOD manager).

    Tom
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    The way it works is that when you set layer to be emissive (emissiveness slider set to 1) it interprets output gloss differrent way. So - in most cases it makes sense to set emissiveness of layer to either 0 or 1 - you can set it inbetween but layer will take the same value (alpha channel of diffuse texture) to determine glossiness as well as emissiveness.

    Even with gloss output=0 emissiveness still works but is lowered. gloss output=1 increases the effect. With crystals it might be the problem because one might expect them to be glossy (glass like) and the same time emissive.

    The problem with edges is related rather to the other setting - glow color below the layer emissiveness slider. It adds additional emissive color (with very high dynamic range - white is several times above 1) on layer AND on the edges (much more on the blended edges). I've introduced this so we can get glow effect of emissive color that bleeds to the other layer at blended edges. Turn glow color to zero to reduce glowing. Glow color is independent from layer diffuse color which is primary emissive color (like green diffuse color will give green emissive output)

    Still - if emissive output is very high (with glow color set to high value) it will bleed on all the areas where height blending won't completely exclude your crystal layer. Even if you consider your crystals are not visible they might still influence. Without dynamic output blending crystal layer with something like %1 percentage you won't see it. But with dynamic emissive output these %1 will be multiplied by very high emission and then we'll see bleeding where we wouldn't expect it. Take a closer look at your detail heightmaps which have huge impact on blended output due to heightblending. Also - maybe tweak a bit coverage values where crystals are not present (visually but still are present partially on your coverage RGBA map). Simply we need to make sure that places that you don't like crystals to be present need to be completely 0 blended with crystals layer.
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Yes, I overlooked this detail. Albedo (affected by various RTP brightness controllers) should not get >1 for metallic layers, because Unity takes diffuse color as color of metal and the same time it damps albedo color without clamping it below zero (for input albedo > 1). In deferred we can't output albedo>1 because it's stored in LDR buffer anyway. To fix this issue we can simply clamp albedo at the end of RTP_Base.cginc and RTP_AddBase.cginc surface function. place this at the end of the function code:

    Code (csharp):
    1. o.Albedo=saturate(o.Albedo);
    Tom
     
  26. SARWAN

    SARWAN

    Joined:
    Oct 23, 2012
    Posts:
    11
    Hi tom,

    I got stuck in the issue related to shader. Help me out. Here is my query http://answers.unity3d.com/questions/1192059/lightinglambert-cannot-implicitly-convert-from-hal.html

    It works fine in Unity 4 but in unity 5 this shader is not working as we expected
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
  28. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Ah! Thank you! I assumed it was sort of like having an Emission texture in UBER and that the color had to be defined by the glow color selector. I merged the emissive colors into the albedo texture and then set the glow color to black and it looks perfect now. No more weird edges! The glitter layer looks really nice with magic glowing purple crystals as well. Thanks!
    Capture.JPG

    This definitely helped and got rid of the glitchy negative colors, but something about it still looks a little off. For example, here's a gold metal with the layer at brightness 1 and then at brightness 4 just to show the effect. Brightness seems to make the metal parts turn dark green rather than get lighter and become bright yellow or white which is what I would expect.
    Capture2.JPG Capture3.JPG
     
  29. edisvaldson

    edisvaldson

    Joined:
    May 23, 2016
    Posts:
    4
    Yep, clicking on the Perlin normal tab did it. That was all I was missing. Thanks!
     
  30. Dosenbiiir

    Dosenbiiir

    Joined:
    Jun 28, 2015
    Posts:
    4
    Hello,
    I am from Germany so my Englisch isn't so good ;)
    I uploaded a Video of my "Problem". There is a circle around the player (camera) when I move. How can i remove it? I hope i can because it doesn't look so nice :) Maybe someone can help me?
     
    Last edited: May 29, 2016
  31. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    I capture from Google Map Map, trying to generate terrain texture, but I found that too many Map image texture details, PS is very difficult to pick out each color as "RTP" mask, so use "RTP" near display color of the details will be none enough, how to solve the problem of Google Map complex color selection?
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Extracting data from satellite/aerial images is beyond this thread, but you could ask this guy:

    https://www.assetstore.unity3d.com/en/#!/content/13238
    http://forum.unity3d.com/threads/wo...create-real-world-aaa-quality-terrain.215485/

    He's an expert at this. He uses RTP for his visualizations.

    Tom
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Turn off shadows and check. For me it looks like shadow acne problem (which is under the control of Unity shadow system). Also - do you have perlin normals working ? It might be related to the same issue as this user had:

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

    Check if your issue is related to blending distances in RTP (close distance and mid/far distances that are set in perlin normals tab).

    Tom
     
  34. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    Yes, I use a third-party plug-in has taken the Google Map to capture over。look good high in the sky but near is not clear, the details of the need to use the "RTP".But 'RTP‘ each layer corresponding satellite image detail, it is difficult to do the ’Source splats' black and white constituency, lead to closer the effect is not ideal, texture and rich none enough.What should I do?
     
  35. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    Hello, the last picture did not show, I upload again.No matter how I adjust "RTP" parameter, only A point that is clearly visible in the distance A little place, point B is very blurred because is global satellite image, how to display the distance can reach the point C and beyond?
     
    Last edited: May 31, 2016
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Hi, I can only see 2nd media on yt. For me it behaves correctly, it's matter of scale. It's hard to say how exactly far from terrain your camera is but it looks like we see satellite image too close. Generally it's very tricky to mix/blend global color with details, but if distances suggested by RTP sldiers are not sufficient and you'd like to increase available mixing distances you can open ReliefTerrainEditor.cs script and look for occurences of distance slider labels. This way you'll find lines of code where slider is placed. There are hardcoded valies which you can change to anything (like close distance up to 500m for example).

    Tom
     
  37. unitybeijingchina

    unitybeijingchina

    Joined:
    May 24, 2016
    Posts:
    12
    I put the pictures to make the video, it may be I am in China, there are limited so don't show pictures select 1080P
     
  38. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Hello i got a request , I am using this shader "ReliefTerrainPMTriplanarStandalone" for my meshes but my meshes are chunks and i can see seams between them , one solution to solve this is to have the shader work in global space not local but again any other solution is acceptable , reducing the tile size worked for a fixed number but tiles are too small now :/ so i want something better to remove the seams..

    EDIT: reducing tile size didnt work for snow cause i have no option for tiling snow
     
    Last edited: Jun 1, 2016
  39. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    I am exactly followed the RTP tutorial but i have not good results here you can look on the screenshot.
    Someone has an idea what you can do better ? Or where a fault is


    Can anyone help me ?
     

    Attached Files:

    • test.jpg
      test.jpg
      File size:
      504.7 KB
      Views:
      814
    Last edited: Jun 1, 2016
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You can switch shader to work in global space - take a close look at defines section at the top of the shader code (right below material properties)

    Tom
     
  41. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Wow this was really great if fixed all issues , one more question , can i get a slider to adjust the mip bias for snow ? Because snow seems to look best when global mip bias is at -1 (values bigger than this will have huge difference for example -0.999 is way different than -1 and -0.900 is similar to -0.999 so its like -1 has a special treatment) and then i set the mip offset for everything else but its not the same i can see some artifacts.

    EDIT: Can i also make the shader have 8 texture instead of 4 ?
     
    Last edited: Jun 1, 2016
  42. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello. I did exactly what you've said in the object blending tutorial, but blended areas are dark. How would I solve it? When I turn off "receive shadow" on the main object it will be fixed but I need my object to receive shadows.

    I use Unity3D v5.0.0f4 with deferred lighting rendering path.

    Here is a picture of the problem:
     
    Last edited: Jun 2, 2016
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    What's the version of RTP you're using. Tell me your setup. Do you use one terrain tile or multiple. Does examp,e scenes work for you after installing RTP in your project ?

    Tom
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    To have interpolated MIP levels set textures in their settings to use trilinear interpolation (instead of bilinear). We can't get separate MIP bias for snow and other textures. The shader works with maximum 4 layers. Such constraints to be overcame we're all waiting for Unity5.4 to allow us more convinient handling of variable arrays (promised on Unity tech dept. to be fixed/implemented but it's still not present). This will allow work on RTP4 release.

    Tom
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I'd strongly recommend installing newer official Unity (5.3) where RTP3.3 is available. In deferred you'd need to open geom blend shader and comment out Fallback "Diffuse" keyword at the very end).

    Tom
     
    imDanOush likes this.
  46. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Tom

    I have a quick question: I started using the Time of day Night/Day cycle asset in my project. Finally got it to behave like I wanted, one thing still bugs me though...

    it seems like the layers in RTP behave differently than meshes with standard shaders assigned in respect to ambient lighting. In my case, shadows on the Terrain during nighttime are overly dark (ambient lighting quite low), while at day, it looks quite fine, about the same level of brightness in shadows as the standard shaded meshes.

    If I play around with the layer brightness setting (set every layers brightness to 4), nighttime shadows start to look okay.... yet during daytime, the terrain materials are WAY too bright.

    Now it occured to me that dynamically scaling the brightness of the layers might be an easy fix for the problem. Yet I cannot get this to work. I found that the GlobalSettings object holds the brightness values, but changing them at runtime does do anything.
    What do I need to do to adjust the layer brightness at runtime? Is it even possible?


    Regards

    Gian-Reto
     
  47. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Hi Tom thank you for you answer. At the moment i use version Unity 5.3.5 and RTP 3.3c from assetstore. It's a normal terrain would i build with world creator i make a little video for you i hope this helps

     
  48. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Very huge thank you, I must learn shaders soon. Can't upgrade to unity 5.3 due to some technical problems.
     
    Last edited: Jun 2, 2016
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I see you checked hte option in LOD manager "no detail colors at far distance". This will cause no reaction to layer settings (like brightness) when you observe terrain from distance.

    I don't have WorldCreator. Can you tell me what are the children objects ? For multiple terrain setup working (global maps/perlin normals) you'd need to download RTP3.3d from my server.

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

    Tom
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Hi,

    I don't know what can cause such weird behaviour at night time. You might check what's the difference between day light and night light. As far as I remember ToD uses directional light (moon) at night time. Maybe there are 2 lights somehow interfering ? Anyway - with 1 directional light active RTP should behave correct (well, that'sthe common scenario tested).

    After assigning values in globalsettingsholder you need to push them actually to shader (via terrain material). Using Refresh() or RefreshAll() is overkill in terms of prformance maybe. You could look at those functions implementation in my script (GlobalSettingsHolder.cs and ReliefTerrain.cs). There are places where script variables are passed to materials via material.SetFloat (or SetVector) and do it inside your script.

    Tom