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.

RTP - Relief Terrain Pack v. 2 - features tour

Discussion in 'Assets and Asset Store' started by tomaszek, Feb 21, 2013.

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Relief Terrain, Excite the Audience (sounds good, doesn't it ? :D).

    RTP 2.0 is just coming to AssetStore (as an update for current users - thank you everybody who bought RTP 1 !).
    DX 11 and Unity4 tested.
    A whole bunch of new features that set new level of Unity terrain rendering.
    Unmatched realism, very comprehensive shader system that can be very simply tailored to your need - fully scalable from simple normalmapping using 4 layers (with global colorMap/normalMap), thru triplanar projection, advanced dynamic snow, up to beautiful 12 parallax mapped layers, but that's not all...

    (RTP 1 thread is here: http://forum.unity3d.com/threads/161235-RTP-Relief-Terrain-Pack-with-geometry-blend-on-AssetStore/)

    Let's start the tour:



    As in RTP 1 - you can blend layers using heightmaps (it's now very simple as they're handled automatically after putting right grayscale height texture in inspector).





    Whole script inspector UI has been rewrited from scratch.
    Now everything is logically grouped. I made sure that most things are managed automatically. All layers properties can be handled in one place. We've got brand new feature that allow to compose splat/control maps without necessity of using any other terrain composing tools. Example terrain is done using WorldMachine2 (tmd file of example scene is included in package).



    For those who don't use WorldMachine, Terragen, or similar tool, we can acquire terrain properties like steepness, height, directions and save them as grayscale masks for terrain splat composition (above)





    Generally we've got 4 shader LOD levels that can be switched realtime (when you get end-user system info you can decide which option use for good performance). Another features can be adjusted using new script RTP_LODmanager which allow adjusting options needed. Manager can tweak shader files and recompile them. You don't have to look into shader code, but you could do it anyway, because some fancy settings are possible only this way - everything is described and sorted out in shaders using #define keywords. It's actually quite simple to tailor shader this way for only needed options that would boost performance.









    Now we've got a few methods here to hide ugly tiling issues. Yet another way is to use superdetail (described below) selfmask settings at far distance, but this is not enabled by default as below methods works good enough:







    Global colorMap improves much terrain look, esp. on far distances





    And we can also use lightmapping that shaders handle special way






    Shaders can be used on arbitrary meshes (example scene using mesh exported from WM2, optimized in blender - 60k tris)





    As in previous RTP version we've got geometry blend toolset, but now it works for arbitrary meshes, so we can do mesh vs. mesh blend. Terrain and blended geometry can be correctly lightmapped now (RTP 1 had some issues with it).






    Got snow texture and place it on a terrain using one of layers ? Good, but that's static. Now we can use quite advanced DYNAMIC snow features


















    To get very detailed terrain look at close-ups we have to use hi-res textures. As 2048x2048 looks fine, they don't work much fast... Using new feature - superdetail (revealed at small distances only) you can push quality up





    That's what many users await - TRIPLANAR. My version can be lightmapped and is sensible optimized. However, it's a bit constrained. Triplanar works only in mode that handles 4 layers per pass, so we can use up to 8 (triplanar) layers. No paralax effects available either. Didn't implemented as it would be too expensive I guess.





    Another brand new feature is global vertical mapping - ideal (but not limited) for "Grand Canyon" landscapes. Without this option making such rocks would be very hard. Now your moutain scenery will just rock...







    Tiny detail but might be useful for demanding users - global MIP adjustement (works in most cases, except for triplanar modes)





    At the end - this is what I'd like to introduce in next versions, but now I've got no effective idea how to handle this automatically (ShaderLab got everlasting bug that makes impossible to write into z-buffer straightforward, the only way for DirectX is tweaking compiled shaders...) However I might think about preparing such version of shader with selected set of features on RTP2 user request (not for free - sorry - it takes some time). This can solve "hovering" details issues. By now you can solve this by reducing parallax effects locally using global colorMap alpha channel that can be painted via geometry blend tool.





    Thank you for your attention. I hope you liked it :D. RTP2 will be submitted to AssetStore in a day, so might be available at the beginning of the next week I believe.

    ATB, Tom
     
    Last edited: Feb 22, 2013
  2. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I bought V1 when you anounced V2 would kick ass price would increase, i thought i wouldn't need it (seeing as i have the custom work you did for me), but i think i'll have to blend the 2 together are there are some really nice things there :)
     
  3. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,307
    Congratulations on the new release.
    The results look stunning!!!

    Will the shaders work with unity3.5.7? Because I haven't upgraded to unity4 yet.
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Thanks Ronan. I still got secret hope that more people will spend 5 minutes of their life (as I spent another 2 months of mine), go to AssetStore and put some REVIEW on my products. Sincerely - I'm a bit disapointed with current users lack of activity on this field as it could encourage a few people more buying my product.
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    They're written in U3.5.5. Works in anything higher. In U4 you can use shaders on multiple terrains per scene. I tested it in DX11 mode (had to put special effort to make it working) - performance seems to be much better than in d3d9 for the same source shader code (maybe 20-30%) - that's good news for hi-end GPU owners. RTP should fly on their fancy machines and that's the idea - kicking Unity terrains a few levels up :)
     
    Last edited: Feb 22, 2013
  6. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Aye i already have your 3 package 5 starred but only a review on the grass one (i bulk review due to the amount of assets i own, so once in a while i set 1 or 2 hours appart to at least rate them all review if i have something to say).
     
  7. kasulogamestudio

    kasulogamestudio

    Joined:
    Mar 22, 2012
    Posts:
    130
    Hello Thomaszek,

    What terrain size is ideal to work with your solution? Looks really nice btw :)
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,583
    wow, that looks absolutely amazing.
    but we need a webplayer instantly! ;-)

    lars
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    It doesn't constrain terrain size. In example scene I used 1024x1024 resolutions for control map and heightmap. You can also use multiple terrains sticked together (ready made solutions are available).

    As new features appear terrain might be heavy to render on low-end GPUs. I 'd like to attach 3 web players then to not discourage people that much :). When we turn off (or reduce its features) dynamic snow and some other bells&whistles shaders work quite well. We can also use not atlased versions now. For people that need only 4 layers, but need better layers blending, triplanar or vertical texturing this is ideal solution, too. I also wrote AddPass (with everything but POM shading). This way users can use triplanar on 8 layers (in 2 passes).
     
    Last edited: Feb 22, 2013
  10. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Juste very happy to bought RTP 1 !

    It looks like a huge work you achieved tomas ! I will be happy to test it !
     
  11. DaneC020

    DaneC020

    Joined:
    Mar 19, 2010
    Posts:
    191
    Tomaszek,

    I bought RTP about a week again and haven't had a chance to look at it just yet but then I seen this thread. These changes are even more amazing than what you had before! As for reviews, I apologize since I am just as guilty as many of us. I will go ahead and log in right now and review the product for you! I am also a member of your Volume Grass, so I will double check to make sure I reviewed that one as well.

    You have always made great products and I recommend this package to anyone who is serious about making great looking terrains!
    -Dane
     
    Last edited: Feb 22, 2013
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    OK, latest working demo here:
    http://www.stobierski.pl/unity/Terrain2_WebPlayer_release/WebPlayer.html

    It's 8 layers in one pass rendered. With all new fancy stuff turned on it's a bit heavy to render, but still not dramatic :).
    Turned on - uv_blend, superdetail, dynamic snow with its highest quality

    I'll submit lighter versions tomorrow. Also with triplanar and vertical textures to judge the performance on different machines.
     
    Last edited: Feb 22, 2013
  13. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Can we get a standalone version? As usual webplayer means it will default to my integrated intel chipset instead of the 540M :(
     
  14. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Nice. These are very nice shaders, sadly, I don't have the money to buy them. :(

    EDIT: Your web player performed terribly on my computer. No greater than 10 FPS when all settings at minimum. It needs to be optimized a little more I think. Your first pack performed much better, although I must say these shaders do look more next-gen. :)

    Video card is NVIDIA GeForce 8600M GT 512 MB.
     
    Last edited: Feb 22, 2013
  15. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    My dell at work has an integrated graphics card and got better performance than that, Seven. Even on POM with shadows and all. Might wanna check your system :)
     
  16. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Well the 8600M is a 2007 graphic card, for mobiles, and it was mid range back then, so depending on what integrated gfx you have it could easily beat that without surprise.
     
  17. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Ah, that explains it. For some reason, I pictured a more powerful card.
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,583
    Last edited: Feb 23, 2013
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    This is one of the most OpenGL nasty issues ever... Z-buffer gets different values for teoretically the same geometries. It was an issue also in RTP 1 which I resolved. In RTP2 for openGL you need to uncomment "Offset" directives in all shaders or try to force blended geometry to be rendered in forward. This will cure it all, but offseting subsequent passes has its cost, as other (tiny, but distinct) artifacts might occure at very steep angles.

    In case of geometry blending first I render underlying mesh which "mimic" terrain. It's child of main blended geometry object. As normals are baked right inside child I'm able to blend mesh vs. mesh now. Next, main geometry is added on it using any shader with decal:add and its alpha taken from vertex color. In forward you don't see artifacts because child and main objects render forward. In deferred, however, child is rendered as forward (exclude_pass : prepass) because I see no way to blend normals properly. Main object is rendered in deferred. This is causing artifacts in OpenGL.

    Such z-fight issue might also occur (OGL only) when we render terrain in 2 passes. That's why Wolfos complained that every terrain replacement shader is broken. On my machines it's a bit random issue. When working on RTP 1 I experienced this in openGL mode on my both Win machines (4 different GPUs tested in sum). When I finished RTP 2 I saw that problem just ... vanished mysteriously as I can't remember what could I change to make it work.

    So - in RTP2 I decided to not offset anything as 2 pass shaders look much better without it (8 layers terrain with firstpass and addpass) , but I left fixing "Offset" directives in all shaders. They are currently commented.
     
    Last edited: Feb 23, 2013
  20. Wrekk

    Wrekk

    Joined:
    Jul 16, 2012
    Posts:
    51
    When is RTP v2 coming out? And also if I buy RTP v1 now, do I get to update to v2 for free? :)
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You must hurry as RTP2 has been already submitted for review by AssetStore staff, so buying now you spend $40 (presale..., buing in a few days - spend $50. I had to increase price because of all these new features and huge amount of time when working on this new release.
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    OK, here we've got whole set of WebPlayers with different settings.
    This is kind of proof that RTP isn't constrained to "next-gen" machines only, but everybody could find some interesting, yet usable, configuration:

    All effects turned on, 8 layers in one pass >>> webplayer

    Like above, but with simple snow and superdetail turned off >>> webplayer

    Still 8 layers per pass - simpliest version >>> webplayer

    8 layers like above (simpliest set of features), but splited into two passes. You can judge what's faster on your machine >>> webplayer

    8 triplanar layers (4 in first-pass, 4 in add-pass). Note that triplanar disable parallax effects >>> webplayer

    4 layers triplanar with vertical texturing. Good for geologicaly advanced scenes :) >>> webplayer

    Like above, but w/o triplanar, so we've got parallax effects (POM/PM shading working) >>> webplayer

    4 layers - the most simple version. Only global colorMap normalMap used (can't be turned off anyway), but we still got parallax effects and height blending adjustable realtime.
    This could be version for low-mid range GPUs >>> webplayer

    Considering performance we should know that this scene could be probably better optimized in 8 layers mode as there are plenty large areas where splats 0-3 and 4-7 overlaps (for example whole starting "island" - grass is layer 0, sand is layer 4). If you arrange layers better in your scene things could work much faster. To check it - view sand areas only where no overlap occurs and compare performance with coastline where huge overlapping parts are present.
     
    Last edited: Feb 23, 2013
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Test above webplayers. I'll post 2 standalones in a minutes. Considering price, would you buy it if it cost $... ? I'm thinking about putting LITE version on AssetStore - 4 layers only, no parallax effects (but heightmap blend), no geometry blend, simple snow, for terrain usage only.
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Standalone - 8 layers with simple snow, PC version>>> zip file
    Standalone - 8 layers with simple snow, Mac version>>> zip file

    Standalone - 4 layers simpliest, PC version>>> zip file
    Standalone - 4 layers simpliest, Mac version>>> zip file

    I build it under Unity4, so PC versions should be able to get into DX11 mode (with better performance than DX9 I believe). For simple 4 layers version (that still looks nice IMHO) I can get very high framerates on my PC (nVidia GT240).
     
    Last edited: Feb 23, 2013
  25. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Thanks a lot for all those builds !
     
  26. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Just tried the topmost standalone (8 layers with simple snow) and i'm getting very weird results, i think the texture on the bridge and the stone right bellow is the same one (seems to be the same in classic shading). It works just fine for POM on terrain, and not at all on the mesh as you can see on this screenshot taken from the bridge:

    $Capture.JPG
     
  27. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Bleh immage attachment seems to be broken again, do yall see the image in my previous post? If not i'll upload it to dropbox
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I can see the attachment, but I don't see anything weird ? These 2 textures are not the same. Note that bridge mesh isn't shaded with any kind of "POM silhouette" shader. It's simply Bumped Specular, but blended with terrain at the edges of the bridge. To get better geom blend shader (POM w/o silhouettes) you could buy RSP, such geom blend shader is placed there as a bonus (and to gently convince people to get my both packages :) ).

    BTW - I found fixed your HD3000 mipmapping problem. This GPU seem to do more magic when calculating textures. I guess it takes info about texture data, too. That's why my MIP level selector have been broken. In RTP2 I replaced mip calculation code for DirectX. Moreover - you can manually adjust (realtime) LOD bias to get more crisp or smooth texture filtering.
     
    Last edited: Feb 23, 2013
  29. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Ah i see, i thought it was POM shaded too, no bug then i guess :)
     
  30. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Great package, one question is vertical mapping applied all arround the terrain in same dirrection. What i mean for example if you have steep round island will this vertical texture be applied vertically all arround the island or only in one of 4 dirrections?
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    In general vertical texturing is done only in one dimension, so texture used might be 1xN size. However when I perturb it I do it for u&v coords, so using texture a bit wider than 1 pixel is also fine. Anyway you can make it looking not that "flat regular" using disrtorion feature.

    Tom
     
  32. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    How is the texturing applied? Is there a specific texture which has the vertical texture assigned, and wherever you "paint" that on the terrain it gets the vertical texture?
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You've got "1D" (2D used, but u coord not that important - might play a role when distorting) texture applied depending on which height (global y axis) a pixel is placed on terrain. I guess this is the only practical way to simulate such layered geological structures. Splat mapping or triplanar alone would not be capable of making such effect that good and simple.
     
    Last edited: Feb 24, 2013
  34. Wrekk

    Wrekk

    Joined:
    Jul 16, 2012
    Posts:
    51
    I'll just wait and pay more. :)
     
  35. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    So, if you use the vertical texture it gets applied globally? I'm a little confused, sorry :)
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Yes, this texture is applied globally. Whole terrain gets multiplied by this texture, but level of application we can set per layer (so you can completely turn off blending for choosen layer, or apply only a bit of vertical texture color multiplication). If you use multiple terrains (Unity4) you can use different vertical textures, of course - it's not "that global" as dynamic snow feature which is true "global". Multiple terrains gets the same settings (depends on script execution order as every ReliefTerrain script attepmts to write global shader params). This way every object on the scene (for example any mesh that use my shaders which uses RTP snow) gets snowed :). I didn't tell it directly,
    but when you use separate passes, you could adjust addpass defines manually in shader code to get a bit different set of features than first pass. RTP_LODmanager set it everywhere the same (only triplanar can be set independently for firstpass and addpass). When you get update you'll quickly get the idea of what is going on.

    Update should be available soon. I guess Unity AssetStore people should review and approve it monday, tuesday.
     
  37. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Yeah, it's not too great unfortunately, but I can run most other terrain shaders without a problem.

    Oh, we'll. It's still a fantastic shader. It could still render, despite being laggy, but it would probably do better in standalone. I'll try the other demos and see what I get.
     
  38. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Very nice, thank you! I'll certainly try them.
     
  39. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I'd definetly buy them, but a lite version is always great.
     
  40. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    669
    Hi there,

    I'm very interested in the snow shader.
    Does the snow shader work only on terrain, or it works too on meshes, like a fbx mesh that we drag into the terrain ?
    It looks great, good job !

    Thanks,
     
  41. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Meshes and terrain. It said that in the OP.
     
  42. caldrin

    caldrin

    Joined:
    Dec 4, 2011
    Posts:
    127
    ah awesome work..

    When its on the asset store will we be able to just update version 1 or do we need to download a seperate version ?

    Thanks
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    It's just update. That's my "thank you" for those who bought it already :). I hope it will be on AssetStore today or tomorrow. Then I'll wait for a while, collect some feedback, eventually put some hotfixes for bugs I've just missed. Then I'll put Lite version on AssetStore. And then - I'll ... rest (at last !!!) and work on long queue of quite different tasks that must be done (RTP2 engaged me much).
     
    Last edited: Feb 25, 2013
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Just got Unity Q&A admin email - RTP2 - live on AssetStore. Please give me feedback on how does it work for you.

    REMEMBER - this version have so many things changed that upgrading it on your current project might rise potential risk of missing references, also some scripts, shaders have been arranged differnet way (different names, folder placement, etc.

    So - it's best to backup your project before upgrading.

    P.S. Be patient while shader compilation. GLSL versions take ages to build... :/
     
    Last edited: Feb 25, 2013
  45. caldrin

    caldrin

    Joined:
    Dec 4, 2011
    Posts:
    127
    Imported the new version.. but in DX11 the textures are still showing as just a blur. not really had time to read through the docs yet jsut thought i would let you know.
     
  46. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    669
    Hey tomaszek,

    Could you tell me if the snow shader, if it's SM2 or SM3 ?

    Thanks !
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Terrain shaders are SM3, only lowest fallback could work on SM2, but I'm not sure. The only SM2 shader working would be bonus shader that can be placed on any mesh - "BumpedSpecular - simple snow". For low demand snow solutions you might look at AssetStore snowsuite written by Lars, works fine as a simple solution (no bumps, etc - just pure white color placed where it should be).
     
    Last edited: Feb 25, 2013
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Screenshot with bug from example scene taken on DX11 mode please. Docs are only basic. I've decided not to write that much since users don't read it anyway... (in 95% cases) :). You can always ask on a forum (or private message, but on forum everybody will be able to get the answer as they run into similar issue). I'll try to react sensibly quick.

    ATB, Tom
     
  49. caldrin

    caldrin

    Joined:
    Dec 4, 2011
    Posts:
    127
    Hi

    This is DX9


    DX11


    Also noted in DX9 the textures no longer blend as well as they did in the old version, again there is probally a bit of tweaking i need to do to get it to look the same.

    Also this was not a fresh map I literally imported and updated to the new version and it appeared to build the shaders with no errors.
     
    Last edited: Feb 26, 2013
  50. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,307
    Hi tomas. I tried today the 2.0 update and the demo seems to work ok on unity 3.5.7.

    However I have a problem with the rocks that use the blend shader. The small rocks jitters with black triangles as you move the camera.
    The big rock has not this issue, but when I duplicate it it has the same behavior as the small rock.
    Here is a screenshot:

    $rtp.jpg
     
unityunity