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 with geometry blend on AssetStore

Discussion in 'Assets and Asset Store' started by tomaszek, Dec 4, 2012.

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860


    Released:
    http://u3d.as/content/tomasz-stobierski/rtp-relief-terrain-pack

    Please, take a look at documentation here for detailed description:
    http://www.stobierski.pl/unity/RTP.pdf

    Pre-release discussion here:
    http://forum.unity3d.com/threads/152531-New-relief-mapping-techniques-%28fast%29/page2

    Main features:
    - AAA look of terrain at great framerates
    - 8 POM textures with self shadowing in 1 pass
    - Hard, well defined blending between detail maps
    - Global normal / color maps
    - Built in geometry blend toolset for seamless merge terrain with your geometry
    - Adjustable via fallbacks for wide range of GPUs
    - Can be used on arbitrary mesh
    - Requires GPU with SM3.0. Does not require Unity PRO (only example scene has water).

    EDIT - I'd like to update to version 1.0a with fot fixes for problematic cases. Please refer to the newest web player and check if fixes work.

    I had to disable antialias postFX everywhere because it seems that this is what crashes some machines (and most probably has nothing to do with my shaders).

    Version 1.0b update available -> openGL hotfixes
    Version 1.0c update available -> openGL hotfixes, lightmapping issues
    Version 2.0 update available:

    - Dynamic snow
    - 1-12 layers (4 layers or 8 layers in FirstPass now available)
    - New UI that makes your life easier
    - Terrain compositioning right inside inspector
    - Triplanar texturing (in 4 layers per pass mode)
    - Vertical map (global) texturing
    - Improved lightmapping (recovers bumpMapping in signle mode)
    - Geometry blend works for terrains AND arbitrary meshes (objects vs. Mesh terrains works now)
    - U4 DX11 compatible

    Version 2.1 update available:
    Substance to terrain layer texture export has been introduced and a few additional bugs detected&fixed. In Unity 4.1 substance textures export works in both Indie and Pro. In lower Unity versions user need to have Pro license to get the feature working.

    RTP 2 features tour available here (with lots of screenshots)

    --------------------------------------------------------------------------------

    Latest working demos

    Below we've got whole set of WebPlayers with different set of features used. They can be easily adjusted via dedicated RTP_LODmanager script. This way you can use features you think are important for your project taking into account performance of end-user machine:

    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 (better mobile could handle this I guess)>>> webplayer

    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)
     
    Last edited: Oct 12, 2013
  2. MikaelTroc

    MikaelTroc

    Joined:
    Nov 2, 2012
    Posts:
    33
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,562
    looks great!

    lars
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Last edited: Dec 4, 2012
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,562
    and runs pretty fast!

    lars
     
  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Unfortunately, that webplayer locked up my lowly little MacBook Pro (Core Duo 2 with x1600 graphics) running latest version of Chrome. The system was completely frozen, had to force power down to restart. Never seen that in a webplayer before.:( Just curious, which version of Unity are you using, 4.0?
     
  7. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    It's looking really weird, very detailed but (maybe it's the too high detail?) it ends up looking weird when moving and looking far away (as if each pixel was changing color wildly each step), not sure how to describe this.
     
  8. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I'm on a MacBook Pro as well (Intel HD Graphics 3000). No crashes, but I see strange black streaks along the edges of polygons in the scene from some angles / LODs.
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    It's done in Unity3.5.6 and the same time Unity4 ready (to handle multiple terrain per scene). I also experience lags and freezes from time to time in forced openGL mode on my PC. I don't know what's the issue, but will try to figure it out (maybe GLSL shaders are so complex that runtime compiler in openGL choke, only speculating now).
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860

    PC, Mac, conf please. If it's only possible, please attach screenshot. I'd like to have any idea what's going wrong.
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Screenshot please :)

    EDIT - tweaked something - please check again webplayer if streaks are still here.
     
    Last edited: Dec 5, 2012
  12. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Can't wait to use this, now I just need to test upgrading my project to Unity 4.
    One question: What's the technical limitation that prevents 3.5 from handling more than one terrain?

    Thanks tomas
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    In 3.5 we can't provide terrain with additional parameters (textures, etc.). What we can do is using Shader.SetGlobal...() functions that set variables for all shaders in the scene. As different terrains need different params, we can't do it in U3. In U4 we've got access (Terrain.textureTemplate - no docs but this is it) to material associated to terrain. This way we can inject params into specific material for specific terrain w/o necessity to use globals.

    Meantime I'm working on compatibility issues with some openGL machines (no problems with PC machines). As you see some "black PR" above discourages people I guess :/.
     
  14. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    PC, unity 4, nvidia 540M GT, windows 8X64 attaching a screenshot won't help as any screenshot looks fine, it only looks weird "in motion", will try to video capture it if you want but i'm not sure i can get the quality of the video high enough to see this, but it "does" look really weird so hope i can.
     
  15. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hi,
    is this straight line normal ?
    Thanks

     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Normal :) I just didn't have time to uv map the "cube rock" model in the example without seams.
     
  17. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The good news is I think you fixed my issue with the black streaks.

    The bad news is I got the total machine lockup the bigkahuna saw.

    Here's what I ended up with in the console. Looks pretty unhelpful, except perhaps the 0x0 image thing, but maybe it will mean something to you:

    12/7/12 10:07:56.559 AM PluginProcess: CGImageCreateWithImageProvider: invalid image size: 0 x 0.
    12/7/12 10:07:56.559 AM [0x0-0xea9ea9].com.apple.Safari: Dec 7 10:07:56 Garden-of-Pure-Ideology.local PluginProcess[42917] <Error>: CGImageCreateWithImageProvider: invalid image size: 0 x 0.
    12/7/12 10:09:54.000 AM kernel: stampWait: Overflowed checking for stamp 0x168294b0 on MAIN ring: called from
    12/7/12 10:09:54.000 AM kernel: timestamp = 0x168294ab
    12/7/12 10:09:54.000 AM kernel: **** Debug info for *possible* hang in MAIN graphics engine ****
    12/7/12 10:09:54.000 AM kernel: ring head = 0xc4a00cbc, wrap count = 1573
    12/7/12 10:09:54.000 AM kernel: ring tail = 0x00000f30
    12/7/12 10:09:54.000 AM kernel: ring control = 0x0000f001 enabled, auto report disabled, not waiting, semaphore not waiting, length = 0x010 4KB pages
    12/7/12 10:09:54.000 AM kernel: timestamps = 0x168294ab
    12/7/12 10:09:54.000 AM kernel: Semaphore register values:
    12/7/12 10:09:54.000 AM kernel: VRSYNC: (0x12044) = 0x168294ab
    12/7/12 10:09:54.000 AM kernel: BRSYNC: (0x22040) = 0x0
    12/7/12 10:09:54.000 AM kernel: RVSYNC: (0x 2040) = 0x0
    12/7/12 10:09:54.000 AM kernel: BVSYNC: (0x22044) = 0x0
    12/7/12 10:09:54.000 AM kernel: RBSYNC: (0x 2044) = 0x0
    12/7/12 10:09:54.000 AM kernel: VBSYNC: (0x12040) = 0x0
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    This could mean something to Unity core programming staff :).

    However what crashed my laptop (Win7 buit-in HD3000) in openGL mode was antialias postFX... I had to disable it. It's too problematic on many machines and most probably has nothing to do with my shaders. I believe that was bigkahuna problem, and yours.

    Z-fighting problem ("streaks" - I assume it was this particular issue for some Mac users) has been detected I believe. Shadow collector passes + terrain multipass shading or rendertexture shading causes such problems on openGL (esp. in deferred). I believe now it should work. Please check the latest webplayer (the same link as previous).

    Unfortunately I can't refer to Ronan's problem on Win8. (DX drivers, or ... ?). Anyway on any PC I've tested it (laptop Win7, built in HD3000 or GT 540M, desktop Win XP GT240, desktop Win XP HD 4650) I had no issues.

    Tom
     
    Last edited: Dec 7, 2012
  19. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Hi. I've added this to my Unity wallet, but didn't buy yet because I still see artifacts on shader.
    Terrain, artifacts no more, but on props like those rocks and bridge things are still pretty ugly, is this UV mapping issue?



    Mac OGL.
     
  20. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    No crash but the streaks are back.



    Heh, BrUnO XaVIeR beat me to it.
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Well. nVidia ATI or Intel OGL are different. I guess now it should work for everyone. Check again
     
  22. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Just tested with latest player and still getting the same weirdness, video bellow (not high quality enough, what you're looking for is the far areas flickering as i move, static images look fine, and everything looks ok when rotating camera, but looks weird when moving around):

    https://www.dropbox.com/s/juwkkes78hcxg26/Artefacts.wmv
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Thank you for time spent on preparing video. Unfortunately, probably due to compression, artifacts can not be seen (or I can't see anything suspicious). Tell me - problem exists at far or close distance surface ?

    I really like to know and fix it to put hot fixes on AssetStore ASAP.
     
  24. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Problem doesn't happen at "very close" distance (say, within 2 units or so), but is visible pretty quickly.
    I will try to see if i can capture at much highter quality (not very used to expression encoder but will see if i can tweak settings, not sure if i loose the quality at recording or encoding step).
    Expect another video in 10mins max ( don't forget to answer your emails ! Eager to know if we can figure out a solution to work together :) )
     
  25. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Ok managed to get a highter quality take, it's upscaled because i was no good at the settings in the encoder, and it's ziped so that dropbox won't display it on site and you can download it directly.
    You can't see the issue when there are shadows, skip to about 7 seconds in the video and look at the mountain, as soon as i move toward or away from it every pixel seems to flicker.
    If you want a more detailed video can you make a standalone exe? Maybe the issue would be more visible if i could run this at screen resolution instead of in tiny web player (not sure if it would make the issue more or less visible, but may give a hint either way?).

    https://www.dropbox.com/s/6py3lvppf109wj7/HQ Artifacts.7z
     
  26. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I'd just like to say how superb this asset is. It's not just the relief mapping for textures. It supports 8 out of the box. The global normal features...adds SO much perceived detail to the overall terrain. This in itself is pretty nice.

    But all the nice sliders and configuration options for tiling, options for near, mid and distant terrain...it's more than just relief mapping for your terrain. It's like Unity terrain 2.0. It also provides something I was looking for for a long time...a better way to blend textures.

    The only downside I have seen is the Unity 3.x limitation of only being able to handle a single terrain, which means I can't use it for my main project, but it is what it is. But for most, this is an absolute must have for any terrain :)
     
    Last edited: Dec 8, 2012
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Your help is really appreciated, but I can't tell any "pixel level motion" seen is due of my shader or it's video compression related. Tell me exact specs the meachine you're runing the webplayer, becuase I also have laptop with Win7 on GT 540M, but webplayer in my browser (Firefox) can't be set to use this GPU but it always run on built-in Intel HD3000. I've checked it however as standalone in DX and forced openGL mode either in HD300 or GT540M - no issues (except for HD3000 in OpenGL resists to show shadows as openGL on Windows is quite "buggy" in general I believe - quoting Aras).
     
    Last edited: Dec 8, 2012
  28. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Thank you jc. Words heal after months of hard work :) Now I'm just waiting for proper relationship between appreciation and sales.

    BTW, I'm perfectly aware of other people that will never get the idea how hard it is to polish such system (yes I refer to those "webplayer please" ... ["so I can rip the shaders for free"]. Only thing I can say that nothing will be pushed further with this product till enough people go and just buy it as it's NOT expensive against the features it gives.
     
  30. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I'm surprised any potential customer would rip this, i may be completely off but i assume most asset store sales in this price range are at least semi pro people who are after the proper licence and not just the code? (i know that's what really sold me on unity at least, clean easy licencing of assets)
     
  31. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    No more Z-fighting or crash on my system (MacBook Pro w/ Intel HD Graphics 3000). Good job! Still get occasional hiccups, but that's Mac notebook gaming for ya...
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Great.I'll submit V1.0a into assetstore tomorrow or monday I guess with all fixes.

    About Win8 issue. Sorry I can't help for now as I don't have machine to test it on. However I dig a bit on net and saw that nVidia GPUs + Win8 might have issues (at least many products/games has issues with such configuration). Let's wait a bit, maybe Microsoft and nVidia drivers have more to do with this issue than my shader code. Anyway I'll definitely will keep my eye on it.

    Tom
     
  33. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Could be that however i've had no issue with any games (and i play many :) ) nor other shaders so far.
    Just a quick check (as the only time i had an issue with a shader it was that and no one else seemed to have this issue except for me) are all your variables initialized to default values and not just declared? Seems the driver / gfx card / no clue what special factor there is on my PC is sensitive to that.
     
  34. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,076
    Is there a global color map in use in the demo scene?
     
  35. tranvandinh

    tranvandinh

    Joined:
    Dec 6, 2012
    Posts:
    49
    looks great!
     
  36. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    Do I have to have the RSP pack to use this pack?

    Thanks
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    RTP RSP are independent. However RSP has "bonus" which can be placed in RTP following instructions to get POM shader on meshes blended with terrain.
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Yes. Global colormap is used but is not much distinct. I made it quickly from top ortographic view of terrain. Refer to docs. Global color map blend is split into 3 distances and uses multiplication (can be adjusted - it's described in helpbox in my terrain script inspector). So you can specify how much multiplaction blend is used for near distancev (where parallax/normal effects are seen), mid range (where global normal map becomes visible) and far distance.

    Tom
     
  39. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Just to say i've purchased it, and looking forwards to playing about with it over the next few days (Other modelling things notwithstanding)
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Version 1.0b just released. OpenGL hotfixes and nothing should crash (my shaders were harmless - as usual :) )
     
  41. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Hi Tomas,

    In your demo scene, i suppose lightmapping is not applied and shadows lenght is very hight ?
    Also, is lightmapping working nice with surface blending ?
     
  42. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165



    Nvidia GT 630M
    Intel Core I3
     
  43. LongMozart

    LongMozart

    Joined:
    Jul 5, 2011
    Posts:
    26
    Hi Tomas,

    Great products, both RSP and RTP. I remember you mentioned grass rendering somewhere. Are you working a grass rendering solution? If yes I would love to know more. I really need a good (animated) grass solution for some of my visualization projects.

    Keep up the good work :)
     
  44. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    He already has a very nice grass rendering solution, see his signature or here : http://forum.unity3d.com/threads/80987-Volume-Grass-system-on-Asset-Store-soon
     
  45. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I secretly hope that grass integration is in the pipeline for an update in this shader, as good value the shader already is

    I'm assuming it's much cheaper than tesselation, i do intend to use tesselation on what im using this (Or my shader guy does anyways, he's been working on dx9 consoles for 5 years so he wants to go crazy) with but want to keep it where it will be directly beneficial/unable to duplicate via other means
     
  46. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I doubt that, the grass shader is completely unrelated to those 2 new packs and has been here for a while.
     
  47. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    In a poll he asked if things like grass integrating with the terrain shader would be beneficial and it got a favorable response, and as part of a whole terrain solution it makes a lot of sense, so i'm seeing what develops there. I'll pay for it eventually if i absolutely need to but atm the price is too steep for me, as a hobbyist
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860
    Platform please. Mac I suppose ? I see floating point precision issues here (grass which has flat zero extrusion height is not properly blended while rocks from ground on the left part blend fine). Have to check it. Thanks for pointing the issue.
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,860

    VolumeGrass itself will have fine updates in a few weeks I guess. I'll try to squeeze even more to get better performance as I've got some ideas after a year from releasing it (I'm still learning how to make shaders faster and better). There is also a chance it could work on Inide if we can compromise some features - grass volume sidewalls.

    The reason I put grass integration question in poll was I'd like to know how much such feature would convince potential buyers to get RTP. At this point there is no change to pump much more work into RTP till it's justified by sensible sales. Of course I fully respect hobbyist point of view, but spending so many weeks mastering the product can't be considered as hobby. Working on anything for AssetStore is very risky matter. I'm more and more on the side that it's impossible to get reasonable ratio work/gain. No matter how hard I'd try...
     
    Last edited: Dec 12, 2012
  50. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ahh i understand that, im not entirely sure the asset store is a great place to make money, i just try take advantage of the good things on it, i dont really feel any surprise at devs disappointment at it, even though there is gold on there
     
unityunity