Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    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,352
    As it works fine on fresh project I believe something might interfere with your RTP meshes. In this case it's probably best to make a screenshare session like before to find a problem. You've got me skype added - I'm available almost everyday between 9AM-6PM GMT+1 (central european time zone).

    Meshes doesn't share the same material as they simply can not - they use different params (coverage for example). May I could try to batch thhem into one I don't believe it would improve performance (as meshes will take 1/2 drawcalls per terrain tile anyway so no problem on this side).

    Best Regards, Tom
     
    Last edited: Nov 12, 2013
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Hi,

    Ronan's right. I've heard about this issue before and I'll try to avoid this in next update (will change the name of my ColorChannels enum to something like RTP_ColorChannels). This moment you can try to redefine it yourself either in RTP or conflicting package if you're able to do this (as realise not everybody is programmer).

    Tom

    EDIT: if this issue is workbreaker for you - contact me PM or email

    tomaszek at stobierski dot pl

    with your invoice pdf for user verification and I'll provide you quickly with working version (with enum definition changed)

    EDIT2: I've just realised you can fix it quickly even if you're non programmer - pretty automatically. Find conflicting package and remove it from project (if possible !). Then open any script in mono and use Search/Replace in files. Set *.cs as file mask and replace all "ColorChannels" with "RTPColorChannels". Then you can import conflicting package back. This is what I've just done 1 minute ago to fix RTP... :)
     
    Last edited: Nov 12, 2013
  3. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212

    Thanks...yeah ...for some reason a search for any conflicting files hits zero results...when I search my assets folder ..its kind of odd... its why I was thinking this was just an issue with RTP3 ...

    I guess I have too many assets installed for it to find anything ..or something..

    I have all these installed because im working on a SciFI game with RTS,FPS,RPG, and flight sim elements ... and I have a time constraint..

    I figure since im going to install Unity 4.3 anyway ...along with all the assets I may as-well try to see what it is conflicting with ..since I have to add each asset 1 at a time..since selecting every asset from the start causes problems anyway..

    If you plan to change it to RTP_ColorChannels in an update that would be great though.
     
  4. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    415
    That's strange as I upgraded my project to Unity 4.3 which uses RTP3 and no problem here. No special RTP features (water, snow, ... ) used though, didn't even had to recompile the shaders. Must be the feature set I guess.
     
  5. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    I'm using geometry blending, maybe it's the cause ? Btw, geometry are pink too.
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Could you give me exact specs from LOD manager to test ? cygnusprojects is probably right as problematic might be only one of RTP features. I'm just about installing U4.3.

    Tom
     
  7. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    I'll give you my config tomorrow, the project is @ my work. (but I can say that I'm using POM without shadows for first pass, PM with projection mapping for second pass, water, cross pass blending, details for pass 1 and 2)
    Btw, I will try to set a fresh new project, mine is maybe damaged.
     
    Last edited: Nov 12, 2013
  8. sskillz

    sskillz

    Joined:
    May 23, 2013
    Posts:
    12
    Hey,
    I'm working on a game that uses a lot of terrain, and the project leader tried RTP 2.1 and ditched it
    since it gave him problems and low fps on his mac, for me on windows it worked perfectly with almost no performance hit.
    Now with v3 I hope it will works so I'll convince him to use it, so I bought it, even if he won't incorporate it, just to support your awesome work. So keep it up :D (Thought its already mega awesome).
     
    Last edited: Nov 12, 2013
  9. SeanM3D

    SeanM3D

    Joined:
    Jul 24, 2013
    Posts:
    192
    Hi Becoming, is this Island Demo part of the RTP v3 package? I can't find it in the ReliefPack folder. Or is this demo publicly available elsewhere? Thanks.

    Thanks
     
  10. SeanM3D

    SeanM3D

    Joined:
    Jul 24, 2013
    Posts:
    192
    Tom, I get this error when I try to save the current splat map to a png file:


    NullReferenceException: Object reference not set to an instance of an object
    ReliefTerrainEditor.SaveTexture (UnityEngine.Texture2D tex, System.String save_path, System.String default_name, Int32 buttonwidth, TextureImporterFormat textureFormat, Boolean mipmapEnabled, Boolean button_triggered, Boolean sRGB_flag) (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:4206)
    ReliefTerrainEditor.OnInspectorGUI () (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:1366)
    UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/ea95e74f6e5f192d/Editor/Mono/Inspector/InspectorWindow.cs:888)
    UnityEditor.DockArea:OnGUI()

    Same happens when I try to save the combined heightmap as PNG. What's causing this?

    Thanks.
     
  11. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,284
    Really Nice Project. Looks Awesome.

    I'm mainly working on Mobile projects and would like to know if you have performance metrics for Mobile.
    A quick list of what can be used on Mobile would be really great.

    Cheers.
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    RTP3 can be compiled to gles target w/o errors so I assume that theoretically it will work, but can't tell the performance as I haven't tested this yet. I bought my first tablet just a week ago (simple MALI 400 GPU) and I'm trying to get familiar with android. To test it I assume I'd have to buy android Unity license while I'm not "mobile oriented" developer. Anyway - I'll try to test it when possible or ask somebody with mobile developing experience to test it. t this point I'd risk a statement that with just basic set of features RTP will work on modern mobile as its display is also in many cases smaller than desktop (RTP shader is fillrate/pixel intensive).

    Another problem is CPU consumption which in case of built-in Unity's terrain isn't very impressive, but you can also use RTP on arbirary mesh, too (for 1 drawwcall per terrain).

    Tom
     
  13. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    Ugh, MALI 400 is pretty dated as far as mobile GPUs go. Sure it's still in fairly widespread use but pretty much dying out as the vast majority of non-Apple devices seem to be sporting Qualcomm Snapdragon chips with "Adreno" GPUs. Incidentally, these are extremely good in terms of performance and GL-ES conformance / GLSL implementation in my experience. Gotchas when moving shaders from desktop-only testing to such devices are typically related to float precision qualifiers (lowp/mediump/highp aka fixed/half/float) which are completely ignored when testing shaders on the desktop.

    MALI400 based on anecdotal evidence has its fair share of shading issues, but was the first GPU to support GL-ES 2.x and I guess became widespread with Samsungs Galaxy devices. Even those in their newest versions seem to be going for Adrenos by and large nowadays though.

    Android Indie should be enough for your tests, don't think you'd need to buy Android Pro for this.

    You would think so, until you realize modern devices like the newest Galaxy, HTC One or Nexus phones tend to sport 1920x1080 displays at around 5 inches! Hence I'm always shooting for half-res in these "Retina" times and stuff is still looking fine as long as the cam keeps moving.

    One of these days when I'm real idle I'm gonna test RTP3 on my HTC One / Adreno 320 but probably out of the users in this forum someone else with a similar current-gen high-end device will be even more eager to do so. If stuff seems to "suck" initially on your Mali, don't fret it.. it's really on its way out. Devs who want to support 99% of devices going back to iPhone 3G etc. tend to write 2D puzzles and Candy Sagas, rather than next-gen HD terrain stuff :D

    Unity Terrain as of 4.2.2 runs pretty decently with default shaders on current-gen mobile if you stick to 1 Terrain instead of endless tiles, high pixel error (200 will have to do :D ), balanced resolutions for the various terrain maps, limit to single-pass (4 splat layers with default shaders, no pixel lights or other things requiring addPasses) etc.

    They have said that this was vastly improved in Unity 4.3 but haven't verified that yet. Indeed simply adding a terrain to the scene on a spring-2013 quad-core phone will drop the "CPU FPS" (real gpu fps are always vsync-capped on devices, either 60 or 30 depending on app perf. other factors) from a smooth 150+ down to 80-90. Still got room to do more stuff other than terrain but it's a noticable hit. But that's with 4.2.2, if terrain culling has been really improved in 4.3 this should be better. Still too scared to fetch 4.3 for another 1-2 weeks though :D
     
    Last edited: Nov 13, 2013
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    It was answered many times. Island demo isn't part of RTP package because of intelectual rights to assets used there. The demo is not al,la out RTP, but about many more technical achievements there 9for example ocean shading) which will be separate products in enar future.

    Could you give me the code in this line ? Is this:

    Code (csharp):
    1.  
    2.     textureImporter.textureFormat = textureFormat;
    3.  
    ?

    If so - please give me your specs (platform, Unity version). testure importer is taken using AssetDatabase call and I'm forcing database update after writing texture. I worked always to me and everybody testing this so I don't know what happen. Anyway - you can check if texture is saved on the disk on the location you set. It's usable then for RTP (just put it into tex slot in inspector) if it resist to work.

    Tom
     
  15. blockcipher

    blockcipher

    Joined:
    Jul 4, 2013
    Posts:
    19
    My project upgraded fine to Unity 4.3 and my project is large. It uses Superdetail, snow (layer and normal), water and animated droplets. No pink (missing) textures or splats.
     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    I also updated this w/o problems. So we wait for botumys feedback about his RTP features config.

    @metaleap Thank you for extensive analysis post. I'd love somebody to check RTP3 on mobile device maybe you could check this to give some feedback ?

    Tom
     
  17. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    I tried with a fresh new project, and after random results and/or error messages, the shader work again.
     
  18. gotstyle

    gotstyle

    Joined:
    May 6, 2009
    Posts:
    84
    Unity 4.3 fixes :)

    Terrain: Tree colors in linear rendering mode are now rendered correctly.
    Terrain: Fixed incorrect color space setting on detail (grass) objects.
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Olivier, do you remember on which random setting shader resisted to compile ? I'd like to fix any eventual issue users could run into using U4.3.

    ATB, Tom
     
  20. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    I'll try again tomorrow and give you more precise feedback.

    edit: fast test @ home

    with this configuration :

    $er1.jpg

    I encounter a lot of error messages (looping error, each time I move the camera, the error list grow)

    $er2.jpg

    The errors vanish if I use PM for both passes.
     
    Last edited: Nov 13, 2013
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    I know what's going on. In U4.3 multicompile is handled different way and redefinition of options inside shader code cause problem.
    When triplanar is on and POM shading is declared shader makes redefinition from POM to PM to force "switch off" POM - this is now bad for multicompile.

    For this moment it's just fine to open problematic shaders that throw errors - this would be only shaders that use TRIPLANAR + POM shading. You can manually remove RTP_POM_SHADING_LO, RTP_POM_SHADING_MED and RTP_POM_SHADING_HI

    from line like this:

    Code (csharp):
    1.  
    2. #pragma multi_compile RTP_POM_SHADING_LO RTP_PM_SHADING RTP_SIMPLE_SHADING
    3.  
    so for every pass that uses triplanar should be reduced to

    Code (csharp):
    1.  
    2. #pragma multi_compile RTP_PM_SHADING RTP_SIMPLE_SHADING
    3.  
    POM shading isn't used with triplanar anyway, so I'll fix LODmanager to not allow set POM variations in shader code (in pragma multi_compile definition line) when triplanar is present.

    Tom

    P.S. RTP3.1 is on the way. Beside of bug fixes with this version will have a few new nice features. I'll report them here when they're ready (haven't decided yet what exactly to implement and what leave for further updates).
     
    Last edited: Nov 14, 2013
  22. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,905
    Really great package!
    Can i use the textures freely for my project?
     
  23. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    This might seem like a promotion but it really isnt, I just though it would be extremely useful for users of this asset, when you need so many different textures that have normal/height/specular maps and so on - theres a site i'm subscribed to called www.gametextures.com and for what you get the freelancer sub is incredibly good value, every single texture they have has diffuse, gloss(roughness), normal, height, specular and various other maps for every texture and a ton of different rock and ground textures. Might be a great help as it would probably stop everyones landscapes using tomas' textures! Haha. If you have the money for their corporate deal, not only am I jealous but they'll do textures on request.

    Just thought that might help specifically in this asset's case
     
  24. lmtm

    lmtm

    Joined:
    Sep 9, 2013
    Posts:
    29
    Hello,

    I added Your RTP to my project. Everythingis working fine, but when I want to build my script, each time I receive error in Your script GeometryVsTerrainBlend.cs

    line 837 :
    // działa jak meshcopy, ale przykleja obiekt do gruntu
    public void StickToBlendedObject(bool normals_flag=true) { Default parameter specifiers are not permitted

    How can I repair it ?

    Thanks, Milos.
     
    Last edited: Nov 14, 2013
  25. Rcalt

    Rcalt

    Joined:
    Aug 5, 2013
    Posts:
    3
    This actually is more due to the default compile settings of MonoDevelop over anything directly with RTP. To fix this, in MonoDevelop go to Project > Assembly-CSharp Options (or Assembly-CSharp-Editor Options). The Under Build > General settings change the Target framework to Mono / .NET 4.0

    You will have to do this every time you add a new file to Unity due to it resetting the project settings. The work around for this can be found half way down in this thread where the user genail posted an editor script that auto updates the project to use 4.0 framework every time: http://forum.unity3d.com/threads/67...t-parameters?p=1046184&viewfull=1#post1046184
     
    Last edited: Nov 14, 2013
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Everything you find in RTP package you can freely use in your projects. Textures I made in B2M from public domain textures, or use free substance available output or used free Unity default textures from free project available on assetstore +B2M to get normal/heightmaps.

    Some textures of RTP might be considered useful, other - just as example, but watch it to not overuse it :) (as your terrain might look like RTP example scene - which is, of course, not that bad... :) )

    Tom
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Thank you. As I've never ran into this problem I wouldn't even know how to answer lmtm... But as somebody sang "people help people" - much appreciated :)

    Tom
     
  28. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,269
    Seems like it's been fixed in the latest MD 4.0.1 that comes with Unity 4.3.
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Looking at posts I'd meanwhile ask - anybody knows how to disable in U4.3 auto indentation ? I mean - I'm hitting return and cursor doesn't appear below the begining of previous line but with a few tabs of indentation - very annoying as every new line I add I have first to remove indentation which seems to be just badly inserted in the part of of code I deal with...

    Tom
     
    Last edited: Nov 15, 2013
  30. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Wow, not looking at the thread for a few days and it has grown 4 pages in the meantime, a lot of buzz around RTP! I'm really glad to see that.

    No, i was looking for but i don't have the sculpt anymore... however, it was not very detailed... its more like a guidemesh, the details come from worldmachine. You can also use Terrain Composer for the details or play around with noise in photoshop and multiply it on the heightmap, there are many ways to do it.

    thats great, so then my advice would be to always stick with linear.

    I am wondering, maybe Tom can shed some light on this... when you paint triangles using the blend mesh feature and deactivate the object so only the underlying object is visible, it renders the terrain transparent on this area. I think it could be used for this aswell, would be a nice way to missuse the feature, but i am not sure. Tom, what do you think?
     
  31. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Tom

    Did the updgrade to RTP 3 this morning... looks good so far (had to search for some of the options because of the UI shuffle, but the UI does look more intuitive now, so thats just me being used to the old one).

    I just have some small things:

    Please don't expect people to have a "main" camera in their scene. I get a lot of errors because of this line:

    Code (csharp):
    1. bool reflexDisabled = Camera.main.actualRenderingPath==RenderingPath.DeferredLighting || (Camera.main.actualRenderingPath==RenderingPath.UsePlayerSettings  PlayerSettings.renderingPath==RenderingPath.DeferredLighting);
    In my scene there are 6 cameras at the moment, 2 of them are active at any time (splitscreen game). Is there any other way to get this information? Checking all cameras in scene? Checking the active ones?

    I'm not sure if this is a real problem or not.


    I also have seen some shadowing artefacts but I am not sure if this is the fault of RTP 3 or Unity 4.3 (I updated both at the same time), and I need to reproduce it first to find out. I will let you know if it happens again.


    Then I am not sure why I can't select the Extrude reduction option on my terrain textures... and it seems the option "detail blend sharpness" has been moved and I can't find it. As I especially like the option to turn it up to full sharpness, I really miss this option. where has it been moved to?


    Apart from that, looks great. Other than the perlin noise map I could not really test out the new feature, but this alone is pretty amazing.


    EDIT:

    Another Problem... I use the KGF Minimap System, which worked fine in RTP2... but in RTP3 I get this weird color / tiling problem, which is most probably coming from the global color map. But I turned it down to zero completly, so any Idea what I need to do to get the normal terrain colors back?
    The map is an image shot by an additional temp camera that takes the image at the game start.

    $minimap_rpoblem_rtp2.png
    RTP 2 (Yes, it should be this dark... it is a night scene)

    $minimap_rpoblem_rtp3.png
    RTP3
     
    Last edited: Nov 15, 2013
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    As about holes in terrain.

    I guess Peter is probably close relative to MacGyver (in terms of CG ideas)... :). Yes this is VERY good idea which is already here in the package... I haven't thought about this the way Peter suggest. It was originally set to optimize expensive RTP terrain shader for sticked geometry.

    I'll check how does it work and get back with ready solution, because cutting holes is one thing. Another is disabling terrain collider at the "cave entrance", but this can be also solved straightforward using a bit of scripting.

    Tom
     
    Last edited: Nov 15, 2013
  33. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    Hi, another strange glitch:

    If I use triplanar (PM for both pass in this case) and UV blend On, I get white lines where triplanar map's interception occur.
    With UV blend off, the problem disappears.

    $triplanar2.jpg
     

    Attached Files:

    Last edited: Nov 15, 2013
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    I'm aware about this isse. I overworked some details in triplanar (wanted to make it looking better while it actually looks worse...). Will not be present in RTP3.1. You can remove the problem manually. Find this line in RTP_Base.cginc and RTP_AddBase.cginc:

    Code (csharp):
    1.  
    2. colBlend=lerp(half3(0.5, 0.5, 0.5), colBlend, saturate((triplanar_blend_simple-0.75)*4));
    3.  
    and comment it out (maybe don't remove line completely this moment as I'm not sure if this won't have any surprising drawback in the future :) ). However w/o this line you'll find hard edge between triplanar "mapping planes" edges (the same place you see artifacts now) but should look much better than now.

    ATB, Tom

    P.S. I'd suggest to use triplanar on one pass only (for performance reason - try to arrange coverage the way steep stuff like cliffs is placed on 4 layers of either 1st or 2nd pass).
     
    Last edited: Nov 15, 2013
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    I check this curretly if Camera.main is present, but there is no perfect solution for this. I'll probably make it the way complementary lights settings are always active in inspector but I'll just put hitbox warning message that they just don't work in deferred.

    Let me know when get any conlusions on this.

    Extrude reduction is optional now (turn it on in LODmanager). We should avoid unnecessary calculations in shader as you can just increase "floor" of your layer heightmaps (raise its "blacks" up using leveling filter in any image editor).

    Yes, I removed heighblend sharpness as I wanted to gain a bit of performance in the shader (to not use 2 pow functions). Now I'm doing blending like this:

    1. far distance - no "compression" - coverage is taken "as it is"
    2. mid distance - I'm "compressing" edges with ^2 function
    3. close distance - I'm "compressing" edges with ^4 function

    which is good "fixed" solution in 90% cases. However, sometimes thare might be users like you that would like to use more sharp edges". For you I'd suggest to just make a quick tweak in shader code. Find this in RTP_Base.cginc and RTP_AddBase.cginc:

    Code (csharp):
    1.  
    2.     float4 splat_control1_mid=splat_control1*splat_control1;
    3.     float4 splat_control1_close=splat_control1_mid*splat_control1_mid;
    4.  
    as you see - this is part which realises "compression" for harder edges and change it with your formula. For example for close distance you could use yet another multiplication after 2nd line:

    Code (csharp):
    1.  
    2.        splat_control1_close*=splat_control1_close;
    3.  
    so it's ^8 sharpened. Similar lines you'll find in code a few lines down for "splat_control2" variable (used in 8 layers mode). Treat it similar way.

    2 ideas. Does your minimap looks bad only ? Then maybe try to change order of Start() functions invokation so that RTP start function is fired before minimap render. Another idea I would say it might have something to do with complementary lighting - try to set to 0 and see results.

    ATB, Tom
     
    Last edited: Nov 15, 2013
  36. GerySoelkner

    GerySoelkner

    Joined:
    Nov 8, 2013
    Posts:
    7
    Hi Tom.

    First off, RTP3 is absolutely amazing! I've been fooling around with it for a while now and it works like a charm!
    I encountered a couple of problems though. Maybe you can help me out here.

    1) I used 4 layers of textures to create a terrain with splatmap and all the other stuff. That worked perfectly.
    When i wanna add a 5th texture now, i have a strange shading behaviour. See screenshot below:
    $Bildschirmfoto 2013-11-15 um 14.31.21.png

    I tried both firstpass and addpass in the LOD manager but nothing works (recompiled shaders as well)

    2) Whenever i use a parallax map for height information i have a problem with the view angle. When i look at it from one side it looks cool and from the other side there is something messed up. Please see screenshots below:

    Cool:
    $vkaJYgc.png

    Messed up when observed from the other side:
    $BtqHtSG.png

    Would be great if you could help me here so i can enjoy this fantastic addon without any trouble :)
    Thanks in advance!
     
  37. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    Hi Gery, for your first question, RTP works with 4 or 8 textures, you need to "feed" the shader with 3 more textures to avoid
    problems :)

    @tomaszek thanks, I'll try. About triplanar for 2 passes, it was just a test, usually I use triplanar only with second pass in PM mode (for cliffs, big surfaces) and POM without triplanar for the first pass (more detailed surfaces)
    About blend colors, why the max value for the 'uv blend value' slider is limited to 0.9 and not 1 ?
     
    Last edited: Nov 15, 2013
  38. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Hey, i can point something important out about RTP... its mentioned a few times already but i think you have missed it, with RTP you should always use 4, 8 or 12 layers... when you use 5 it takes the same performance as using 8(and its really designed the way to get the most out of it, 5 layers are always a bad idea with unity terrains anyway, because of unused splat texture channels) so make use of the textures... this should solve problem 1, and possibly also problem 2... it can be that you use to much extrusion, but it hink it is really just a problem with the amount of layers.

    edit: yeah, botumys was faster... i had a call that distracted me while typing
     
  39. GerySoelkner

    GerySoelkner

    Joined:
    Nov 8, 2013
    Posts:
    7
    Hi botumys and Becoming.

    Thanks for your fast replys! So i'll gona add 3 more layers to solve the first problem! For the 2nd issue i'll gona reduce the extrusion as well (it was just a little messed up before adding the 5th layer).

    Anyway, awesome asset!!

    Thank you guys!
     
  40. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,905
    Hello again : )
    I watched the first tutorial and it was really good and informative! When can we expect the next tutorial to come out?
    Also, do you plan to do any short tutorials on how to make maps in WorldMachine or have any good tutorials for that, especially colormap?
     
    Last edited: Nov 15, 2013
  41. Amfu

    Amfu

    Joined:
    Apr 9, 2013
    Posts:
    177
    Hi Tomaszek,

    Just so you know, I posted a few screenshots of TerraVol v2 using RTP3 here: http://forum.unity3d.com/threads/17...ains!/page14?p=1419806&viewfull=1#post1419806

    I didn't really take the time to finely customize the material parameters and use my own textures, etc., but this is already looking very good, especially the rocks. I'm sure TerraVol customers will be able to make more beautiful terrains now!
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Hi, I'm glad you like RTP3, so welcome aboard :). Use 4/8/12 layers. In PM you just can not use much extrusion - it won't work. Use POM instead (recompile shaders using LOD manager to use POM shading). However PM is much faster than POM.

    Eh, as usual - buried with work on new features and releases I just don't have time to make more tutorials... However you could see what Nathaniel (eagle555) did a few posts above - he made island tutorial about using TC with RTP. I'll make more tutorials...later (sorry).
    I believe that, however "non interactive", my pdf codumenation is very informative too and highlight every RTP function.

    Making nice terrains - you should dig into www resources. Recently I found this one where usage of WM is described to generate output for hi-end Unity shading.

    http://www.bitsalive.com/how-to-create-awesome-terrains-in-unity/

    Tom
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    I follow your thread and was eagerly waiting for your results integrating TerraVol with RTP. Well, what I see is very nice... :). However I believe that you're able to make even better screenshots, esp. with incoming RTP3.1 where I added also caustics to this "voxel shader" - fantasy islands scenes surrounded with water will be now easy to do. You could also try to make usage of snow on your terrain - should look spectacular.

    Tom
     
  44. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Doesn't seem to make any problems for my project at the moment, so take your time to come up with a solution. I've just seen this solution / oversight too much in packages from the asset store...


    I will.... so far it has not happened again.


    Fair enough. I turned it back on as setting the bumpiness of the normalmaps in Unity does not seem to have any effect anymore (in Unity 4.2 and RTP2, that was still the case. Weird)... I will experiment with the base heightmaps later on, maybe then I can turn it off again.


    Thats a shame, because the heightblend often looks best when it really is sharp.

    Its better now with your fix... but looks still way worse than in RTP2 sadly. Instead of taking a true heightbased blending its now just somehow mish-mashing the two textures at the border. To be honest, the height based blending was one of the cooler things in RTP2. I would really like to get that back, even if it costs some Frames (I'll save them somewhere else).

    Any chance you could tell me how I can change the RTP3 Shader so the Borders look closer to RTP2?


    Examples of a Border:

    $heightblend_problem_rtp2.png
    The Texture Border between my current tarmac and rubble textures in RTP2

    $heightblend_problem_rtp3.png
    The Same Border in RTP3 with the fix you told me about earlier. Note how neither the Height nor the Diffuse Map are as sharply heightblended as in RTP2


    BTW, is there any reason why my whole terrain is now shiny as hell? I turned down the specular value of all the layers just like I had in RTP2, and still everything looks more like plastic as soon as a strong light shines upon the terrain. I never had such problems in RTP2. What am I doing wrong?



    Changing the script execution order did not help.... or did you mean something else? What do you mean by complymentary lighting?


    thanks for the help


    Gian-Reto
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,352
    Gian-Reto,

    Sharpness slider - shame on me you say... :oops:

    I removed it after thinking a lot about it. :). 2 reasons:

    1. pow functions to compress it more are expensive. If we'd like to make it better - gradual like now we're changing from far distance (no compression thru mid range to close range) we need 2 pows. I'd like to avoid it...

    2. compressing aggresively can cause floating point precision issues. Let me explain. To make heightblend I'm multiplying coverage (taken from control map) by the layer heightmap. They both can be small (low coverage and dark value of heightmap). After multiplication we get very small number. Then after doing ^64 for example on this using pow the number gets extremely low. Then I have to sum up all layers computed this way and normalize result dividing with this small number. Of course rest of layers will be probably higher so in most cases this will be no problem, but sometimes (when dark parts of heightmaps overlap across more layers) normalizing get unstable causing not much pausible artifacts.
    All depends on heightmaps and local coverage setup, so there is chance you'll never experience problems until you run into such "pesymistic case". I put some kind of protection code in shader to get rid of potential artifacts and this also can cause more "bluriness". In shader I try to make code safe from dividing by zero or numbers that are "almost zero".

    (3.) some users don't like too many sliders (they get dizzy with them... :) - I'm serious - look at the comment on the assetstore on my another product VolumeGrass - disadvantage mentioned was that we've got too many controls...)

    In your specific case as you're demanding user (I appreciate this !) when you'd like this little rocks to popup over tarmac I'd say you will need "custom solution" which you can just check - compress it to the level you want and see if it's acceptable, replace this (watch RTP_Base.cginc and RTP_AddBase.cginc):

    Code (csharp):
    1.  
    2. float4 splat_control1_close=splat_control1_mid*splat_control1_mid;
    3.  
    with strong pow compression:

    Code (csharp):
    1.  
    2. float4 splat_control1_close=pow(splat_control1_mid, 64);
    3.  
    (do it for splat_control2_close variable below in case you use 8 layers mode).

    But after you compressed this strong there is this "stability protection" part of code like this a few lines below:

    Code (csharp):
    1.  
    2.         {
    3.         float normalize_sum=dot(splat_control1, 1);
    4.         float instabilityFactor=saturate(normalize_sum*2048);
    5.         splat_control1 = lerp(splat_controlA/dot(splat_controlA,1), splat_control1 / normalize_sum, instabilityFactor);
    6.         }
    7.  
    (also for 8 layers that takes both splat_control1 and splat_control2 into account). Try to comment this out because this part makes your heightblend quite weak no matter how hard you compress it using pow() call. I'm not sure, because I don't have your textures to check, but maybe ^8 introduced by this additional multiplication I gave you in the previous post together with "stability protection" out will do the trick - check this.

    Moreover I'll maybe introduce this stability thingy as an option that ca be disabled via some #define in shader (let's say #define HEIGHTBLEND_STABILITY_PROTECTION). Commenting this by user will remove this fuzziness the case user don't need this and decide he want very strong heightblend. I'm even thinking that I went to far with this "protection" anyway... Making this optional (maybe even disabled by default) could be an idea for incoming RTP3.1 update.

    More in the theme of heightblending. It was you that gave me an idea that we could make edges darker where heightblend occurs for "fake AO" effect. Today I got an idea how to make it more "real AO", because now when two flat layers blend we still have dark outline which is distracting. I put slider to turn off the effect per layer to minimize this (holding effect only for very bumpy layers). I have to check my idea first before I'll get back here and present this on the forum because I'm not sure implementation will be simple and practical enough, but the chance that heighblend in RTP3.1 will be set to the "next level" of realism is quite real - so stay tuned.


    In regards to specularity - you can set shininess (specularity slider per layer) in layer settings, but it works effectively only in forward. Then check your textures if they don't have bright alpha channel. If they are RGB w/o alpha - you'll have full gloss on layer. To adjust global specular color go to Settings main and adjust specular color. The same place you'll find the answer what's "complementary lighting". I'd suggest to go thru RTP3 pdf docs first because there are so many new features comparing to RTP2 that it's good to know when upgrading your project. Also - go thru troubleshooting section of doc first. These are only a few pages to read and maybe will put more light on any eventual issue.

    I don't see the reason your minimap is different - if the terrain itself looks just fine viewed from the top when game is running your minimap camera that grab it at the beginning should "see" the terrain the same way. Read about complementary lights in the doc (they are low by default so probably they are not the reason you've got it different). They work in forwrd only, so if your minimap cam renders in forward and your terrain is rendered in deferred by "main" camera results might be different.

    ATB, Tom
     
    Last edited: Nov 15, 2013
  46. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,905
    This happened to me as well at work, everything was really suuuper shiny but when i tried it at home it worked a lot better, maybe its a gfx issue?

    tomaszek: I can understand that, the link you showed was really helpful. Just love playing around with this and WM, so much fun! : D
     
  47. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I see what they mean... I too was overwhelmed at first by the many options of your shaders... but as I have become used to it, I really appreciate the options. Gives you the power to really tweak to get the max effect at the min FPS drop.

    But being able to compile the shader without the option to make it more performant is of course even better. This way, new users don't get confused by the amount of active sliders, and advanced users can just activate what they need.

    I also appreciate your effort to make the shaders more performant, don't get me wrong. At the end of the day, the visual quality does not count if the framerate drops...


    Thanks for trying to help here.

    I tried your proposed solution... it made the close distance look pitch black. I even tried the standart solution ("float4 splat_control1_close=splat_control1_mid*splat_control1_mid;") with the part you told me to comment out commented, still almost pitch black. The other way around also did not work, still pitch black.... with just a harsher border to the mid distance shading.

    So it looks like your protection code is indeed needed.... or my textures are somewhat extreme. Could it be that the normalmaps should be bumpier? Less bumpy?

    Basically I took what worked in RTP2, so I guessed it would work here...


    That sounds awesome, Tom. I'm looking forward to really test out your current solution as soon as my Testure border woes are fixed... currently it is hard to see the "fake AO" as the border between the features of the different textures is just too hard to make out.

    But I'm sure there is a solution for that.



    As I said before: I took what worked in RTP2. Which includes Diffuse Textures with the Spec in the Alpha. I did double check it, and it looks like I took the right textures.

    But you are right, I should consult the docs first. I will do that and see if I can solve this problem somehow.

    EDIT: checked the docs, then checked my project. No, I am not using complementary lights, the option is disabled in the LOD Manager. Checked the troubleshooting section:
    - Water is disabled
    - Just checked my textures again.... they contain the spec in the alpha channel

    Any Other ideas?

    EDIT 2: Thanks to Becomings Post, the problem has been solved. My Specular Textures were just too bright.


    I will definitely check the docs and see if I can find a solution.

    EDIT:
    What strikes me as odd is the weird tiling effect I get with RTP3 for my minimap image. Could it be an issue of the global color map?
    I set everything to zero at the beginning cause I did not want to use the color map, but still got this issue. Is it even possible to completly turn the color map off? How do I test to make sure if this is causing the problem?

    EDIT 2:
    This was also solved by reducing the brightness of the specular textures


    But why would it then still work as before with RTP2? I made a backup of my project before updating RTP. Everything is the same besides the RTP Version. So I would have a hard time believing in a GFX Issue...


    thanks for the help

    Gian-Reto
     
    Last edited: Nov 15, 2013
  48. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    154
    Initially, I don't really have any textures that have Heightmaps... just Normals. It seems like most people would be running into this - is there a tool everyone uses to go from Normal to heightmap?

    Secondly, I've just started trying to get RTP running and, at least with the stock settings, everything is extremely glossy... does this indicate something is terribly wrong? would my missing heightmaps cause this?
     
  49. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756

    Hi

    2 things to try:

    - Make sure you have your specular texture in the alpha channel of your diffuse (color) texture. You can add it with Gimp or PS, or other tools
    - Make sure Water is switched off in the LOD Manager

    I am also fighting with this problem and this two steps did not help me with a project I upgraded from RTP2 to RTP3, so there might still be something else wrong.
    But I hope Tom or someone else can point me in ther right direction here, and also help you if you can't get it to work in the meantime.


    Cheers

    Gian-Reto
     
  50. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Specularity and glossiness work just fine, there are 3 things to check:

    1) Overall specular color on main tab
    2) Specularity slider on the individual layer settings
    3) And most importantly the alpha channel on the diffuse maps

    Basically you can getting away with leaving the first 2 at their default setting in almost all cases. Your alpha channel on the diffuse maps should be rather dark, this is no issue but its just the way it has to be done if you like to have your materials setup plausible. If all of your textures have a too bright or dark alpha channel you can use the specular color on the main settings tab to counter this. For finetuning use the specularity slider on the individual layersettings.

    My recommendation when working on the specularity is to open the textures in photoshop(or any other image edting program) and use "levels" on the alpha channel till you get it right. Here is how your alpha channel of a cliff texture could look like:

    $Cliff1_spec.jpg

    edit: and your second question... there are many tools that can give you heightmaps, the first which comess to my mind is bitmap2material on the assetstore its quite good but not always reliable, still good to have as it makes normalmaps and heighmaps out of diffusemaps and also cancels lighting information in the diffuse and also puts the specularity into the alpha channel... all the textures on the demo(the screens you can see on the first and 2nd page) are made this way. It can be tricky to setup at first but once you get the hang of it its very convinient and gives good results. Another tool would be crazybump... just google for it. Both tools cost a little bit but i am sure there are free alternatives to find. Maybe someone else can point it out... Oh and alsoe there is a free version of bitmap2material... its not as powerfull of course but you can give it a try... i think it can produce heightmaps.
     
    Last edited: Nov 15, 2013