Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. KuRouZu

    KuRouZu

    Joined:
    Aug 8, 2013
    Posts:
    27
    Thanks for your reply. I started a new project and after create the terrain with TC, I set the material to custom on terrain component like in your screenshot. Then I applied the RTP component and practically the same:
     

    Attached Files:

  2. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    What you have now is normal that's how it should look out of the box. Start playing with some of the layer settings, those can make the biggest difference. Like UV blending/value, far blend replace, and perlin. RTP doesn't just make your terrains look good out of the box, in many cases they look worse at the start as you can see. You need to just start playing with the various settings and see what they do. In most cases that's better then reading the docs if you are a complete noob to shading (like I was), as the docs assume a lot of knowledge if you are starting at ground zero.
     
    KuRouZu likes this.
  3. KuRouZu

    KuRouZu

    Joined:
    Aug 8, 2013
    Posts:
    27
    I really appreciate your help and I'm happy that now RTP is working. So it's time to play with settings and learn :). Thanks again. Regards.
     
  4. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Np glad I could help.

    Couple of other tips. Generate a global color map under Settings/global maps in the ReliefTerrain component. You can then adjust it per layer. That can make a huge difference and really blend in the colors well for you, although at first it will look really dark until you dial some of it back per layer.

    Most layers need the spec/gloss multiplier dialed back. Shiny white spots on the terrain are an indicator.
     
    KuRouZu likes this.
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Because in 8 layers mode I use basemap shader replacement to render RTP contents. It's limitation of Unity's terrain engine.

    Tom
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If you're in deferred - check if you've got script attached to your main directional light - the same script as on my example scene - compare it.

    Tom
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    1. I made it for real terrain. Then exported terrain mesh to obj, decimated in blender to have <64k polys and used as input for RTP on mesh.

    2. I can check it - give me your unity version and RTP version you're on. You mean - geom blend functionality doesn't work on example scene Terrain2Geometry Scene ?

    Tom
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Check Unity terrain settings - material. Should be set to custom. Set null there. Refresh All in RTP. Material should get setup there correctly.
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Look at my replay for @snacktime above.

    Tom
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's Unity's behavior I'm affraid. Try to deal with light settings - shadow bias, normal.

    Tom
     
    VicToMeyeZR likes this.
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    U5.1.1f1 it works for me. Maybe this particular Unity version has something to do. However RTP3.2g - you need to set material type of terrain to custom in Unity terrain settings. Just found a bug. Will post fix in RTP3.2h

    Also I'm looking into geom blend issues. Will report on this as soon as I get into any conclusions.

    Tom
     
  12. RodzGames

    RodzGames

    Joined:
    Dec 9, 2014
    Posts:
    24
    I have Unity 5.1.0f3 and RTP3.2g

    I can add tri if it's a real terrain but not if it's a mesh (like in Terrain2GeometryScene).
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I've noticed that Unity (5) have issues with mesh collider of this terrain. Tried to find what's wrong but couldn't figure out. I'm making downward raycasts (collider.raycast or physics.raycastall), but it doesn't give proper results. You try yourself do it via script against the mesh. Looks like bug in Unity or I'm overlooking some new behavior specific to Unity5.

    Tom
     
  14. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    Hey ! Any news for ios and android export for Relief terrain ? I'm trying to export my scene but i have the error of the DXT5 format compression. I saw someone had the same problem on this thread. I aslo saw someone was develpping his project on ios and that it's actually working. So i think (hope) there is a solution to this problem.

    Thanks !
     
  15. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    Ok so i just made some builds, one on ios : does not work : texture is all blurry (i managed to release a build by deleting script on my terrain and lodmanager)
    Same with android : tried with lodmanager and script : black terrain. And without, all blurry like on ios. But i made the test with an emulator (don't have android phone), maybe that's the reason it did not worked.
    I think there is just a problem with texture compression or something like that. Hope you'll find a solution it would be really nice to bring that into mobiles, it's amazing work !
     
    Last edited: Jun 28, 2015
  16. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi Tom,

    Thanks for RTP, it is an amazing asset.

    I dont understand why RTP isn't working in my current project and I really need help.
    I have done all the steps like in the video "first steps" but it dosen't work.

    I have created a terrain, add 4 texture, add the RTP component, set the LODmanager, etc.
    But no height blend, no perlin normal, not any of the RTP features is working.

    I have successfully set RTP in an other project. This time I have absolutely no idea why it dosen't work.

    Please have a look on the project linked below, it's just a piece of terrain with RTP and 4 detail textures on it. It will probably take you 30 seconds to identify the issue but it is far beyond my understanding.

    https://dl.dropboxusercontent.com/u/47350283/HouseDemo_20150622.zip

    I am using Unity 5.1.1.
     
  17. tcn5150

    tcn5150

    Joined:
    Dec 1, 2012
    Posts:
    26
    Hey Tom,

    Is RTP's intended behavior to only use detail normal maps within the "near distance start" specified in the main settings? I need to use relatively large detail maps whose normal maps I'd like to be seen much farther than the default maximum of 50m. Is there any way to change that maximum distance at which they will be seen?
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's not problem with textures solely. It's the fact RTP requires full SM3.0 model which assumes that hardware provides enough amount of resources. GLES2 isn't the case (half of resources available only). I plan to make separate version with core functionalities separately for mobile, but currently I was focused on another package (UBER - Standard Shader Ultra). So - something named "RTP Lite", "RTP Mobile" or "RTP Core" (can't tell which name would fit best) will appear at som point in predictible future. Hopefully this year.

    Tom
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Open ReliefTerrainEditor.cs and find the place it's defined - easily by Ctrl+F search for slider label. There you can put desired distance. It's constrained only for sake of performance. Theoretically we can have normals from detail, POM and everything else as ar as you can see.
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Look at Unity terrain settings - material need to set as "Custom" in drop down. It;s glitch in RTP3.2g. I'll update it as soon as I test it more on 5.1.1. This should be the problem in your case.

    Tom
     
  21. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    You right it was that.
    Thank you so much.
     
  22. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    First off, I want to say that after using RTP for two years, I can say that what it brings to Unity is truly an amazing system that vastly improves Unity's sub-par terrain.

    Secondly, I also believe that Tomas has done an incredibly job in creating quality product and I don't think anyone here will argue that RTP has probably the best support of any Unity asset.

    With that said, it looks like we're going to have to drop it my friend.

    Even though I'm fully aware that there isn't a viable alternative out right now, other than going back to Unity's built-in archaic terrain methods, it simply isn't working out for us.

    First and foremost, the issue I brought to your attention a few months ago about mysterious "scene bloat". As a recap, we're talking about how having RTP in the scene at any capacity, exponentially increases the footprint of that scene from 1 to 100mb in size. This is further compounded when using SECTR Stream, wherein your one scene is broken up and saved individually to dozens of smaller scenes. This however, using RTP, results in dozens of individual scenes each bloated with the same error.

    I've exhausted all possible means of fixing this on my own, but it's just not happening, and we need to push this game out next month no matter what. The only remedy is that, if you scrape RTP out of your scene, put it back in, remove it again, and juggle this nonsense seven or eight times, you can occasionally get it to "fix" the scene. However again, this is just a temporary fix, because merely re-opening that scene and re-saving it will again "bloat" it to the point of absurdity.

    I do also appreciate the time spent emailing me back about the issue when we were trying to figure out how to solve it and i regret it never happened. It's for this reason I wanted to make sure that it was known that I still consider RTP to be a quality asset, even if, because of unknown reasons, it simply will not work for our game project.

    I also wanted to post this message here simply on the off chance that, in the future, someone else will experience the same issue and notice it on your forum, at which point perhaps we can revisit the issue.

    Thanks again for you help thus far and please let me know if, in the future, a permanent fix becomes available.

    -Ethan Casner
    Divergence-Online.com
     
  23. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Ethan, I've run into that same issue but haven't yet dug into it very deep. .unity files are just yaml, so it should actually be pretty obvious what's blowing it up by looking it over. Bugs the hell out of me every time it does that and then github blows up and I have to go through a tedious process to rewrite the history.
     
  24. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Also, not sure if it's an option at this point, but the multiple scene approach is pretty sub optimal and a lot more complicated then it needs to be. I've done huge worlds with RTP (100+ 1000x1000 terrains per scene), and it's much easier to just enable/disable terrains in range, and use a spatial grid to manage trees/other meshes. You can effectively run worlds of unlimited size like this if you add in dynamic loading/unload of the actual terrains.

    This thread has the spatial grid, and the subject might be of interest to you anyways if you are running large worlds.

    http://forum.unity3d.com/threads/terrain-culling-and-colliders-is-hosed.310594/
     
  25. tcn5150

    tcn5150

    Joined:
    Dec 1, 2012
    Posts:
    26
    Thanks Tom, that did the trick!

    Is there a similar way to also change what values RTP's tessellation considers "near" and "far?" I've looked through the code (including shaders) and can't seem to find where it's happening.
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's in perlin normals tab.

    Tom
     
  27. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Thanks for saying you'll take some time to look around and see why the geom blend isnt working right. You asked me a few pages ago if it was just on standard, but its like that with every single geom blend shader I've tried. Can't wait to see you fix it :)
     
  28. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Hi again, why phong smoothening is disable in below pic?

     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I can't reproduce it on U5.1.1 with RTP3.2g. No matter the geometry is on terrain. From model or from primitive I'm able to paint the blending and it works. For Standard and for other shaders. Maybe try to update and check it on fresh project with RTP3.2g installed (you need to keep track of terrain material used and possibly set it to "Custom" because RTP doesn't do it automatically for newest Unity)

    Tom
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's supposed to be active only when you haven't selected heightmap displacement in LOD manager. Then - no hegith&normals map is used, but the terrain itself can be still tessellated and smoothed.

    Tom
     
    ksam2 likes this.
  31. amasinton

    amasinton

    Joined:
    Aug 12, 2006
    Posts:
    138
    Any idea what's causing this:



    That's a fairly large terrain (you're looking out over three 2048 tiles).

    I'm using 4 layers with a different colormap for each tile. Forward rendering and linear colorspace. 1 directional light. Realtime GI baking. OpenGL (Mac).

    You can see the colormap shows up fine in the distance but the splatmap layers are black - except for a bit of lighting from their normal maps showing through (you can see this in the foreground).

    Any suggestions or nudges would be most appreciated.

    Thanks!

    -- Anthony
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Try to check if normalmaps used by shader got prepared right. They are composed in pairs - so 4 layers will need 2 combined normalmaps - look at combined textures tab - normalmaps - they should be 2 and have RG+BA for two consequent layers each. That's what comes to mind looking first at your screenshot. If this will resist working any longer - drop me a PM message on the forum with order number and your skype id - we can try to solve it together via screenshare.

    Tom
     
  33. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Tom already told me what's going on with it; The scene files are storing a whole bunch of old RTP texture info that they refuse to expel when you save it. The only way to cleanse them is to completely remove RTP from the scene from what I've seen.
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862

    I'll give it another try soon. Maybe I can achieve at least the goal when scene doesn't get impacted as soon as you saved textures and there are no other used by RTP component anymore. But at this stage it's hard to promise anything because it might be out of my scope (like "things just happen in Unity - don't try to manage them because they are too far from scripts you made and too close to the core engine").

    Tom
     
  35. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Can we use unity Standard shader instead of Custom shader?
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Using Unity's built in shader for terrain means - why do we need RTP at all ? Or I'm missing something here...
     
    ksam2 likes this.
  37. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    Hello, bit of a blending issue. Any ideas on how to fix this? I'm using 8 layer mode but all these textures are in the first 4.

     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In deferred use 8 layers mode. But it looks like refreshing issue - unselect/select again terrain and it should get fixed.

    Tom
     
  39. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    I refreshed the terrain. no change. I switched to deferred. no change there either. :S

    edit: it's 2 or 3 layers that won't blend properly. In this case, its that grass. It won't blend with anything. I must be missing a setting somewhere for it. Not sure what it is though.
     
    Last edited: Jun 30, 2015
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Go to RTP/combined textures/heightmap tab and check if your combined detail heightmap textures are correct. Thay are taken from alpha channel of detail height texture. So - make sure all detail height textures has alpha channel (if this is DXT1 - you have no data there only white). Multiple detauil textures that all have white heightmap don't blend correctly.

    Tom
     
  41. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    I think they look ok. What is your expert opinion?



     
  42. ArsKvsh

    ArsKvsh

    Joined:
    Dec 13, 2014
    Posts:
    17

    Something strange started to happen after updating to 3.2g. I have pressed Refresh All for a few times, tried change some parameters and recompile the shader, restarted Unity, but nothing changed. What could it be? Thanks for reply.
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Textures looks fine. Can you check if lighting path makes any difference ? Forward vs. deferred ?. What's your RTP, Unity version and setup used for me that I could try to reproduce the issue ?

    Tom
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Check Unity terrain settings - material type should be set to custom. Set it manually if it's not.

    Tom
     
  45. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    I've tried both lighting paths already. I'm using the latest RTP (updated about 3 days ago, I believe.). Unity version is 5.1.1p2. RTP is set to 8 layers for 1 pass. I'm not in front of my Dev machine right now so I can't give you specifics on my RTP setup but I've turned on and off all kinds of stuff trying to fix this issue in the shader, so I'm not so sure it's a setting thing in there. I'm using TC. I'm also using a separate image per texture and applying them via a single color. The colors do overlap each other on the terrain, none end abruptly and none have straight lines. I have linear color space applied. I've tried with the PBL stuff on and off. I think that's it. Let me know if you need more specifics and I'll be happy to get that to you when I'm at my machine.

    edit: Oh and I have 5x2 terrains.
     
  46. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    I think I figured it out. Global color blend multiplicative turned on in top screenshot. Turned of in bottom screenshot. I must have misunderstood this feature, I thought it was for global color maps.





     
  47. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136

    ACK, the problem came back. So, I removed everything to do with RTP. Exited Unity, started back, updated with the latest version (I was a couple versions behind). Updated all my textures with what I hope will be production. Setup everything, kept RTP features to a minimum...basically 8 layer, with all other features disabled. Refreshed everything and I still get incorrect blending. :S Kinda sucks since it worked one time....AND I really like the look too.
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    When you turned of multiplicative global colormnap blending you put it into lerp mode - so you basically saw only global colormap upfront (perturbed by perlin). But this doesn't solve the issue. Drop me you skype id in PM message. We need to inspect it on screenshare session I think.

    Tom
     
  49. amasinton

    amasinton

    Joined:
    Aug 12, 2006
    Posts:
    138
    Thanks very much for this - and for the quick response. You develop amazing things AND do all this support. Do you even sleep?

    The answer was with my normal maps for the layers. I used some of the textures/normal maps that you provided and everything's fine. So, my fault - but your nudge toward looking into the normal maps was what got me there.

    Thanks again.

    -- Anthony
     
  50. Trentish

    Trentish

    Joined:
    Sep 9, 2012
    Posts:
    4
    Finally figured out why RTP wasn't working at all for us. At some point in the past, Unity changed the Material field on Terrain to be a drop down. I don't think RTP is taking that into account when it assigns the "Terrain material" to this field. If you had an existing terrain before the change, RTP probably works fine. When creating a new terrain, however, you have to do an extra step. Here's the steps we took to get it working:
    1. Create a Terrain and assign some textures (like you would normally do).
    2. Go to the Terrain options and change the Material dropdown from "Built In Standard" to "Custom".
    3. THEN add the Relief Terrain component.
    4. Proceed normally.
    You have to manually change the Material dropdown on the Terrain component to "Custom" first before adding the RTP component.

    Everything works great now!