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

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I've been working on rc3 last few days, stay calm.
     
  2. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Noooo... can't... wait... I am panicking! Heeeeeeelp.... :eek:

    ...hehe just kidding! :D

    Thank you very much.
     
    Dreamaster likes this.
  3. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
  4. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Haha, great picture orb.
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I've just submitted RTP3.2c for approval.

    1. U5rc3 compatibility issues

    2. all lightmap modes (realtime and baked) handled now

    3. tessellation fixes - use "Reapply" button to match terrain mesh and its "Unity's" heightmap. This means colliders, details can be better placed now, you can also use NPOT textures for tessellation now so that we can have 100% exact fit between upclose terrain - when not tessellated nor smoothed - versus collider/details placement.

    I hope this is final RTP3 release, I'd really like to go for new products and releases rather than polishing this forever (against U5...) :) (keep my fingers crossed)

    ATB, Tom
     
    ThunderTruck and llJIMBOBll like this.
  6. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Excellent. I see forward to try it!

    I wish Unity would buy your product from you and would make it a built-in function of their terrain tools. I have submitted to them "Buy RTP already!" hehehhehe... :p
     
  7. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Thanks Tom!
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Let's thank Unity AssetStore staff. They were super fast (took one day only !) with approval of RTP3.2c. It's ready for download.

    ATB, Tom
     
  9. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Has anyone else got RTP working with webgl mode? Even with the latest version there is no highlight area that shows paint is about to be added to the surface. I have mountains in my scene created by World Composer connected to terrain composer. I haven't yet been able to use RTP for WebGL. There hasn't been any specific documentation that I've seen to cover this or tutorials.. If WebGL mode requires special compatibility I think it should have it's own special area that lists the options that can be enabled/disabled and perhaps automatically disable other platforms, layers etc.
     
  10. x_african_warrior_x

    x_african_warrior_x

    Joined:
    Jun 24, 2014
    Posts:
    80
    Tom, everytime i use exit unity and come back my blended materials(water_flowmap_hb) have to be synced with terrain to get the underlaying terrain colors. i have manually bypassed this by adding a tint. have u fixed this in latest release? otherwise this shader is amazing. :) water-stream.jpg
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Try saving global colormap of terrain to asset (png file) first. I guess it might be caused materials that are assigned to blended objects miss reference to "volatile" scene objects gloal coloramp is (until it's saved).

    Tom
     
    x_african_warrior_x likes this.
  12. ThunderTruck

    ThunderTruck

    Joined:
    Sep 25, 2013
    Posts:
    61
    Hi Tom,
    New update is OK, only one error in "GeometryBlend_WaterShader_HB U5" the variable 'control_orig' does not exist (I think sintax error) simply renamed in 'control'

    However, I am worried, I use all in Unity5 with new deferred path, and many asset store developers (as you) provide a custom shader for it. Your "Internal-DeferredShadingRTPU5" is pretty standard so I could use Alloy custom deferred in its place.
    In short, the problem is that using multiple high level asset in my projects with deferred path (as RTP, Alloy, RedLight Physically Based Area Lights, etc...) all with custom shader for deferred one excludes the others, otherwise I have to merge them all. This is a Unity 5 developers team problem?
     
  13. Novaesky

    Novaesky

    Joined:
    Nov 4, 2013
    Posts:
    12
    Hey,

    My previous problem was indeed solved by the 3.2b version, so many thanks for the help on that one.

    I now have a new issue though; I added a new texture (the 7th), and it shows up in the terrain script layer section, but it has none of the settings, nor does it allow me to specify a normal or height map. I'm pretty sure I've done this before where it worked, and I know for a fact this texture works, since I had it in Layer slot 0 first, but later switched it out. Any idea why RTP is not showing any settings for the layer, or that I can't select normal/height textures for it?

    I'm also getting this error:

    And this warning:

     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You need to determine number of layers you're working on _before_ adding RTP component. So - remove RTP component. Specify 4 or 8 layers on Unity's terrain, then add RTP. This will fix the error.

    Thanks for the info, I overlooked control_orig in this shader, so replacing this with control works (_orig was only used for 2 layers geom blend heightblending shaders). For Unity deferred, I take unused A channel of world normal output. Then, in my deferred shader I'm taking lower value between attn and my value (which is used fo self-shadowing). This way we've got RTP POM self-shadows perfectly blended with Unity realtime shadows.

    So - in my case it's only one line of code added to Deferred internal pass. Unfortunately it's tricky to merge functionalities from different solutions. You need to make it yourself I'm afraid...

    Tom
     
  15. Novaesky

    Novaesky

    Joined:
    Nov 4, 2013
    Posts:
    12
    Thanks, that fixed the issue :)

    I now a different issue again. I'm sorry, I feel like I'm just piling these on you. Anyway, I've been changing the fog, and the terrain has been updating nicely, but the grass and the detail meshes on the terrain aren't, and I can't seem to find any option to update them. I have the refreshing set to on (And I'm using linear color space) as well as the linear space option (both in the update fog script and in LOD manager).

    Small update: They do seem to be updating when I change the fog settings, but they don't match the terrain (Or the actual settings, the fog looks a lot denser on the plants than it should)
     
  16. Marked

    Marked

    Joined:
    Feb 24, 2015
    Posts:
    32
    Hey Tom ,

    I am not really sure how to describe the problem I got after moving the terrain/scene to a other project.
    But it seems like RTP lost the " blending" or seamless to its textures. The textures now look very different what I had yesterday. You can easily see that the textures repeat now and the effect of breaking the seam is gone.

    Could you please explain how to put it back to normal ? :)

    Thanks in advance !
     
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    In case you're using linear lighting check if you've selected linear lighting in LOD manager (and recompile shaders). You can also look at the bottom of LOD manager there is a simple synchronising script if linear checkbox to select (shou0ld get automaticaly synchronised with LOD manager's one).

    I Don't actually understand what you mean seamless. I see no seams, but there are tiling patterns here. You could check again tiling settings in RTP/Settings/Main. Maybe you need to redo some parameters (it's not supposed to happen when you use presets), but bugs happen...

    Tom
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I'm looking into RTP3.2c vs. WebGL and it seems to be constrained platform. Anyway, it won't build by default because it doesn't handle Substances. No big deal - RTP uses them only for taking static detail textures for layers (in editor only), so I made it conditional compilation. Simply compile out parts of scripts that refer to Substances and now we can build for WebGL.

    However, shader indeed doesn't work. And it's not RTP only problem. The same for standard Unity shader (this PBR one) for terrain. I'm trying to figure out what breaks it - any specific resource limit like texture interpolator, texture count limit, temp registers used by compiler, limited functions (tex2Dlod, texCUBE, ddx, ddy functions) and so on. I need to make thorough tests on this to get back with any conclusions.

    Anyway it seems it's not problem of RTP not being Unity5 ready (or partially ready). It's rather Unity5 is not quite WebGL ready yet, or better - WebGL is not Unity5 ready yet because it doesn't allow many features (although I've read on the Windows it's converted somehow to Dx9/DX11 shader output maybe I'm wrong). We expect Unity5 features to work with WebGL while it's not 100% true yet (it's still prerelase experimental feature in Unity5).

    Tom
     
  19. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    hey tom thanks for the answer, i just actually had deleted my post because i found the answer. I had to weirdly go back into terrain painting mode and just swipe a brush across the whole terrain and it put the visibility to one, now that I think about it, it looked like a really weird cut holes section i would imagine, but I didnt have a global color map as an input yet. Not sure why that would happen though.
    Running on Unity 4.6.2 on rtp 3.2, and in case you think something like that might be caused by other plugins, easy roads, suimono water and environment gator are currently included in the scene as well
     
  20. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hello Tom,

    i installed now the RTP version 3.2 because of the annoying black texture switching in RTP 3.1 in the editor window. Now the problem is, that the UV Blend Scale for textures doesn't work anymore. The only one option for editing the tiling is in the Settings/Main settings with Tile Size X and Y, but this is for all the textures!

    Any idea what to do?

    Thanks in advance for your help.

    Edit: For Texture 6 the UV Blend Scale works fine and for another texture UV Blend Scale scales strange, buggy. For the rest 6 texture no reaction at changing the UV Blend Scale attribute.
     
    Last edited: Feb 27, 2015
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Try to recompile shaders in LOD manager first and check UV blend routing selections there.

    Could you check the issue in example terrain scenes included. Now they are (RTP3.2c) precompiled and works out of the box on fresh project RTP install.


    Tom
     
  22. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Thank you for the fast support. I figured out, it was a new attribute named "Far blend replace" 4 lines under the "UV blend scale" attribute, which must be greater than 0 to see changes with UV blend scale. Works fine!
     
  23. tomaszek

    tomaszek

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

    I've been inspecting WebGL support last days. Seems that generaly "things work" (we need to remove Substance handling though first), BUT - on my Win7 / HD4600:

    1. Newest Firefox 36.0 doesn't like ddx/ddy calls in RTP shader. I'll report Unity on this.
    2. Newest Chrome (40.0.2214.115 m) - something works, but there are some small glitches (POM resisted to work while PM worked fine, realtime shadow bugs in legacy deferred)

    Here is WebGL player working for me in Chrome, you can take a look:

    http://www.stobierski.pl/unity/RTP3.2dWebGL/index.html

    The terrain setup is 4 layers with basic features. I believe other will also work, hopefully w/o any huge limittions.

    Above changes that make RTP WebGL demo will be available on RTP3.2d update soon. First I'd like to collect more feedback from RTP3.2c

    Tom
     
    Last edited: Feb 27, 2015
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
  25. Deleted User

    Deleted User

    Guest



    unity5 rc3, rtp :) works perfectly! Puddles with animated droplets <3 love it! Thx Tom
     
    sqallpl, botumys, CyberDog and 2 others like this.
  26. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Thank you Tomas! This means a lot to me, I thought for a small while there that RTP support for WebGL might be abandoned. I'm thankful that you are investigating this with Unity and I can understand the wait with feedback from RTP 3.2c

     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    WebGL is based on GLES2 now. It's openGL (basically), but it has its own limitations. While, for example POM works in opengl mode on my desktop, WebGL doesn't handle it. Seems like loops that are necessary for POM calculations have more restricted usage in gles2. I'm trying to overcome firefox compatibility issue and as I made 2nd demo it seems to be doable.

    Anyway - WebGL is based on GLES2 for a reason - it needs to be portable between as many devices as possible. This also means - more devices - more problems. You can't expect RTP will work on most mobile devices - no matter using WebGL or not. Moreover - WebGL means actually more restrictions comparing to native platform builds I guess. So - if you agree to compromise some features RTP will probably work, but it's both - GLES standard constrained and device dependent.

    When I'll have no feedback for other things I'll submit RTP3.2d in a week or two.

    Tom
     
    Ascensi likes this.
  28. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    Does that mean i can now put the heightmap to 128 after creating the tesselation maps without getting the collision issues we had previously ?
     
  29. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Hi Tomas,
    Running into a new bit of a problem, i resolved most of the other ones ( in some spots the control splats weren't adding to 1, and it seemed that some of the height maps were zfighting with each other in areas of the black splotches - editing them in photoshop to give them a lower range seems to have fixed my main problem up to this point. I hope this little tidbit will help someone one day :) )
    Now, when I click on height and detail from texture, the whole terrain flattens out like i'm feeding it a neutral grey heightmap, actually it looks more like it's reading a white heightmap because the terrain raises up in scene view ( although the coordinates remain the same) but keeps its coverage maps and textures intact. Not sure whats happening.
    Screenshots below :), and thanks for taking the time to help me out hopefully!
     

    Attached Files:

  30. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I know you're probably sick of answering Unity 5 questions, but could you maybe put a "Unity 5" section in the FAQ with the general setup and fixes we need to use? It's getting hard to search through this whole post. I'm particularly confused by how to set up the PBR/IBL stuff to blend with Unity 5's implementation. If we're using Unity 5's new deferred pipeline, should we uncheck "PBL fit for legacy deferred"? What about the checkboxes for PBL fresnel and visibility? And should I check the Reflection and IBL boxes if I want to use Unity's reflection probes and IBL, or will that end up doubling everything?
     
  31. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Not an RTP issue, but I'm assuming RTP users are probably some of the more advanced terrain folks, or maybe Tom has an idea on this one.

    Trees in unity 5 have issues in deferred. Not sure if it's all of them but this thread has some info on the subject. I'm seeing it with all of the trees I've tried so far, and have fallen back to using forward rendering until a fix/workaround comes out. Which is sad because stuff otherwise looks much better in deferred.

    http://forum.unity3d.com/threads/terrain-trees-sparkle-in-deferred-rendering.278851/
     
  32. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Did you try my shader in that post? It should help, though it will make the leaf shadows smaller. What's annoying is I remember bugging Unity to fix this in deferred mode for like two years and they finally fixed it at some point in Unity 4, but now Unity 5 has a new deferred pipeline and the same error is back. :|
     
  33. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Not yet although I was planning on it. It's one of my things to do before alpha launch, but priority on gameplay stuff right now.
     
  34. h4voc

    h4voc

    Joined:
    Mar 2, 2015
    Posts:
    12
    Hi Tom,

    just bought your great tool!

    After some days playing around with all the settings and tryn to make my terrain use your shaders, i came to a point where i realized that the generated heightmaps (combined texture, heightmaps) are completly black. I cannot fix this issue.
    All Layers have a normal and heightmap applied.

    In addition there are no generated bumps in normalmaps.

    -All normal maps are imported as normal map.
    -All heightmaps have Bypass sRGB Sampling checked.

    I checked the docs and forum, but have not found a solution yet. Anything i am missing?

    Thanks!
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    In Unity4 - nope. In Unity5 - you put 128 heightmap for tessellation on terrain that renders terrain surface ONLY. You keep as high heightmap as previous for terrain that renders trees, details and has terrain collider (of this high resolution used) . Right order is:

    1. Make terrain
    2. add RTP
    3. sample heights/normals to texture
    4. enable tessellation
    5. reapply heights to match tesellated mesh with collider
    6. disable draw in Unity terrain settings (so terrain surface won't be rendered
    7. make copy of terrain (you need to make copy of terrain object in project, copying game object with terrain component will make it reused so it's no good)
    8. attach RTP component there and setup it again (or use preset to restore state from original terrain)
    9. change resolution of heightmap for new terrain to 128 and reapply (to overcome occlusion problems)
    10. remove collider from "lo-res" (2nd) terrain

    So - first terrain renders trees/details and has hi-res collider. 2nd terrain is used to draw terrain surface mesh only (tessellated).
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    On first screenshot you've used tessellation for smoothening terrain only. It's not advised for games where you interact with your terrain upclose because detail placement and collider will not match terrain surface. On 2nd screenshot you're using actual tessellation scenario, but you haven't provided RTP component with right height texture. You need to sample it first. Follow my tessellation video on yt channel (available on AssetStore RTP page). Make sure you've got newest RTP3.2c version to get tessellation glitches fixed.

    Tom
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    RTp in Unity5 uses it's own PBL implementation which is the same as in Unity4. The only exception is using new deferred in Unity5. Then PBR is "Unity like" with specular setup. RTP outputs glossiness (gloss) and specular color (specularity affected by tinting factor and main specular color). "PBL fit" checkboxes in LOD manager refers only to legacy deferred. PBL fresnel and visibility - for new deferred doesn't matter. Fresnel sliders work for RTP's reflections only. Direct lighting is controlled by Unity, so it's the same as in Unity PBR implementation - visibility term is used by default and fresnel effect depends on specular color (the darker spec color output the more fresnel we've got).

    Reflection probes - you need to use RTP's (IBL spec in LOD manager). No other are available. To get per layer control over ambient lighting (per pixel and per layer) you could check "noambient" in LOD manager (complementary lights are also not necessary) and enable IBL diffuse/SH in LOD manager. Then you can control ambient lighting (IBL diffuse exposure slider per layer) which will be put per pixel (so normalmapping at parts unlit directly is not cancelled).
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Check alpha channel of your per layer heightmaps. Height data is supposed to be right there. Then you can click refresh under heightmap texture slot on layer to rebuild combined heightmaps. Check your normalmaps, too. look at console output. RTP should throw erorrs there if something went wrong with combining textures (they all need to be of the same _real_ size before you combine them).

    Tom
     
  39. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Ah ok thanks. So if I enable IBL diffuse/SH but then don't put an actual Cubemap in the slot, will it just get its lighting from whatever is set in the Unity 5 lighting window? (Like the procedural skybox for example?)
     
  40. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    Hello, do you have a recommendation for a terrain decal asset that won't interfere with RTP and terraincomposer?
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Yep, will work. In Unity5 when you use "IBL diffuse" you have not IBL cubemap even exposed (because it's solved via spherical harmonics not cubemap texture fetch anyway - like in new Skyshop).

    I'm not much into 3rd party packages, but you can assume terrain is just terrain - mesh where you can stick something at the surface (like my geom blend functionality in RTP does). In forward you should experience no problems. In deferred - specularity are the problem. In new Unity5 deferred sticked decals are rendered in forward anyway. The only warning is when you try to use tessellation which makes terrain mesh _not that simple_ to predict on script side after it's tessellated and smoothed.

    Tom
     
    jalapen0 likes this.
  42. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    So I upgraded the whole project to Unity 5 and the whole terrain is purple. Do you have documentation/tutorial on that?

    Thanks :)
     
  43. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Do you also updated RTP with the last version? (and re-compile shaders)
     
  44. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    I just imported my terrain into Unity5 (the release build), and my terrain is now all black.
    It was ok in RC1.
    I'm using RTP 3.2b
    Anyone having the same issue ?

    Thanks
     
    Last edited: Mar 3, 2015
  45. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    When was the last update released? I downloaded RTP somewhere in february.
     
  46. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Yes on that first screenshot i was just showing up the terrain working at it should - kinda, until i enabled tessalation on the second screenshot. Weird, I did have a tessalation map created from your tool in the global normal map slot, but I regenerated it again, it looked more noisy and applying it made the terrain work again. Don't know why the original one wasn't working anymore? Was it because I probably generated it before enabling tessalation? In your videos you do it after tesselation, so maybe the order matters.
    Anyway, i can't seem to get detailed height textures working. I see the terrain tessalating via proximity with the near and far values, but it's completely ignoring the detailed heightmaps (which do not have any alphas that could mess with it), the alpha of global color is also correct, even tried removing the global color map in case something weird was happening. I'm sure I'm missing something very easy, since I had detailed heightmaps working before, and went through and enabled each of the options one by one in rtp lod manager to see if there was something i missed.. at the end of my rope here, any help would be greatly appreciated Tomas.
    Thanks again.
     
  47. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    BigB, go download 3.2c, the issues are fixed there from what I read. Or if you want to stick with 3.2b, on his youtube channel, there's a video of what needs to be done to get 3.2b and unity5 working together.
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Download RTP3.2c, definitely... :). I'll check tomorrow RTP3.2d against Unity5 official release and will submit this ASAP (WebGL problems addressed - at least most of them - because it's constrained target platform).

    Tom
     
  49. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    I just imported RTP3.2c , and it's not working.
    My terrain had 8 layers, some of the layers now are pure black.
    I recompiled the shaders, and now I get this error :

    Shader error in 'Relief Pack/ReliefTerrain2GeometryBlendBase': undefined variable "_TERRAIN_HeightMap_TexelSize" at Assets/ReliefPack/Shaders/ReliefTerrain/RTP_AddBase.cginc(3081) (on d3d9)
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Disable tessellation for a moment (in LOD manager/recompile shaders) and check if parallax effects work w/o tessellation. Look at combined texutres tab - heightmaps if they are correctly made there. Try again to turn on tessellation with proper height&normal texture. Have you followed my tessellation video ?

    Tom