Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. ironbelly

    ironbelly

    Joined:
    Dec 26, 2011
    Posts:
    597
    We'll be stress testing this on Ipad Airs this week and will let you know how the performance is
     
    tomaszek, OnePxl and hopeful like this.
  2. Uto

    Uto

    Joined:
    Nov 10, 2014
    Posts:
    17
    Hello. I purchased this but I cannot get any results. First of all, should demo scenes work right out of box and look amazing without any tweaking? Because I cannot really see the difference with pm and pom settings on. I also followed the first tutorial but no results. I have tried this with Unity 4.6.1 and 5 beta. Any help?
     
  3. konsnos

    konsnos

    Joined:
    Feb 13, 2012
    Posts:
    121
    Hey tomaszek,

    I've come across your asset. Seems awesome. I have some questions about it.

    I'm using World Machine to create the terrain, and I use 12 textures for my terrains, resulting in 3 splatmaps. Will everything work fine with that? Can I still use dynamic snow and water?

    I'm combining many terrains to create my world, and right now I'm experimenting with a 5x5 terrain. I'm manually hiding terrains that aren't visible. Can RTP handle that?

    Thanks for your time.
     
  4. Tandinos

    Tandinos

    Joined:
    Jan 10, 2015
    Posts:
    6
    Not sure whats going on with it I created a terrain added textures painted them on I imported the RTP 3.2, had fog already enabled so it showed up alot not to bad just needed to zoom in alot added textures with normal maps height maps over the 3 I already had in game , when i tried to create a new one it was a struggle said things not same size even tho they were, 1024 x 1024 respectively got one to add properly soon as I paint with it its just black, also still get an odd shadow from my camera , really annoying me I can't figure this out./
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Tested on RTP3.2 in both U4.6 and U5 beta20 - works fine for me. Maybe you should update.

    I'm curious what can you get. Anyway. It will be probably necessary to think about something like "RTP lite" or "RTP basic" or "RTP mobile" as separate product. I'd say this is requested by many,

    Look at the first game object in the scene - it warns you about neccessity to compile shaders before you get any results. To get POM working you need to tweak MaxLOD option in either first or add pass settings. Then recompile shaders. I'd recommend to go thru documentation - you'll save a lot time doing this rather than trying to figure everything yourself.

    ATB, Tom
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yes, RTP can handle 12 layers (1-8 - in first pass using 8 layers mode, 9-12 in add pass). You can use water, snow there as long as you don't try to compile too many features at time (features that need their textures - its limited resource). You can hide terrain objects runtime - that's often necessary to get reasonable performance.

    From the email I wrote to an user which also requested using 12 layers (watch the order !):
    1. open your scene with regular Unity terrain - 12 layers (exactly 12, not 11 or 10)
    2. add rtp component to your terrain
    3. RTP/settings/main - Refresh All button
    4. go to LOD manager
    5. enable checkboxes: "U4 materials", first pass, add pass and your platform (if it's not selected).
    6. in first pass section - enable 8 layers mode
    7. in add pass section - uncheck "crosspass heightblend" (it can not be used with 12 layers anyway)
    8. recompile shaders in LOD manager
    9. go back to RTP on the terrain
    10. add all textures needed (normal maps, heightmaps) for all layers
    11. when using textures - remember all detail colormaps must be of the same size, all normalmaps must be of the same size, all heightmaps must be of the same size
    12. visit RTP/Settings/perlin tab
    13. RTP/Settings/main - Refresh All button

    Tom
     
    konsnos likes this.
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Unselect RTP. In project - go and check all your textures of certain type:
    1. detail colors need to be of the same size (reset sizes, reimport when needed)
    2. detail normals need to be of the same size
    3. detail heightmaps need to be of the same size

    Got back to RTP and in layers - go thru every layer and click refresh under texture slot. This should rebuild combined normals, heightmaps and optionally color atlases.

    For you "camera shadow" issue. W/o information about how you've got your scene stup. Or without at least a screenshot I can't help.

    ATB, Tom
     
  8. reptilebeats

    reptilebeats

    Joined:
    Apr 28, 2012
    Posts:
    272
    ahh im still on v19, takes a few hours for me to download each build and sometimes i get a few minor issues here and there so i tend to wait a few builds.
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    As far as I remember I also worked on beta19 (imported w/o errors from shader compiler). And Unity hasn't modified interpolator usage between 19 & 20 - so reason is different here.

    Tom
     
  10. reptilebeats

    reptilebeats

    Joined:
    Apr 28, 2012
    Posts:
    272
    very strange. i opened a new project and it works fine so i exported the shader and replaced it for the one in my project and all seems to be working now. something must of buggered it up in my project.
     
  11. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
  12. _MGB_

    _MGB_

    Joined:
    Apr 24, 2010
    Posts:
    74
    Hey Tomas,

    How easy would it be to change the shaders to use object space instead of world space?

    My problem is this: I'm writing a flight sim and have a floating world origin. When the origin changes, all objects get shifted in world space, and the terrain textures appear to jump as a result.

    Can you think of a workaround with your knowledge of the system? Suppose I could try and fit the tiling to a multiple of the world shift but that would compromise things artistically...

    Cheers,
    M
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    As far as I know tessellation doesn't work on WebGL (at last not as an output from Unity). Tessellation is only DX11 HLSL feature while WebGL relies on openGL (if I'm right - not sure).

    You would nee some kind of global shader variable (managed via Shader.SetVector()) and then use this variable to modify IN.worldPos that's used in my shaders (find all IN.worldPos occurences in RTP_Base.cginc and RTP_AddBase.cginc in case you're using add pass). Then you could add your shifting offset.

    ATB, Tom
     
    _MGB_ likes this.
  14. Axiomatic

    Axiomatic

    Joined:
    Feb 7, 2014
    Posts:
    30
    Hi Tom, I noticed that in Unity 5 with RTP 2.2 that many 90 degree terrain faces have "marching" (constantly moving in one direction) triangles in their shadows near the edges of those 90 degree terrain details.

    The only way that I have found to reduce the effect is to turn down RTP sliders that affect/rely upon the normal maps. So it seems normal map related.

    My question is, have you seen this before?

    Adjusting lighting details elsewhere in the project only seems to increase or decrease the number of triangles in the moving shadows and not remove them all together.
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Screenshot please. Seeing is understanding :).
     
  16. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Hi. when I import 3.2 TerrainScene into 5.0 r20 and Upgrade to Enlighten so I can fiddle with the settings I get:
    BrightLight.JPG

    When using the following:

    lightmap.JPG

    And then rebuilding shaders, Update all, it took a while to update my scene objects
    but eventually it came in okay.

    thanks :) I will play with the Do Not Overbright setting and see if I can get general understanding of where to have everything set.
     
    Last edited: Jan 22, 2015
  17. weidenba

    weidenba

    Joined:
    Mar 12, 2014
    Posts:
    7
    Hello!

    We're using RTPv3.2 here for a project at work, and I'm trying to use Geometry Blending to tie roads or other objects into the terrain. The shader works great, the problem is that the workflow is very labor intensive to go through vertex by vertex for a map as large as the one we're working with, and for some reason the tools for auto-blending aren't functioning. I've tested it in the example project, and it works fine.

    Also, the flatten near terrain is not working. We can set the tolerance to 1, and there's still no result. In fact, the only thing that seems to conform to the terrain in any way is to "Stick" the whole mesh to the terrain.

    Because it's working in the example, I have to assume it's something I'm doing wrong with the mesh I'm bringing in. Is there a special series of steps I need to take to enable the auto-blending? Here's my current workflow:

    1. Place the mesh in the scene.
    2. Assign a Relief Pack->Blending Shader to it.
    3. Add a Mesh Collider.
    4. Add the Relief Terrain->Geometry Blend component.
    5. Rebuild the Mesh
    6. Tessalate at terrain intersection (optional, but it doesn't work either way)
    7. Remove Tris Below Ground Level (optional, but it doesn't work either way)

    As a side note, I had to set up virtually everything manually on each mesh--when I try to just attach the Geometry Blending component it gives me an error about not being able to find Resources/default-resources-extra (I'm just using a default shader for testing with). Even with a custom shader though, it doesn't assign the blending shader, and I have to manually assign a Mesh Collider as well. Not a big deal, but it wasn't described that way in the documentation, so again--not sure if I'm following the wrong workflow or not.
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'll take a look on fresh RTP3.2b (new update is on the way) in Unity5beta 20 and example scene, too.

    I'm just in the middle tp RTP3.2b testing where I fixed some issues of geom blend and added functionality to get it working with tessellation. Do you get any warnings/erros on console when a function doesn't work ? Do you use Unity terrains or RTP on mesh ? I'm wondering if terrain object placement might have something to do with your issue. Geom blend relies on colliders to get intersection points (for tessellation near the ground). Maybe RTP can't find any raycasting collission. Hard to tell. For adding colliders - I guess it's possible to add mesh collider component for multiselected objects. Also - RTP is designed to do operations like "tessellate near the ground" accross multiple selected objects (will test it again before RTP3.2b is out).

    You could also drop me a line on PM here on the forum so we can contact directly and resolve your issues via skype screenshare.

    ATB, Tom
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Have you noticed this ? :)

    RTP3.2 - again on promotional price. For limited time its $45 instead of previous $90.
    Go & grab your copy !


    This is my little piece of support for indie developers out there.

    Enjoy , Tom
     
    f4lke, hippocoder, llJIMBOBll and 2 others like this.
  20. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I saw the video of Erosion Brush. It seems to be kind of "pocket" World Machine right in Unity :). You could ask Denis Pahunov if his package relies on any special terrain shader. If what it generates is just a standard Unity terrain you could give it a try if you find it interesting. Then RTP can do the rest over the erosion brush output.

    ATB, Tom
     
  22. KhorelisSylvari

    KhorelisSylvari

    Joined:
    Jan 24, 2015
    Posts:
    2
    Hey Tomaszek,

    I have a quick question. I am using RTP and have been for awhile. Recently I created a new project, loaded RTP into it, sculpted a terrain then imported the heightmap to world machine, imported the raw file from World Machine into a Unity terrain, added the textures to the terrain, then added the RTP component onto the terrain. I even recently watched your video entitled "RTP 3.1 - First Steps working with the system" to make sure I wasn't forgetting anything and I did it exactly the same way you did. However, once everything is added and I try to mess around with the sliders in the Layer Properties, for instance the Perlin Normal slider, it doesn't work. None of the sliders in the Layer Adjustment or the PBL/IBL properties of the Layer properties tab work at all for some reason. I cannot modify any settings of the layers whatsoever. Also the only slider settings that work in the Settings tab is some of the "Main" tab. Overall 90% of the sliders for custom settings don't work at all. Can you tell me what is causing this please? It's rather annoying lol... Thanks!
     
    Last edited: Jan 24, 2015
    Tandinos likes this.
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi, if you followed every step from first steps video and RTP doesn't react means shaders are not used and probably use some fallback. Are you sure you've got RTP shaders recompiled for right platform ? Can you check this on my example scene (recompiling for 2 passes) ? It might be also interfering other terrain shader in your project. Check on fresh project (with RTP installed only). Or recompile shaders with "U4 materials" option set.

    Tom
     
  24. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Just bought - seems fun. Some auto conversion issues and depreciation warnings. Some example scenes have missing prefabs (red in hierarchy) but very nice visuals here. Good job. Hope you'll focus on Unity 5 :)
     
    twobob likes this.
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Warnings and missing prefabs - harmless :). I'm just finishing RTP3.2b update. Better geom blend handling (works with tessellated terrains now and I better handle batching & multiple geom blend objects manipulations at once, seems to be quite convinient to work with now).

    Sorry - U3.5 no longer will be supported. It was too messy to hold this backward compatibility (version with U3.5.7 working functions might be, however, individually requested). I'm trying to figure out what's the lowest version everything works fine (shaders using tessellation on U4.3 seems to not compile right). Maybe I can get it working on some early 4.5. I'll describe changes in my docs when it's out.

    For U5 - I'm importing this into beta21 right now checking if everything that is supposed to work still works :).

    ATB, Tom
     
  26. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Brilliant news Tom!

    I'll be using this on PS4 which afaik supports compute/tess but I'd have to check. Will let you know if this runs without destroying the earth and so forth.

    Do you have any ideas what we could do about grass performance on terrains, and if you plan to make available the ocean shader in that amazing demo? I was particularly happy about how it interacted with the shore.

    I was wondering about something - would using a larger pixel error but running tessellation actually result in a faster terrain overall?
     
  27. f4lke

    f4lke

    Joined:
    Dec 29, 2013
    Posts:
    35
    Thank you for that, your timing is perfect. Bought instantly.
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Sure, let me know how does it behave on PS4. I don't have console access nor license. U5 - I saw it's been rewritten as C++ native plugin so we can expect better overall performance. I haven't played much with things other than terrain surface though. There is a checkbox available (new) to to cache detail patches.

    Ocean shader - basically it was Water4 I started from then tweaked this step by step togther with postFXes to make it working like that. Water interacting with shore - it's RTP feature - water on the terrain surface running down the hills 9automatically), only we need to synchronise water level on terrain with tides - that's it has been done in the demo via custom script (testing water level on the shore and syncing this with RTP terrain surface water).

    For performance - high pixel error = lower CPU stress/less drawcalls, but all depends on hardware. Iv'got quite a fast CPU (high-end i7) and use its built in Intel HD4000 which is DX11 capable, but tessellator isn't much impressive. Theoretically we can gain some using higher end GPUs + tessellation can save us popping issue.

    Tom
     
  29. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Yeah, using tessellation and increasing pixel error will just move the calculations from CPU to GPU, so depends on the specs i guess. Would be interesting with a benchmark though : D
     
  30. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    And what about your grass shader? Is there a new version coming that would be ideal for this scenario - ie we are looking for a replacement to the unity terrain grass which has shockingly bad performance.
     
  31. KhorelisSylvari

    KhorelisSylvari

    Joined:
    Jan 24, 2015
    Posts:
    2
    tomaszek,

    Thanks you for the reply. You're probably right because now that I remember, when I clicked the "Recompile shaders for given feature set" button I don't recall it actually showing any progress of compiling. Meaning, it didn't actually compile I'm assuming. Any reason why it wouldn't compile when I click the button? It's acting very odd for me :(
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Install the package in default location (I warn about it in my docs and in my video...). In RTP3.2b package there will be precompiled configuration ready out of the box (so opening example scene will give you results at once), but you still need to remember about package location or it won't get recompiled (LOD manager looks for shader files to tweak in certain location).

    Tom
     
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Eh, I don't know if I can manage VolumeGrass2 in next few weeks or even months, will depend on my schedule here. (VG1.5 you can use on terrains but it's not that easy to get it as just "painting" the grass over the terrain).

    ATB, Tom
     
  34. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No problem, thanks - we would prefer you keep your magic for terrains anyway :)
     
  35. Dreamaster

    Dreamaster

    Joined:
    Aug 4, 2014
    Posts:
    148
    I think maybe this is a newbie question, but when I get RTP to really "kick in" it only renders terrain up close, even in (and especially the editor mode... so I can't see the entire terrain at once because I have to zoom in and the terrain "fade" isn't really fading it's a very harsh triangle popping in and out.
    Using Unity 5b20...
    Screenshot 2015-01-24 18.45.59.png
     
  36. Dreamaster

    Dreamaster

    Joined:
    Aug 4, 2014
    Posts:
    148
    For some reason maxing out the perlin fade length and "distance start" fixed the issue? In the meantime I am finally figuring this stuff out and using RTP with TerrainComposer to great success!
    Screenshot 2015-01-24 21.17.33.png
     
  37. weasel47

    weasel47

    Joined:
    Mar 9, 2014
    Posts:
    26
    Is there any way to automate the creation and configuration of height-normal maps for tessellation of multiple terrains? If I use Terrain Composer to create a bunch of terrains, I have to create and set each height-normal map individually. If I modify the terrain later, I have to do it again. Maybe I should ask Nathaniel to add this feature to Terrain Composer...
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hard to say. I'll be testing this on U5beta21 tomorrow (Monaday). It seems like some oddity of Unity terrain here though. _Maybe_ it could be caused by tessellating features or globl colormap which can drive terrain holes, but your screenshot looks quite odd. Anyway - good _something_ fixed the issue...

    Actually I talked over the issue with Nat. He has 3.2 and currently is working 9as far as I know) on automated solution for next TC update, too. Meantime I'm finishing RTP3.2b and I'll give it to him tomorrow, so we can make sure our both products go well together.

    ATB, Tom
     
  39. Axiomatic

    Axiomatic

    Joined:
    Feb 7, 2014
    Posts:
    30
    Turns out it's not RTP related! A brand new scene in unity 5, with the directional rotated to various degrees causes it :(
     
  40. Unlimited_Energy

    Unlimited_Energy

    Joined:
    Jul 10, 2014
    Posts:
    469
    I bought RTP 3.2 :) can't wait to use it
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yep, this is so called "shadow acme". You could try to remove it adjusting shadow bias offset. But your shadow is placed on "back" side ot geometry on your screenshot. This is meant to be not aaplied there, because Unity introduced light angle dependedt shadow filtering as I remember (reading Unity5 beta release notes on recent subversions)

    ATB, Tom
     
    twobob likes this.
  42. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    A word of warning on U5 beta21. RTP (and possibly other custom solutions for terrain shading) breaks here. I'm trying to figure out what changed.

    (U5beta20 it worked fine)

    Tom

    P.S. bringing RTP compatibility on every next U5 beta is kind of masochistic activity...
     
    Last edited: Jan 26, 2015
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    OK, found the issue (the problem for every custom shader/material used on terains currently U5beta21). Already filled bug report so I hope they'll fix it soon. Workaround for current users - reloading the scene... This fixes the problem, but is also insane to work with, so there is quick workaround I'll put in RTP3.2b update:

    1. open ReliefTerrain.cs
    2. fhind this code:

    Code (csharp):
    1.  
    2.             if (terrainComp.materialTemplate==null) {
    3.  
    4.                Material ter_mat;
    5.                Shader ter_shad=Shader.Find("Relief Pack/ReliefTerrain-FirstPass");
    6.                if (ter_shad) {
    7.                  ter_mat=new Material(ter_shad);
    8.                  ter_mat.name=gameObject.name+" material";
    9.                  terrainComp.materialTemplate=ter_mat;
    10.                }
    11.              }
    12.  
    3. replace with this code:

    Code (csharp):
    1.  
    2.             if (terrainComp.materialTemplate==null) {
    3.  
    4.                Material ter_mat;
    5.                Shader ter_shad=Shader.Find("Relief Pack/ReliefTerrain-FirstPass");
    6.                if (ter_shad) {
    7.                  ter_mat=new Material(ter_shad);
    8.                  ter_mat.name=gameObject.name+" material";
    9.                  terrainComp.materialTemplate=ter_mat;
    10.                }
    11.              } else {
    12.                Material ter_mat=terrainComp.materialTemplate;
    13.                terrainComp.materialTemplate=null;
    14.                terrainComp.materialTemplate=ter_mat;
    15.              }
    16.  
    ATB, Tom

    EDIT: code above needed to be fixed. Now is fine
     
    Last edited: Jan 26, 2015
    Dreamaster likes this.
  46. weasel47

    weasel47

    Joined:
    Mar 9, 2014
    Posts:
    26
    I loaded existing scenes and it appears the terrains are not using the Relief Pack shaders. Is there an extra step I need to perform? It looks like the code that was replaced is not being called...
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Follow my 1st steps video. For example scene you need to recompile shaders using proper mode (adding first pass, add pass for terrain). For incoming 3.2b I'll make it precompiled out of the box

    Tom
     
  48. weasel47

    weasel47

    Joined:
    Mar 9, 2014
    Posts:
    26
    Thanks for all of your help and hard work! I was able to get it working. This is what I was missing: I had to open up the built-in terrain settings and select "Custom" as the shader for each terrain. Then RTP put its own material in there.
     
    Dreamaster and hopeful like this.
  49. reptilebeats

    reptilebeats

    Joined:
    Apr 28, 2012
    Posts:
    272
    dam unity trying to make their terrain better lol
     
    Dreamaster likes this.
  50. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Hi there,

    Has anyone tested this with a mobile? If yes, how was the performance?
    Or doesn't work because of the GPU requirement SM3.0.

    thanks