Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    I'm having trouble with GeometryBlended meshes.
    If I use the StandardSpecularGeometryBlend shader the blending works perfectly but the mesh does not render global fog properly. The blended portion does render the fog, the unblended part does not. So it looks strange.
    If I choose any other Blend shader such as GeoBlend-PM, GeoBlend-PM_HB,GeoBlend-PM_Complex, it renders the fog just fine, but no longer blends. Where it should blend it is just black.

    Can't figure this out.

    Any help would be appreciated.

    Unity 5.2
    Deferred
    rpt 3.2i
    global fog on main camera

    -Keith
     
    Last edited: Nov 25, 2015
  2. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Hi, just a quick question. I was reading the reviews and saw this:

    Somehow, this is FASTER than the in-build terrain shaders, with most of RTP's features on, and with tessellation, I get just 200 draw calls and over 200 FPS!

    Is it likely or even possible to see an increase in FPS by using RTP?

    Thanks
     
  3. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    I've been using RTP for a few months now.
    I just played a scene that didn't use RTP. It clocked about 65 FPS.
    I upgraded that same scene with RTP. It clocked about 72 FPS.

    I should make a few things clear.
    1. This was a super quick and dirty test. I moved around each level for a few seconds just to see what it was like. Did that a few times for each scene.
    2. RTP has all kinds a settings you can turn on and off depending on your needs. The configuration I used, i would call "Medium High". I Didn't use all the features but most. I did however select the highest quality LOD level.
    3.The quality that RTP delivers easily balances with performance. I can't speak for mobile devices, haven't tried it.
    4. I have no affiliation with the publisher.

    Hope this helps.
     
    jonfinlay likes this.
  4. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Yes it did thank you, the FPS hit was one of the main things holding me off purchasing it, but I was a little unsure anyway because I read it used the GPU rather than the CPU, so the speed increase may be due to this.

    Thanks again.
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In terms of cost of single pixel to be shaded - RTP is way more expensive that default terrain shader. But pixels are not all. If we render terrain in one pass (8 layers) Unity have to do it twice - 2x more triangles, drawcalls. Where you can gain performance is when you use tessellation - you can increase pixel error - Unity will produce low poly mesh (at least far away) while RTP shader will refine it. For modern GPUs with fast tessellation units it's reliefing CPU a lot. With tessellation you can decrease heightmap resolution for terrain used for drawing (for collider you might need to leave hi-res).

    It also depends on setup. With Many features turned on cost of drawing single pixel becomes to high in relation to potential savings on CPU. Then it will cost higer.

    Tom
     
    jonfinlay likes this.
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Can't tell exactly what's wrong with StandardSpecularGeometryBlend vs. fog. Probably it's rendered after global postFX fog is placed. You could tell iterating thru frame debugger I guess (at which step things are drawn into buffers). For the other geom blend shaders - in deferred you need to comment out the last command in shader - Fallback. In deferred there should be no fallback or ugly black bordering appear on blended parts.

    Tom
     
    kloogens likes this.
  7. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    116
    I'll give that a shot . Thanks for the help Tom.
     
  8. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I use none of them. For example scenes I use Unity's free terrain textures (I added normalmaps and heightmaps to them using Bitmap2Material). Also free substances (sand). So - actually I can't advise here much. I don't want to be biased, but looking at prices of above I guess buying first one won't hurt, even if you decide, for any reason, to buy 2nd package (or anyhing else) later.

    Tom
     
    Mr-Logan likes this.
  10. Olninyo

    Olninyo

    Joined:
    Dec 17, 2012
    Posts:
    7
    I've been trying to set up and RTP terrain with Usky lighting in deferred rendering, linear colour space. I've set the RTP shaders to linear compatibility but I'm getting some weird results when Uskys ambient light gets darker during night. The terrain textures appear to give a seriously weird colour response where colours they appear very dark and saturated. Is there anything I'm doing obviously wrong? Objects in the scene using the unity5 standard shader don't appear to have this problem.
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Don't let light intensity to go under 0.01 (it's controlled by USky script) or turn off complementary lighting in RTP's LOD manager

    Tom
     
  12. PhoenixRising1

    PhoenixRising1

    Joined:
    Sep 12, 2015
    Posts:
    488
    Hi Tom.
    Is it possible to use your triplanar shader on non-terrain objects? Gonna purchase your pack soon enough anyway but that would make me save money on not having to get a triplanar shader.
     
  13. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Hi there, I'm new to RTP and trying to make it work with a Mesh that was built using Terrain to Mesh. The mesh is build of several chunks (currently 8x8 chunks).

    The issue I'm currently running into is that when I apply RTP, the mesh is flattened and translated (moved up). I've already tried re-compiling RTP and few other things but so far without any luck. Any idea what may be causing this?

    Another question I have is how to best handle assigning RTP to all the chunks. Can I simply copy the ReliefPack component over to all meshes? Or would it be better to just apply the RTPMaterial?

    Finally, is there anything special I need to be careful with when using RTP on multiple different scenes? Do I manually have to build several RTPMaterials or will the LODManager handle this correctly for me when recompiling the shaders?
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Example scene included on the package puts triplanar RTP shading on example mesh - we only need normals defined for such geometry. Example configuration for shader is 4 layers auto selection of layer by mesh normals - you can configure it in shader header #defines.

    Your issue is most probably related to the fact you've compiled RTP to use tessellation but you haven't provided RTP component with proper norma&heights texture. Refer to my video:



    First you need to get texture from terrain before you make it mesh. Anyway - I haven't tested tessellation scenario on a mesh terrain. Maybe you can simply skip tessellation feature while you use meshes (and refine it where you need).

    You apply RTP component to first chunk, then to the next one, and so on. Subsequent chunks should share most RTP settings except for chunk specific (like global colormap, global normalmap, etc). If you'd like to have independent setup on some chunks inside the scene - put them in separate transform anchor before applying RTP component.

    For different setups across the project - LOD manager compiles one globalized shader code. However, the thing you can do is compile shader and copy copiled shader code to separate file, then rename it to no get confused between different shaders named the same - use them as shader for material on chunk. Beware - RTP relies on LOD manager state, which "looks into current shader compilation" - this way RTP knows which features are used and exposes them in the RTP script inspector. If you for example compile 2 shader setups - one with a feature enabled and one without then RTP script might not expose you parameters of shader even if they are enabled (because it relies on what is currently compiled). Workaround - you can enable a feature in RTP script inspector but _without_ going to LOD manager.

    Tom
     
    PhoenixRising1 likes this.
  15. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Hi Tom, okay great, thank you! That helped a lot! I have it working now.

    And I guess I'll probably try to then just use one setup to keep things simple.
     
  16. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    118
    Sorry for stupid noob question,.. How do I access normal terrain values like pixel error, detail distance and other like that when using RTP??? I usually use TC for that... But now I try with only Gaia and RTP and the normal Terrain settings are greyed out... :oops:
     
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Actually I'm not familiar with Gaia but as far as I know it's system build on top of Unity terrain. So - when you select terrain object you should be able to see Unity terrain script inspector at the top (with tabs like painting, settings, etc.). You select gearwheal icon to get into terrain settings where you select pixel error, detail distance and so on. If it's not available you need to ask Gaia author - maybe he takes control over it. In case of RTP alone it is supposed to be available.

    Tom
     
  18. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Is my understanding correct that shadows and fog don't work properly with Deferred Rendering? Or was I just missing some setting?

    I had been wondering about both (fog did work with the Unity water but not on RTP, shadows did work on SpeedTree models but again, not on RTP). This is with RTP on a mesh. When I switched to Forward, suddenly everything worked (but I believe with Forward, something else I needed did not work - oh wonderful world of Unity's self-incompatibility ;-) ).
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Fog built-in shaders doesn't work in deferred. No matter the shader. If you're in deferred, not every object in the scene is rendered in deferred. If the object is transparent or simply doesn't have deferred pass defined in the shader it will be drawn in forward (at the very end of deferred screenspace lighting). To keep things consistent you need to use postFX fog.

    Tom
     
  20. Porto881

    Porto881

    Joined:
    Jul 11, 2013
    Posts:
    74
    I have ran into a problem tonight. When I try to add RTP to my new terrain it becomes flat as a pancake! I have never had this problem before, I guess it´s some checkbox I accidently checked? :D
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Check tessellation in LOD manager (and switch it off when you're not aware which steps should be done first to use it effectively - look at a few posts above - my YT video).

    Tom
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Is it that hard to ask on the forum ? I answer the same day in most cases within a few hours.

    More on deferred specific - if you need to use 8 layers, enable 8 layers mode in LOD manager that renders in one pass (add passes don't work good in new deferred).

    Tom
     
  23. truculencias

    truculencias

    Joined:
    Aug 7, 2015
    Posts:
    7
    Hello tomaszek 1 month ago i bought your software and terrain composer software.
    Today i have time to work in your software. And need to say this software is great or more than great is fantastic thanks you a lot for yhour work and i impatient to see you next update or next software, really nice work.
    really easy do one map with fine details.


    po.JPG
    It not the best; i need put lights and more but for start it is nice , with normals height and tessel. Really thanks for all, It will be nice if you update your manual to all new features, but it is nice, because you support is great




    I have one question. If you know please, i know Terrain Composer is from other editor but work with your software, you know if i blending textures terrain with Terrain composer in RTP section one splat section , with the mix rate and slider mode it is same blend than in your software? or is other mode? and is better your RTP mixer?
     
  24. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Sorry for being so antsy. Would I have to change anything if I plan to use four layers only?
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    4 layers in deferred is even preferable (if you can afford due to your artistic constraints) because you don't loose aniso filtering.
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    texture coverage is set in TC (like in Unity terrain engine - simply you need to paint gras, rocks, etc. manually). In RTp I have coverage mix tool, but if you've got TC it's no good to use mine as in TC you've got a lot better control.

    Tom
     
  27. truculencias

    truculencias

    Joined:
    Aug 7, 2015
    Posts:
    7
    So for better texture blend is better use terrain composer mix rate and slider mode.

    Thanks for all and nice job, congrats.
     
  28. Avonaeon

    Avonaeon

    Joined:
    Apr 17, 2012
    Posts:
    48
    Hey Tom,

    We recently had to downgrade our Unity to 5.1.4, because we ran into some serious issues with Unity. My "issue" is that it's not possible to download older versions of RTP on the asset store (To my knowledge anyway), so I'm wondering if it would be possible to get you to send me an older version of RTP? (I'm guessing v.3.2g). We need to downgrade, because the mesh blending doesn't get affected correctly by light when using 5.1.4 and 3.2i (In DX11): http://i.imgur.com/o7VeHFc.png
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Looks like stone (that uses geom blend shader - which one ?) is not affected by ambient light. Is your terrain rendered in forward or deferred. Could you check with another geom blend shader (PBR one maybe if you're in deferred for terrain).

    Tom
     
  30. Saevax

    Saevax

    Joined:
    Nov 3, 2012
    Posts:
    58
    Hi Tom,

    RTP is working great for me but I have a question.

    To create oddly shaped terrains I want to use your hole cutting to make the terrain transparent in certain sections. However going through the ColorGlobal and setting pixels to black doesn't appear to work, is there a way to set sections of the terrain as transparent in code?

    Also when generating terrains from script and assigning them ReliefTerrain, how do you set up and assign all the maps and textures?
     
    Last edited: Dec 9, 2015
  31. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Tom's support has always been top notch, one of the best in my opinion.. he cares about his tools and people who buy his tools. Keep up the great support Tom!
     
    Tinjaw likes this.
  32. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I'm seeing a pretty strange issue in Unity 5.3 when doing a standalone build: In Unity, the terrain (which is built up with an 8x8 matrix of meshes) looks perfectly fine ... but in a standalone build, some of the tiles show up completely black (which is something I've seen with RTP before, when the shader / material isn't set up correctly). Here's a screenshot that illustrates the issue. On the left, you see that terrain while playing in the editor, on the right, you see "the same thing" but in a standalone build:

    RTPTerrainIssue.PNG

    Any idea what might be causing this and how to fix it?
     
  33. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    It's been a long time after last update. can you please change tessellation system? It's not good that terrains we'll become unchangeable after tessellation
     
  34. aler_buffon

    aler_buffon

    Joined:
    Dec 9, 2015
    Posts:
    22
    Hi Thomas, working with terrain,I needed to reduce the size of the tiles to a single texture, but this option is not found. I need to reduce it near,not in the far distance. As you can do in this case?
     
  35. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Very weird. This issue came out of the blue: I had done a few builds where the terrain-mesh looked just fine. Then this suddenly started. It persisted through quite a few builds and about two days of working on the project. I tried quite a few things including copying the RTP-component to those tiles from working tiles, refreshing ... and a few more things like loading presets I had stored.

    Nothing helped.

    Then, today, trying once more to figure it out and doing yet another build without even trying to fix anything ... the issue had disappeared. Very very weird!
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    To cut a hole you need to make 0/black _alpha_ channel of global colormap and make sure cutting holes is enabled in LOD manager. To apply all textures runtime - it is not that simple for all kind of textures, because bunch of them are combined ones made via RTP editor script. But if you can prepare detail combined textures first and then apply them it's easy. Look at my doc or Refresh() function in my script. There are all textures set for shader. After attaching textures to script (globalSettingsHolder and in ReliefTerrain isntance for global maps) you call RefreshAll() which transports texture references from scripts to materil/shader.

    Do you have all textures used by shader saved to disk before making a build ? (look at combined textures tab in RTP inspector). As you work on meshes (not terrains ?) everything should be pushed to one of those 64 materials used by tiles. Apparently some of them miss textures or parameters - at first glace hard to say which one.

    From this message I believe it might be kind of hazard inside the Unity routines calling order ? But still it should make no difference, so what I can say - that's weird...

    Your request is not easy to achieve - Unity terrain system doesn't expose heights as texture, it's stored internally in terrain engine (on CPU). Tessellation work on textures. The solution might be doing some render texture runtime. I'll think about it later. Currently I need to address other issues like 5.3 RTp vs. UBER compatibility first.

    I don't understand. Which parameter exactly for near distance do you need to deal with ?

    Tom
     
    ksam2 likes this.
  37. aler_buffon

    aler_buffon

    Joined:
    Dec 9, 2015
    Posts:
    22
    Is there a possibility to set different parameters of tiling textures, for example in the standard terrain, you can set different options of tiling http://take.ms/3cTJW
     
  38. Saevax

    Saevax

    Joined:
    Nov 3, 2012
    Posts:
    58
    Thanks for the quick response.

    I'm dividing my terrains into scenes to be packaged up and loaded async additive at runtime to a "Systems" Scene. However whenever I try to build assetbundles for the scenes it puts in a RTP LOD Manager. I already have the LOD manager inside the System scene so the extra managers for each terrain scene aren't needed. How would you suggest I get around this problem?

    I could just add the ReliefTerrain instance to the terrain after the scene is loaded, would that be worth looking at?
     
  39. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    It had worked for a little while now (for quite a few builds) and now I'm seeing the same issue - just with different tiles. I double checked the combined textures for one of the tiles that has this issue, and they are all stored in the project.

    Also, I have defined two presets that I'm using for the different tiles (one is for closer tiles, on is for far tiles; the difference is just one texture that's replaced to have a somewhat different color). I now made sure that each and every tile that's visible has one of the presets assigned ... so I would assume that all parameters should be the same, shouldn't they? I guess the question is: Do the presets overwrite all parameters? If so, they should really all be the same.

    Do you have any ideas how I could solve this?
     
  40. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177

    This happened when I upgraded to Unity 4.3 on mac. I am running this on OpenGL 4.1 now, so that might be the problem. You are probably working on it alredy but I decided to leave this here anyway.
     
  41. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    564
    Same here, upgraded to Unity 5.3 on Mac, and now textures up close do this. Also in OpenGL 4.1.

    -Chilton
     

    Attached Files:

  42. Avonaeon

    Avonaeon

    Joined:
    Apr 17, 2012
    Posts:
    48
    I'm in deferred and the materials are using the Standard - RTP GeomBlend shader. It worked fine before we had to downgrade Unity.
     
  43. kaarme

    kaarme

    Joined:
    May 1, 2014
    Posts:
    177
    Also don't forget tessellation on opengl. : )
     
  44. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Does anybody have any suggestions how to improve grass texture when using RTP? I really like RTP but I think that I understand and use only few of its features. Below is a picture where I stand currently. I would like to have much more rough and bumpy look for the grass texture around the fairway. Is texture normal map only way to improve the look or are there some other functionalities that could be used?

     
  45. DecipherOne

    DecipherOne

    Joined:
    Nov 14, 2012
    Posts:
    2
    Ever since unity 5.1, when I do an actual build, when a scene is initially loaded, none of the textures show up. If I switch application focus and then go back to the game, the textures show.





    Any idea on what is causing this and how to fix it? Thanks for your help.
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Looks like kind of hazard on start. I believe I put

    anyReliefTerrainScriptInstance.globalSettingsHolder.RefreshAll();

    at start(), but maybe you should call it again a tiny bit after this (with invoke() call maybe). You could tell if it actually works

    Tom
     
  47. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514

    Mac running latest Unity 5.3 has the Pink Tiles. Just confirming this issue. Tom do you have a patch fix for this which I can put in?
     
  48. DecipherOne

    DecipherOne

    Joined:
    Nov 14, 2012
    Posts:
    2
    I added
    Code (CSharp):
    1. GetGlobalSettingsHolder();
    2. globalSettingsHolder.RefreshAll();
    to line 188 of refliefTerrain.cs in the awake method. That seemed to fix it. Thanks!
     
  49. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I have a problem with the geometry blend shader, I'm trying to blend a landingstrip, I need the normal map to tile with one setting and the diffuse texture to tile with a different setting.
    Despite both of them having separate tiling settings apparently the tilling settings for the normal map don't do anything but the tilling settings for the diffuse texture affects both.
    Can I somehow fix this?
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP works like this for a reason (performance). You can set upclose tiling that's shared across layers (RTP inspector/Main Settings tab). For far distance you can change UV blend tiling per layer though - to hide uggly patterns and still hold very detailed terrain upclose.

    LOD manager inside every scene that's causing multiple of them when you additively load scenes is not problem. Might be only a bit confusing when you're in editor. What's important is globalSettingsHolder instance that's stored in every ReliefTerrain component attached to all terrain tiles. If all terrains are stored in the same location in hierarchy they should have shared globalSettingsHolder (ReliefTerrainGlobalSettingsHolder.cs) which is responsible for feedeing terrain materials with RTP proper parameters. For additive loading it might be a problem. If terrain tiles in loaded scenes share the same parameters you might fix it manually. After loading next scene with terrain set reliefTerrainInstance.globalSettingsHolder to the instance of the very first terrain in the scene. Then calling RefreshAll() of globalSettingsHolder will work globally. If your terrains need to be independent you should store every terrain in different hierarchy location (simply put terrain into transform of unique name). Then globalSettingsHolder will be separate on every terrain (every scene). Then to apply any changes/refresh shader parameters for rendering you need to call RefreshAll() on every separate globalSettingsHolder.

    What's the most important - your every scene LOD manager should have exactly the same set of features for shader compilation (materials on every terrain tile are different, but shader is the same).

    Do you additively load your terrain pieces ? Maybe the problem us similar to what SDaevax has above ?

    Tom