Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Look at console messages. The reason normalmap can't be assigned is that probably it has different size thatn paired one (all normalmaps should be of the same size anyway or you'll have MIP filtering problems).

    Tom
     
  2. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    250
    Hi Tom!
    it's me again, working on the last details of my mars project...I am having some trouble managing and tuning my landscape from a far distance view. I have made up an image to show you my issues. In the top side examples, you can see the textured landscape. I like it currently the way it is. (except the grey top left one of course)

    The problem however is the distance as seen in the bottom part. The grey here is perfect, but that is a plain satellite image mapped as a lightmap on my terrain. This one reveals all the nice details when viewing the landscape from above. The bottom right one is the RTP textured terrain but all fine details are gone duo the use of perlin noising.


    I am looking for a way to get the nice details that are visible in the satellite image onto my textured landscape. Is there a clever way to bring back that far distance details as seen in my image? Some kind of blend slider that completely fades RTP textures with the lightmapped ones. Or some other clever idea? ;-)

    Regards! Tom

    ps: a trick to get those details also on closeup view would be awesome.

    question.jpg
     
  3. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    980
    Hello! Bought RTP today and I love it!
    One small yet very annoying problem though, when blending an object to the terrain, the terrain texture on the blended object is brighter than the actual terrain.

    I've placed other surfaces with the same texture, and it is not the terrain's fault. The terrain is the correct color. Even changing the ambient light affects both surfaces. No matter what I do, the terrain texture on the blended object is always slightly brighter than the terrain it should be blending with.
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    @stationx,

    Looking from far distance top view - perlin normals take precendence over your details. That's what you're complaining I guess. Try:
    1. Increase perlin tiling (larger tiles)
    2. Using global normalmap and PM mode (in SIMPLE mode perlin normals and global normalmap are blended quick way that's not much precise).
    3. You can reduce perlin strength then. Maybe the only solution for you will be dynamically modifying perlin strength basing on camera height. that you would need to implement yourself (find parameter variable that's stored in ReliefTerrainGlobalSettingHolder in my docs, then find in script what's the real name of variable used by shader - then you can modify variable used by shader yourself).
    4. There is a feature that removes detailmapping at distance and use only global colormap there, but in your case (too strong, tiling perlin) that won't help probably

    @Warrior1424,

    As in case of wolfen231 post on the previous page, this might be caused by:
    1. deferred - specular term of your block (turn specular color to 0 and check)
    2. fog
    3. complementary ambient lighting (can be disabled in geom blend shader and separately for terrain in RTP LOD manager)

    Does refreshing (Refresh all for unterlying terrain) helps or not ?

    Quick check if problem is overbrighten terrain layer or actual material on your block is disabling mesh renderer on it. Then you'll see only underlying "terrain like" child geometry. You'll see if this is overbrighten or problem is placed in geom blend shader.

    Which geom blend shader do you use ? How many lights ? fog ? Dx9/11 ? forward/deferred ? Which set of features is used for terrain. How many layers (4 or 8 - 2 passes or 1) ? Do you use materials for terrain ?

    Tom
     
  5. Warrior1424

    Warrior1424

    Joined:
    Sep 30, 2010
    Posts:
    980
    Thank you so much! I changed the the Ambient correction to white which made the terrain the same color as the blend :)
     
  6. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    250
    hi Tom!
    I'll stick to the manuel animating perlin noise based, seems to work well!
    I have however now another problem. I am having a hard time to add 5-7 layers to my existing project. I select '8 layers in first pass' and disabled 'light mapping' in order to avoid the error in de LOD manager. I did a recompile, but the GUI seems to be broken. I am getting a lot of errors complaining about out of index array. When I select layer 5-7 the GUI menu doesn't show me any options. It looks like the errors are preventing from drawing the rest of the menu. I stil can select layers 1-4.
    Basically, what is the exact workflow when I want to add new layers to my existing project, without destroying any previous work?
    Regards! Tom
     
    Last edited: Jul 2, 2014
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Oops, might be the pain in RTP. I mean - adding layers after RTP has been configured. That's why I always recommend to select number of layers used first in Unity terrain engine and then adding RTP. Of course it's cheap and dirty explanation as this should work just out-of-the-box, but I apparently haven't tested all scenarios while coding ReliefTerrain.cs and editor for this... I placed checking code in many places in ReliefTerrainEditor.cs but it seams to be not enough. If you can locate the array that misses the value/capacity (check in console which array causes error) you could add a line in editor code. Somewhere on the beginning of OnGUI handler (ReliefTerrainEditor.cs) and check there if the problematic array has bad size. Then you could redo the array adding missing elements at the end. I believe most arrays has it (such emergency check . I probably missed one (few). The function in editor script that makes the job "in case of emergency" is named CheckAndUpdate. Look for this and its params - it's straightforward to use.

    ATB, Tom
     
  8. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    250
    Heey Tom!
    Thnx, i took a dive into the code but I put other stuff to make it work. (it looks like it is working, not sure if I broke something else...)
    Basically, I recreate the arrays for all trouble parameters. First I store the old values (1-4) into a temp array, then recreate the array and put back the old values 1 -4 but now I have arrays with 8 layers.

    Code (CSharp):
    1. /// <summary>
    2.     /// Fixs the array.
    3.     /// </summary>
    4.     /// <param name="aLayerPropArray">A layer property array.</param>
    5.     /// <param name="requiresLen">Requires length.</param>
    6.     void fixArray(ref Texture2D[] aLayerPropArray, int requiresLen) {
    7.         //check if array is smaller then required number of layers...
    8.         if(requiresLen > 4 && aLayerPropArray.Length < 8){
    9.             //get current settings...and store to temp array....
    10.             Texture2D[] _temp = new Texture2D[4];
    11.             for(int i = 0 ; i < 4; i++){
    12.                 _temp[i] = aLayerPropArray[i];
    13.             }
    14.             //recreate array
    15.             aLayerPropArray = new Texture2D[8];
    16.             //assign old values back
    17.             for(int i = 0 ; i < 4; i++){
    18.                 aLayerPropArray[i] = _temp[i];
    19.             }
    20.         }
    21.     }
    22.     void fixArray(ref float[] aLayerPropArray, int requiresLen) {
    23.         //check if array is smaller then required number of layers...
    24.         if(requiresLen > 4 && aLayerPropArray.Length < 8){
    25.             //get current settings...and store to temp array....
    26.             float[] _temp = new float[4];
    27.             for(int i = 0 ; i < 4; i++){
    28.                 _temp[i] = aLayerPropArray[i];
    29.             }
    30.             //recreate array
    31.             aLayerPropArray = new float[8];
    32.             //assign old values back
    33.             for(int i = 0 ; i < 4; i++){
    34.                 aLayerPropArray[i] = _temp[i];
    35.             }
    36.         }
    37.     }
    38.     void fixArray(ref ProceduralMaterial[] aLayerPropArray, int requiresLen) {
    39.         //check if array is smaller then required number of layers...
    40.         if(requiresLen > 4 && aLayerPropArray.Length < 8){
    41.             //get current settings...and store to temp array....
    42.             ProceduralMaterial[] _temp = new ProceduralMaterial[4];
    43.             for(int i = 0 ; i < 4; i++){
    44.                 _temp[i] = aLayerPropArray[i];
    45.             }
    46.             //recreate array
    47.             aLayerPropArray = new ProceduralMaterial[8];
    48.             //assign old values back
    49.             for(int i = 0 ; i < 4; i++){
    50.                 aLayerPropArray[i] = _temp[i];
    51.             }
    52.         }
    53.     }
    54.     void fixArray(ref Color[] aLayerPropArray, int requiresLen) {
    55.         //check if array is smaller then required number of layers...
    56.         if(requiresLen > 4 && aLayerPropArray.Length < 8){
    57.             //get current settings...and store to temp array....
    58.             Color[] _temp = new Color[4];
    59.             for(int i = 0 ; i < 4; i++){
    60.                 _temp[i] = aLayerPropArray[i];
    61.             }
    62.             //recreate array
    63.             aLayerPropArray = new Color[8];
    64.             //assign old values back
    65.             for(int i = 0 ; i < 4; i++){
    66.                 aLayerPropArray[i] = _temp[i];
    67.             }
    68.         }
    69.     }
    70.  
    71.  
    72.     void addLayer(ReliefTerrainGlobalSettingsHolder _target){
    73.         Debug.LogWarning("add layer...");
    74.         int _num = 8;
    75.         //fixArray(ref _target.splats, _num);
    76.         fixArray(ref _target.Bumps, _num);
    77.         fixArray(ref _target.Heights, _num);
    78.         fixArray(ref _target.Substances, _num);
    79.         fixArray(ref _target.Spec, _num);
    80.         fixArray(ref _target.PER_LAYER_HEIGHT_MODIFIER, _num);
    81.  
    82.  
    83.         fixArray(ref _target.RTP_gloss_mult, _num);
    84.         fixArray(ref _target.RTP_gloss_shaping, _num);
    85.         fixArray(ref _target.RTP_Fresnel, _num);
    86.         fixArray(ref _target.RTP_FresnelAtten, _num);
    87.         fixArray(ref _target.RTP_DiffFresnel, _num);
    88.         fixArray(ref _target.RTP_IBL_bump_smoothness, _num);
    89.         fixArray(ref _target.RTP_IBL_DiffuseStrength, _num);
    90.         fixArray(ref _target.RTP_IBL_SpecStrength, _num);
    91.        
    92.         fixArray(ref _target.TERRAIN_WaterSpecularity, _num);
    93.         fixArray(ref _target.TERRAIN_WaterGloss, _num);
    94.         fixArray(ref _target.TERRAIN_WaterGlossDamper, _num);
    95.         fixArray(ref _target.TERRAIN_WetSpecularity, _num);
    96.         fixArray(ref _target.TERRAIN_WetGloss, _num);
    97.         fixArray(ref _target.TERRAIN_WetFlow, _num);
    98.        
    99.         fixArray(ref _target.MixBrightness, _num);
    100.         fixArray(ref _target.MixReplace, _num);
    101.         fixArray(ref _target.LayerBrightness, _num);
    102.         fixArray(ref _target.LayerBrightness2Spec, _num);
    103.         fixArray(ref _target.LayerAlbedo2SpecColor, _num);
    104.         fixArray(ref _target.LayerSaturation, _num);
    105.         fixArray(ref _target.FarSpecCorrection, _num);
    106.         fixArray(ref _target.LayerEmission, _num);
    107.         fixArray(ref _target.LayerEmissionColor, _num);
    108.         fixArray(ref _target.LayerEmissionRefractStrength, _num);
    109.         fixArray(ref _target.LayerEmissionRefractHBedge, _num);
    110.        
    111.         fixArray(ref _target.GlobalColorBottom, _num);
    112.         fixArray(ref _target.GlobalColorTop, _num);
    113.         fixArray(ref _target.GlobalColorColormapLoSat, _num);
    114.         fixArray(ref _target.GlobalColorColormapHiSat, _num);
    115.         fixArray(ref _target.GlobalColorLayerLoSat, _num);
    116.         fixArray(ref _target.GlobalColorLayerHiSat, _num);
    117.         fixArray(ref _target.GlobalColorLoBlend, _num);
    118.         fixArray(ref _target.GlobalColorHiBlend, _num);
    119.        
    120.         fixArray(ref _target.TERRAIN_WaterIBL_SpecWetStrength, _num);
    121.         fixArray(ref _target.TERRAIN_WaterIBL_SpecWaterStrength, _num);
    122.  
    123.         fixArray(ref _target._DeferredSpecDampAddPass, _num);
    124.         fixArray(ref _target.AO_strength, _num);
    125.         fixArray(ref _target.GlobalColorPerLayer, _num);
    126.         fixArray(ref _target.MixScale, _num);
    127.         fixArray(ref _target.MixBlend, _num);
    128.         fixArray(ref _target.MixSaturation, _num);
    129.         fixArray(ref _target.MixReplace, _num);
    130.         fixArray(ref _target.MixBrightness, _num);
    131.  
    132.         fixArray(ref _target._BumpMapGlobalStrength, _num);
    133.         fixArray(ref _target.VerticalTextureStrength, _num);
    134.  
    135.         fixArray(ref _target._SuperDetailStrengthNormal, _num);
    136.         fixArray(ref _target._SuperDetailStrengthMultA, _num);
    137.         fixArray(ref _target._SuperDetailStrengthMultASelfMaskNear, _num);
    138.         fixArray(ref _target._SuperDetailStrengthMultASelfMaskFar, _num);
    139.  
    140.         fixArray(ref _target._SuperDetailStrengthMultB, _num);
    141.         fixArray(ref _target._SuperDetailStrengthMultBSelfMaskNear, _num);
    142.         fixArray(ref _target._SuperDetailStrengthMultBSelfMaskFar, _num);
    143.  
    144.         fixArray(ref _target._snow_strength_per_layer, _num);
    145.  
    146.  
    147.     }
    148.  
    149.  
    150.                 EditorGUILayout.BeginVertical("Box");
    151.                 if(GUILayout.Button("add layer")){
    152.                     addLayer(_target);
    153.                 }
    154.                 EditorGUILayout.EndVertical();
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    CheckAndUpdate function does the same except for it doesn't copy values from existing part of array - so your solution is fine. More my function does if setting default param for new array indices.

    Tom
     
  10. JakeChai

    JakeChai

    Joined:
    Jul 4, 2014
    Posts:
    1
    Hi Tom, I got the same skyshop integration problem.
    I checked both "use skyshop global cubemap" and "IBL diffuse cubemap" in First Pass.
    But when I tuned Intensity settings in the sky object, still nothing happened.
    Did I miss something?
    Thanks.

    Jake
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    No, as I said a recent post, RTP takes care about using the same cubemaps and the same sky rotation when used. RTP uses its own lighting model and intensities need to be adjusted in RTP. It's IBL exposure param per layer (separately for diffuse and reflection term). You can also tweak it for water and snow.

    Tom
     
  12. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    975
    When I play my current scene, RTP turns black. My template project works fine, so I believe it's a setting in this scene. I have tried recompiling, resetting RTP, a new camera with no effects. Any suggestions? Thanks.

    black.png
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    I see the building is also unlit, so probably the issue is not related to RTP. In DX11 mode you need to apply a script to the light go get RTP working in deferred.

    Tom
     
  14. Yog0

    Yog0

    Joined:
    Oct 1, 2013
    Posts:
    14
    Hi Tom.

    I've been trying for a week now to change RTP variables dynamically. The problem is that every other script I have is written in javascript.

    I've tried setting up a c# script that reads a boolean from a javascript, and if true modifies globalSettingsHolder._snow_strength, but couldn't quite get it work. I've tried setting up a javascript to change globalSettingsHolder._snow_strength, but I can't figure out how to make it recognize the ReliefTerrain type.

    So my questions would be:

    1. Is it possible to change globalSettingsHolder variables from a javascript?
    2. If it is possible could you give me an example?

    I'm about at my wit's end with this, and don't have the time to recode everything in c#.

    Thanks in advance.
     
  15. Sunwoo-Jeong

    Sunwoo-Jeong

    Joined:
    Apr 26, 2014
    Posts:
    4
    Hi Tom

    RTP is so awesome but with only one video tutorial and just a pdf is to hard to understand all of the features and also hard to use it. PLEASE update some more videos. I know its hard for a non-native speaker but you can also upload video tutorials without speaking! please i have to make my game terrain with RTP but i cant.
     
  16. Sunwoo-Jeong

    Sunwoo-Jeong

    Joined:
    Apr 26, 2014
    Posts:
    4
    Hi Tom.



    I'de like to know how to use these features on my terrain

    i'm from Asia so please explain easy.(its better with
    pictures)
    1.Snow

    2.Surface Water

    3.Ocean.

    4.Lake
     
  17. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    I have been following this thread for quite a while now... and I think there is a problem with TC and RTP: They work together so nicely, but all the tutorials are about either one or the other.

    I think it would be a very good idea to provide basic workflow tutorials, that describe how to use RTP and TC in the most common and most efficient ways.

    Base settings (deferred vs. forward, DX11 vs. OpenGL), color settings (linear vs. gamma), how to save RTP and TC setups properly.
    How to setup a project with skyshop
    How to setup a project with substances
    etc...

    I think quite some potential customers scroll through this thread and the TC thread and think: Wow, we can do a lot of things, but where to start?

    I have been using TC and RTP quite a bit now, and I am still confused, when it comes to the basics.

    Nathaniel and Tom, most of your customers use both of your tools!

    I will post this in the TC thread as well.

    Michael
     
    Last edited: Jul 5, 2014
  18. Robsy128

    Robsy128

    Joined:
    Aug 8, 2013
    Posts:
    35
    I've just updated RTP but it's now destroyed my terrain. Well, I say 'destoyed' - the terrain is now dull and I believe the settings for the LOD manager have been reset, which is just annoying when you never wrote down the things you ticked (why would you?)

    What options do I need to 'tick' to get my terrain back to normal? I'm using 4 layers with height and normal maps. I haven't changed any of the textures or terrain settings. I've also attached before and after shots to this post in the hopes that it will bring back the level of detail I once had before the update.

    Any/all help with this would be appreciated!

    P.S. Apologies if I sound rude - I don't mean to be. I just don't want to lose the work I once had because of an update.

    Edit: Found the options in an old save. Apologies about that mad panic!

    Please keep up the good work Tom as this is a truly awesome package and our projects just wouldn't look good at all without your input!
     

    Attached Files:

    Last edited: Jul 5, 2014
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Just dropping a line to acknownledge my awareness on this thread. I'll answer (not necesarilly resolve everything at once) the posts after the weekend.

    Tom
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    This is general problem of Unity scripting regardless of using RTP or not. Any scripting that uses combination of C# and JS you need to follow some guidelines:

    1. In general JS scripts are compiled first - that's why ReliefTerrain type is not recognized. To solve this - move RTP scripts (regular, editor scripts can be left where they are) to Standard Assets folder in your project. Remember to not put your js scripts there as compilation order can be undetermined and you could still have problems.

    2. JS has less conservative, loose dynamic typing and syntax like this:

    reliefTerrainInstance.globalSettingsHolder._snow_strength

    is problematic. Simply JS doesn't check type of globalSettingsHolder above and its fields. You need to declare intermediate variable that defines globalSettingsHolder type. A script like this worked for me:

    Code (csharp):
    1. #pragma strict
    2.  
    3. var _terrain:ReliefTerrain;
    4. var sc:float;
    5.  
    6. function Update () {
    7.    if (_terrain==null) return;
    8.    var gsh:ReliefTerrainGlobalSettingsHolder=_terrain.globalSettingsHolder;
    9.    gsh._snow_strength=sc;
    10.    gsh.Refresh(null, _terrain);
    11. }
    12.  
    Attach this script anywahere in the scene, then drag&drop terrain with RTP script present. When in run mode you'll be able to steer snow strength changing JS sc variable.

    Tom
     
    Yog0 likes this.
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    @Sunwoo Jeong - you're 100% about RTP needs more videos, but you need to be patient... I'll try hard to post more of them in next 2 weeks depending on my time resources available. As RTp itself is extensively documented in pdf, in fact - there are all informations that are needd to use all features, but I realise that videos are more user friendly, esp. when it comes to users that don't use english at regular basis.

    When it comes to ocean and lake - RTP is not the package you're looking for. Snow and surface water will be described in tutorials.

    @Thousand - the same as I wrote above. I'll focus on more tutorials on my side from the moment RTP has been added to the terrain managed in Terrain Composer (<RTP> button in TC). Target platform (DX11 vs DX9 vs. opengl) however doesn't affect workflow and is too basic to describe it as part of separate tutorial. You just select platform RTP will be used and that's all. More that this - substances, lighting, skyshop with RTP. This is all to be adressed and presented in time in tutorials. I feel bad about it as I couldn't spend time on this.

    Tom
     
    Last edited: Jul 7, 2014
  22. minhdaubu2

    minhdaubu2

    Joined:
    Jun 10, 2014
    Posts:
    69
    Hey Tom, i have some issue with terrain paint tool (blocky blend).
    [/url]
    hebergeur dimage
    [/IMG]
    Please help me, thank you.
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    If you're in deferred try to redo the setup. First of all you should use either 4 or 8 layers, then apply RTP on terrain object (using TC or manually). Use 8 layers mode because I'd say it's due to specularity blend which is not possible between layers 0-3 and 5-7 in separate passes. You would need to specify precise setup you're using (dx9/dx11, forawrd/deferred, number of layers, LOD maanger stup, fog, lights used on scene).

    Tom
     
  24. Yog0

    Yog0

    Joined:
    Oct 1, 2013
    Posts:
    14
    Thank you very much Tom. This is great info to have out there. Works perfectly. Now my Unistorm weather events affect the terrain.
     
    Last edited: Jul 7, 2014
  25. minhdaubu2

    minhdaubu2

    Joined:
    Jun 10, 2014
    Posts:
    69
    Thank you, amazing support :)
     
  26. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    140
    Hi Tom, i have been messing around with your plugin a bit more and fixed some of the issues i had. But there are still some big issues i have hard time figuring out.

    1) is it possible to have different tiling on different layers ?
    2) are the shaders working same way on mac as on pc ? I am working only on mac and even though i was messing a lot with recompiling the shaders, i cant get to work normal maps and its very often completely changing colors upon updating stuff and overally working a bit unpredictable. I turned off emulation of OpenGL 2, which of course changed the look significatly, so i am guessing working under emulation isnt good idea.
    3) is it possible to have normal maps on mobile ? what are recommended setting for ios, say from ipad 2 up overaly for lod manager ?
    4) can near distance values be greater than 20 and 50 ?
    5) the near distance values with setting 20 and 50 are creating kind of glowing ring around the character, i.e. the fading is much brighter than the near terrain texture, is there someway to adjust this ?
    6) is there some way to fix the blending in the attached image ?
    7) is mesh blending ok to use on mobile ?
    8) when i make build for ios i get these erorrs :
    -m_UserPathRemap.count(path)=0
    -DXT5 compressed textures are not supported when publishin on iPhone

    I can see your plugin can do a lot, but learning the basics seems very difficult to me. Would be great if there was more tutorial videos on the basics and overall setups. Any kind of guidance for the ios/mobile would be also great.

    Sorry for the noob questions.
    Thanks
    Luke
     

    Attached Files:

    Last edited: Jul 8, 2014
  27. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    478
    Hi Tom,

    Things are progressing well, and RTP is amazing. Do you have any idea what would create this appearance, on the ground? It looks like my surfaces have a glossy, almost glasslike appearance.

    Thanks!
    -Chilton
     

    Attached Files:

  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Hi, then check all specularity settings in RTP. There is a few tips in my pdf troubleshoot section (check maps - alpha channels, settings for PBL per layer, check if your terain is covered by water, then check water specularity settings and so on).

    Tom
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    no, but you can use different tiling in UV blend feature for mid/far distance

    I check this in open gl mode on my PC and I know about at least a few users that are on mac and RTP looks the same.

    For detail (per layer) normals RTP uses its own combined textures. They need to be RGBA. When trying to use it on mobiles try to keep features as simple as possible (with 4 layers). This is kind of hi-end shader.

    yes, its' possible, but you need to tweak it in ReliefTerrainEditor.cs

    I'm not sure what's the issue you're refering too. Maybe a screenshot would help me.

    Might be many reasons. Have you recompiled shaders in LOD manager to use mesh blending ?

    Generaly, however it compiled for gles on my desktop, I have no luck with RTP on mobile. The shader itself seems to be too complex. At least for my Mali400 GPU tablet. You can change used textures compression formats manually (remember that combined textures are actually used by shaders).

    Tom
     
  30. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    140
    Hi Tom, thanks for quick reply. So blending is a no go for mobile or whole rtp ?

    If its just blending, what is the overall performance on ios ? or what could be performance with multiple 1k terrains ?

    I cant find DXT5 texture which is throwing the error. I made sure that all the textures i am using in layers are RGBA. Not sure if the m_UserPathRemap.count(path)=0 error is coming from rtp, but i didnt have it before i imported rtp, any idea what it could be ?

    Also when i remove rtp and go back to default unity terrain, the terrain texture is realy blurry, like to the point if the resolution of texture was lowest possible ( checked texture resolution, texture import settings, quality settings, restarted Unity, recreated new terrain, nothing worked)
     
    Last edited: Jul 9, 2014
  31. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Really awesome shader package this and it only became better with the last update : D
    Any future plans? Would love to see you do a water shader *hint*, *hint* ; )
     
  32. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Is all this compatible with regular mesh terrain (not Unity terrain)?
     
  33. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Btw, it seems like the "Layer brightness" and "Layer saturation" is saved when saving a preset? Would be nice ig you could look in to that : p
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Yes, RTP shaders can be used on any mesh including voxel solutions :).
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    If RTP works on iOS, blending also works I'd say. You need to check if you actually compiled mesh blending shaders in LOD manager. RTP uses combined textures that can be seen in Combined textures tab of RTP script inspector. Look there. Bluriness can be caused by basemap distance in Unity terrain settings.

    Tom
     
  36. bajeo88

    bajeo88

    Joined:
    Jul 4, 2012
    Posts:
    62
    Hi,

    Ive been using your RTP3 package for the last few days and have been impressed with the results on PC, however whenever i try to make a terrain on mobile (4 textures) the quality is very low to the point where only colours appear instead of texture details.

    Is there any recommended LOD Manager settings for terrain rendering on Mobile? (Preferably shader model 2.0)

    At the moment settings i have are the following;
    - U4 Terrain materials
    - RTP First pass
    - RTP Far distance
    - gles (mobile)

    Global map features
    - No Detail colours at far distance
    - Advanced Color map blending

    Also i am running in shader model 2.0 emulation
     
  37. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    140
    Hi Tom, i am little bit confused by your response. What do you mean by if it works on ios ? that there are certain settings which will make it work on ios or that you are not sure if it works on ios ? I would need some kind of definitive answer from you if it works on ios and what is the performance of your plugin on that platform or if your plugin is not targeting ios at all ( which i doubt since shaders can be recompiled for mobile ). But if its possible to make it work on ios well, some kind of hints on how to set it up would be great. Thanks.
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Although I put gles platform in previous RTP (it's unavailable in RTP3.1c), RTP is demanding SM3.0 shader. On mobile you probably see fallback shader then.

    As I said above. RTP is not meant to run on mobiles, it's too complex. I thought you fortunately made it working on iOS (when compiling on gles target this thoretically is possible, but in practice I've never forced RTP to work on my android tablet). I don't have iOS hardware to test and I can't tell if Unity emulation is reliable in editor.

    Tom
     
  39. Jusas

    Jusas

    Joined:
    Sep 5, 2012
    Posts:
    8
    Hi Tomaszek,

    I bought RTP recently and I've had some fun trying it out. However I've just run into a problem I haven't managed to figure out yet and I'd appreciate any help:
    My project however is fairly trivial and doesn't use many RTP features. What I'm currently doing is having large terrain tiles that can be loaded with a heightmap and global colormap on demand. The tiles should pretty much seamlessly fit together. Here's what I do:

    - I have 9 tiles in the scene that are "recycled" and (never destroyed).
    - Depending on the world location, I load new raw heightmaps into the tiles.
    - After the heightmap has been applied, I apply the colormaps to each tile with this code:
    Code (CSharp):
    1. rt.ColorGlobal = colorMap;
    2. rt.RefreshControlMaps(tile.materialTemplate);
    This seems to update the colormaps but what follows is strange lighting/shadow effects on the terrain tile edges:



    I'm not sure what's causing that but my guess is it's got something to do with doing this on runtime. I pretty much just skimmed the ReliefTerrain script to find how to update the colormap so I suspect I'm doing something wrong here. When the play mode is off, everything seems to work fine but when I dynamically load the maps, this is what happens. Could it also have something to do with the textures, or am I perhaps passing the wrong material to RefreshControlMaps?

    Thanks for your time! BTW, a quality product you have here, took me some time to figure out its potential... I've already achieved nice results without even touching the more advanced features :)

    EDIT: Worth mentioning that I have TerrainComposer in this project as well, which I had used to generate the empty terrains.

    EDIT 2: After more inspection it seems that I do actually have small seams in my terrain - this may be an explanation or at least a part of it, haven't fixed that yet. -- Nevermind, there were no seams there...

    EDIT 3: Problem solved! Forgot to set the terrain neighbors... duh!
     
    Last edited: Jul 10, 2014
  40. metteigel

    metteigel

    Joined:
    Aug 6, 2012
    Posts:
    33


    So i think i have a big Problem. I imported the RTP in my Project and watched the tutorial step by step. But after calculating the Shader everything is black and i get this Message in the Console:

    Material doesn't have a texture property '_MainTex'
    UnityEditor.DockArea:OnGUI()
     
  41. Jusas

    Jusas

    Joined:
    Sep 5, 2012
    Posts:
    8
    Whoops, looks like I screwed up and forgot about Terrain.SetNeighbor() o_O
    My bad. This solved the lighting artifact.

     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Look for first pass and add pass shaders in the RliefPack project folder - check in inspector if they compiled w/o problems. If not - give me error list. To resolve black terrain problem you can use reset params to defaults buttons and Settings/Refresh all. Black terrain can be also present in deferred when you don't have ReliefTerrain_applyLightForDeferred script attached to main directional light.

    Tom
     
  43. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    138
    Hi there!

    I am new to RTP as I just purchased it this evening. :) Looking forward to some awesome results!

    However, I encountered a problem as soon as I started... as soon as everything gets set up, the textures become all blurry. Here's my process:

    1. Start Unity
    2. Create Terrain
    3. Load Raw Heightmap
    4. Create 4 "dummy" textures (Which appear nice and crisp on the landscape)
    5. Component->Relief Terrain->Engine Terrain or Mesh (Textures become finer, but remain crisp)
    6. Start changing the dummy textures
    7. ...which cause the LOD Manager to load (textures still nice and crisp)
    8. I check "Use U4 Terrain Materials" and make sure "far distance" and "first pass" are checked
    9. As soon as I click on the terrain again (to finish filling out the dummy textures) all the textures on the terrain go fuzzy.

    I have tried filling out all the textures and then recompiling the shaders - that doesn't make the textures clear again
    I have tried compiling shaders first and that doesn't do anything

    Why are my textures going fuzzy? I can't seem to ever get them back nice and crisp...

    Thanks!
    -Mark
     
  44. metteigel

    metteigel

    Joined:
    Aug 6, 2012
    Posts:
    33

    As soon i klick "Recompile shaders for given feature set" i get two errors:

    Shader error in 'Relief Pack/ReliefTerrain-FirstPass': Can't find include file ../RTP_UVBlendRountingDefsFirst.cginc at line 31

    Shader error in 'Relief Pack/ReliefTerrain-FarOnly': Can't find include file ../RTP_UVBlendRountingDefsFirst.cginc at line 31

    Then the Terrain went Black and the Console Spams:

    "
    Material doesn't have a texture property '_MainTex'
    UnityEditor.DockArea:OnGUI()"
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Screenshot please. Do your shadesr actually get recompiled ? You need to install RTP in default location. Also - check target platform you're on (like dx9 on PC). In Unity 4.5 you can check all platforms and it dosn't take longer to compile, Unity simply selects needed shader variants for you.

    Tom

    P.S. Beep - shameless plug, my other product - Volume Grass is on sale for next 3 days:

    https://www.assetstore.unity3d.com/#!/content/436

    I'm just about submitting VG1.5 (look at mt thread here: http://forum.unity3d.com/threads/volume-grass-system-on-asset-store-soon.80987/page-4) which is intermediate version before VolumeGrass2 arrives. VG2 will allow you to put such grass on terrains basing on density maps, so you can simply paint the grass like any other splat textures and details.
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    Which Unity do you use ? I fixed this bug in RTP3.1c as it was broken on Unity 4.5. Maybe you have caching problems (some users downloaded "latest" version from AssetStore and it turned out that it was downloading asset cache issue). Errors reported looks like produced by older RTP version. This is definitely not an 3.1c part of shader code.

    Tom
     
  47. Uzopoza

    Uzopoza

    Joined:
    Feb 26, 2013
    Posts:
    39
    Hi Tomas!
    I have a problem with Z-fighting
    How can I fix It?
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,758
    This is rare... How many layers do you use ? I assume that this is z-fighting terrain with itself. So - addpass is culprit. I thought it doesn't happen anymore (it happened some time ago on Unity 3). Anyway if you need to resolve this on your specific platform go to ReliefTerrain-AddPass.shader and uncomment such lines:

    Code (csharp):
    1. //Offset -1,-1
    to this:

    Code (csharp):
    1. Offset -1,-1
    Or better use 8 layers mode with atlasing. There will be no addpass present then.

    Tom
     
  49. Uzopoza

    Uzopoza

    Joined:
    Feb 26, 2013
    Posts:
    39
    Thanks, Tom, but it did not help me :(
    May be it problem - becouse I use Deferred Render?
     
  50. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    138
    Hi Tom,

    I hope your talking to me! I've included some screenshots.

    This is with just filler textures before I recompile the shaders:



    And this is after I recompile the shaders and then click on the terrain again:


    The same exact thing happens if I assign all the textures, normal maps, and height maps before compiling for the first time.

    I checked and I am compiling them for windows dx9 in the RTP panel.

    -Mark
     
unityunity