Search Unity

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,862
    So - even with one pass present only you still see this ? The more I look at your screenshot the more I think that this is not zfight but simply badly resolvesd terrain selfshadowing done by unity. Disable realtime shadows and you'll see. Maybe you need to encreasse bias to reduce acme.

    @Kivak, Have you tried with materials tuned off ? I see you're using Terrain Composer and this might be related to basemapdistance overwritten by some external script. Check your terrain settings (Unity terrain settings) and check basemapdistance. Have you tried using RTP?Settings/Main/Refresh All button ?

    Tom
     
  2. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    140
    @tomaszek Because TerrainComposer might have been a problem, I created a new project with nothing but RTF. I did everything exactly the same and the same thing happened - the textures rendered fine when I hit "compile shaders" but as soon as I click back on the terrain, it goes fuzzy again. I uploaded a video of this occurring from a band new project with only RTF imported. The last few seconds are most important.



    One other important thing to note... once I click on the terrain and it goes fuzzy, it seems to affect every scene. If I create a new scene, the terrain texture it all fuzzy and I can't see it. So I wonder if there is a global setting that's problematic.

    Note: I made a silly mistake selecting the height map instead of the normal map, so there's a few seconds of fixing that. Oops.
     
  3. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    140
    I found something that might lead to the cause... When I click on the Terrain, Unity Terrain Settings, delete the material "Terrain material" (which doesn't seem to even exist...) and then change "Base Map Dist." to 2000, textures look great. But when I deselect the terrain or select something else, it goes back and resets itself with the material and Base Map Dist. Why?
     
  4. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    251
    Hi Tom!
    Perlin normal map:
    Is it possible to have a layered perlin normal splat map? (having a rocky normal map for certain areas and a dune kind of map for other areas) or even define a different perlin normal map per layer.

    Detail mesh objects:
    I wonder if you have a solution or ideas about the detail objects paint feature in Unity terrain. They rather look dull comparing to the realistic terrain with RTP. They don't cast shadow nor are they blended nicely in the terrain. Is there a way to use the paint details functions with your blend mesh shaders? I tried to paint mesh objects with the blending RTP shader through code, but it looks like I need to select al objects hand by hand to blend them at the terrain. They are even hidden in the first place.

    Beside, a bit off topic, but do you have some kind of roadmap of possible next releases, features etc? I have become a huge fan of the RTP asset and looking forward for improvements and new features.

    Regards! Tom
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP uses small basemap distance when renders with amterials. Simlier shader is then used above close distance (ca 20-50 m). When not using materials terrain shaders are global entities and we can't make them different for different scenes. In the end you could try to catch me skype next week (contact me using forum's private message). I could help you interactively them . I believe there must be some small stupid reason you can't get it working. I tested RTP on many machines and for numbers of users that currently work with RTP I guess it just must work in the end.

    Tom
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You ask for quite new features... RTP can be improved forever... However I need to focus on different things in next few months. For details - maybe you could try using some mesh brushes available. Google for it - I'm sure there are many such solutions. Then you could combine them into one mesh (after distributing automaticaly or manually over terain). Such mesh can be then treated by geom blen features. This is just brief idea.

    Tom
     
  7. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    140
    @tomaszek

    Sounds good. Unfortunately, every project I have RTP in now has all fuzzy textures, so I'm going to be trying to hash this out all night/day until I get it fixed.

    One last test I did:
    1. I reinstalled Unity completely
    2. Created a completely blank project
    3. Created a terrain
    4. Added the "Default Particle" texture to the terrain (it's the only one in the project)
    5. Particle rendered great. No fuzzyness.
    6. I imported RTP
    7. Terrain texture still nice and crisp
    8. I switched the particle texture to grass
    9. Boom, everything fuzzy
    10. Changed the texture back to the Default Particle texture, it's now fuzzy as well.

    It must be something with the shader... Is there a certain way I need to install RTP? Or does it just work by importing it?

    -Mark
     
  8. redcap

    redcap

    Joined:
    Jul 5, 2012
    Posts:
    53
    Looking for an answer, I am trying to make it so that you can't see the textures at a distance (rather only see the colormap/normal map of the terrain, what it is currently doing is showing tiling far to much, and if I could fade out the texture the farther away I think I could fix this.
     
  9. jquery

    jquery

    Joined:
    Jul 12, 2014
    Posts:
    10
    Good day,

    I try to use RTP 3.1c , but when i do first steps by tutorial i got strange result.

    1) Create new project
    2) Import RTP 3.1c package
    2) Create new terrain
    3) Add 4 textures diffuse texture to standart terrain from ReliefPack assets
    ( Grass (Hill)_Diffuse_Spec, Stones_pebbles_diffuse_spec, Cliff (Grassy)_Diffuse_Spec, BeachSandDirt_diffuse_spec )
    4) Drawing hills by standart terrain tool and draw texture on it
    I got image with tiling textures ( testRTP31-before_Engine_TerrainOrMesh in attachment )


    5) Going to menu and select Component->Relief Terrain->Engine Terrain or Mesh
    after this i not see texture details at all, only colors ( testRTP31-after_Engine_TerrainOrMesh in attachment )

    I have tryed to turn on shaders, ( first pass, U4 material ), then change different settings but it not help, not react at all.


    Before step 5
    testRTP31-before_Engine_TerrainOrMesh.png


    After step5 ( Enabling RTP ) i loose texture details


    testRTP31-after_Engine_TerrainOrMesh.png


    Full test project in state after step5 i published by this link
    https://drive.google.com/file/d/0B9rzff8G8UsoLWxSeTV3WU9RRUk/edit?usp=sharing ( 350 Mb )
     
  10. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    140
    Same exactly thing is happening to me. I've been trying to figure this out for days... I did get it working slightly but it was by accident. I'm trying to reproduce.
     
  11. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    251
    Hi Tom!
    Sorry to spam you again, but i saw your rsp asset which seems to feature adjustments in silhouette. Then after some google I came across some promising feature for RTP...so question is;
    How to get this work? Or is it stil work in progress? (not featured in v 3.1)
    http://www.stobierski.pl/unity/RTP_2_tour/RTP_2_depth_buffer.jpg



    RT
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    This is one of the RTP features. Look for no detail at fr distance
    Yes, that's the feature present in RTP. Look for "no detail color at far ditance" in LOD manager. This will, however reduce details there. Maybe you can try to fix patterns on your terrain(the probably you concern) using perlin normals and UV blend ?

    @jquery,

    This problem seems to be related to Unity version. kivak found that it worked on Unity 4.3.3. On my side it works in Unity 4.5.0f6. You probably use newer version. I'll try to find the reason next week.

    That's possible when I skip Unity 3 users and make RTp U4 compatible only. I used similar technique in my newest release Volume Grass (available on sale - try it for %50 price !).. I'm not sure if this is really that important feature while it can also affect negatively performance for large terrains (writing into z buffer means no GPU optimization called early-z culling of fragment shader - pixels that are beyond the value currently written into z buffer are skipped).

    Tom
     
  13. jquery

    jquery

    Joined:
    Jul 12, 2014
    Posts:
    10

    i solve it by check option "d3d11 (PC - U4 DX11 mode)" and rebuld shaders.
    ( Win8 Pro )
     
  14. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Hello there Tom,

    I'm having some sort of weird issue, that i'm not sure if it's related to RTP, but here's what is happening:

    When i use wireframe or texture and wireframe, i can clearly see that the terrain has many meshes.
    I don't know if this is supposed to be like this or if it's a bug with Unity...
    The wireframe is also drawn on top of all objects when viewing the scene like that

    Here are some screenshots of this:
    t1.jpg t2.jpg t3.jpg

    Also if i create a new terrain in the same scene, that problem also happens.
     
    Last edited: Jul 13, 2014
  15. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    251
    It suppose to work that way. Terrain has buildin feature to display low or high resolution mesh depending on distance camera to mesh. So, this is not a bug, and it is unity feature. Nothing to worry about.
     
  16. jquery

    jquery

    Joined:
    Jul 12, 2014
    Posts:
    10
    Hm and what is type of texture in RTP asset, i.e. Grass(Hill)_diffuse_spec ? It's look like transparent in photoshop, but in Terrain it's look like true diffuse color ( grass - green, sand - yellow ) , where it take info about color and how to make this type of texture from standart diffuse texture ?
     
  17. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    I don't think you understood what's in the images. I'm not talking about the LOD mesh of the terrain. I'm saying there are several meshes on top of the terrain. Those meshes can also be seen on top of other geometry ( which should never ever occur, at least with non transparent objects ). In some areas, i can count 3-5 meshes on top of each other, and i'm afraid that these meshes are slowing down performance.

    Take another look at the screenshots.

    If i create a new terrain, that also happens, but it doesn't happen in separate project.
     
  18. stationx

    stationx

    Joined:
    Jul 9, 2012
    Posts:
    251
    ha, sorry, saw it on my iPhone, will take a better look on normal screen ;-) Anyhow...looks like some glitch?
    Post info about your computer, OS, unity version etc. Must say, that I also got some glitches at the beginning of adding RTP. So if this is related to RTP? Dunno. A restart of Unity mostly did work...also maybe reinstalling of Unity is worth a try?
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP doesn't deal with meshes when using terrains. It's only yhte case when using geom blend feature (painting additional triangles sticked on the top of terrain). Can't tell what can cause it in your project.

    Tom
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Textures used by RTP are RGBA, where alpha channel stores glossiness. For non glossy materials you'll see nothing in editors when they treat alpha channel as transparency. If working with alpha channel in imageYou can make your textures easi
     
  21. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    Thanks for the answer. Well i'm not using the Mesh Blend feature, so i guess it's a problem with Unity itself... There are way too many Unity problems with my project right now :(

    Anyway, if you want to check out RTP in action, check out the latest video update of my game :p

    After that update, i've improved a bit the quality ( saturation and brightness ) of the textures.
    Hope you enjoy it :) ( the quality of the video doesn't help much... Youtube really ruins the video quality )

    EDIT:
    After watching the video again :p I don't recommend you see the terrain in it because Youtube really ruins the quality...
    Here's a better screenshot of the terrain:
    Untitled.jpg
     
    Last edited: Jul 14, 2014
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    No matter the RTP, your video is pleasure to watch it anyway :). Good job !
     
  23. Uzopoza

    Uzopoza

    Joined:
    Feb 26, 2013
    Posts:
    39
    Hi, Tomas!
    Can I use RTP for several (2-3) terrains in one scene?
     
    Last edited: Jul 14, 2014
  24. Uzopoza

    Uzopoza

    Joined:
    Feb 26, 2013
    Posts:
    39
    It worked, when I recompiled shader with U4 checkbox ON, and generated New ColorMap for second terrain
     
  25. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    imported. did everything like was in instructions... all black... nice
     
  26. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    complitely killed my project. even if i delete terrain and lod manager, the new terrain is black
     
  27. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Yeah, i get the same issue with multiple terrains.
    Also, the manual says that if i want to use 8 textures i need to use the U4 material checkbox and then i can only use around 9 terrains? Does this mean its impossible to use many (16+) terrains at the same time with 8 textures?
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It is possible. Check 2 things. If you're in forward it's onugh to go to RTP/Settings/Main and use RefreshAll button. In deferred you might need to add ReliefShaders_applyLightForDeferred.cs script to your main directional light in the scene. Black confusion should be gone then. I need to update first steps tutorial to RTP3.1 (it's for RTP3.0 now).

    Tom
     
  29. jquery

    jquery

    Joined:
    Jul 12, 2014
    Posts:
    10
    anybody use Bitmap2Material to generate textures for RTP ?

    0) Now i use Bump Specular shader to generate and test texures by B2M, but it's not excatly result for RTP. What shader i need be used to see correct result for RTP ? Now i create Plane and set B2M material to generate textures and preview result.

    1) I cant see any changes when modify specular settings of B2M in editor and in runtime

    2) RTP use 3 texures - Diffuse(RGB)+Specular(in alpha channel), Normal and Height, but B2M generate only separate 4 textures - Specular, Diffuse, Normal, Height, how i must setup output textures to generate this 3 texture with Diffuse+Specular ?
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I remember that it can be set somewhere in B2M that specularity (gloss) is output to alpha channel. You can mix color (RGB) and gloss (A) using my tool (Editor/Relief Tools/4 to 1...) but this might be inconvinient when you'd like to see changes more "realtime". You need to get an answer from some experienced B2M user I guess.

    Tom
     
  31. Zieg Reborn

    Zieg Reborn

    Joined:
    Jul 15, 2014
    Posts:
    2
    Hey Tom,

    Been using RTP for awhile, it's really increased the quality of the terrain in our project so far. I am having one issue that I haven't been able to iron out though.

    I'm using 7 layers, and I have the 8 layers in first pass mode turned on. No add pass. Unfortunately, often when I open the scene I am working on with the terrain, layers 4-7 are all either replaced by other textures or are replaced with black squares. Normally this is solved by having to re-paint the terrain... which has become tiresome, but now I am unable to even paint any of the layers after the 4th.

    Below is an example of the problem. There should be some rocky ground and beach where the plants are spammed, but they have been entirely replaced. The black squares are where he problem textures have been painted at full opacity. 8 Layers in first pass is checked properly.

    We're working on iOS, if that helps.



    What I've tried so far:

    Trying to use add pass instead
    Recompiling shaders
    Changing/Refreshing LOD levels and quality settings
    Reloading the terrain into the level and re-painting it
    Refreshing all textures, and re-loading them

    Edit: A side note, I can't recompile anything now. Doesn't really matter what I change, hitting the Recompile Shaders button is broken/ does nothing.

    Edit: Solution: I ended up making the terrain into a prefab to save its paint, height information, etc., and deleted the RTP folder entirely from the project directory. Saved, re-opened unity, and imported the package fresh. Although all of my finely-tuned settings in the RTP system are gone, it seems to be working properly now.
     
    Last edited: Jul 16, 2014
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Glad you figured out the solution. It's advised to use 8 layers in RTP even if 8th layer is not used. 8 layers in first pass (less polys in the end which is good for less drawcalls) uses atlases, so using 7 or 8 layers makes no diferrence. You just waste a layer that you could ue here and there. Look at atlases made - 2nd atlas should have unused part of it (with 7 layers used). I'm quite surprised, because you're the first mobile user (iOS) that tells that RTP actually works on his side. I haven't been able to get it working on my Android tablet yet. It has rather old Mali400 GPU and your iOS target hardware must be much better then to handle RTP rendering.

    Tom
     
  33. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    tomaszek, could you please make a detailed step by step guide on how to use RTP with 8 textures (not in one pass) with multiple terrains? Currently i plan on using 16 tiles but this will probably increase in the future as i plan on expanding the world a lot more later.
     
  34. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    i found what was wrong.
    no need to attach script or change deffered-forward render, it doesnt help anyway (seem tomaszek described other problem which looks like mine)

    mine problem was in next: some how properties in "layers" was set to 0. strange thing - some textures got 0 and some textures saved parametrs. anyway, to fix my problem need to push button "reset layer numeric params to default". but its simple solution and i think its a bug with fast solution. but what if i set my param to what i need and then it will reset again to 0?
     
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It is definitely not supposed to get reset with "no reason". Don't worry. Simply layer params were 0 at start (they shouldn't be - I need to look into this). To store your current setup use present functionality. You'll be able to revert changes in case you go too far tweaking some sliders.

    Tom
     
  36. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    there is another thing, that i dont like.
    i have many scenes which contains different terrains. each terrain has 2-15 textures. i created another scene and another terrain and i decided to use RTP. compiled shaders, got some test results. but now i have a problem - all other terrains in other scenes crashed. all terrain now are total white. they have textures in their paint tools and terrain data contains splat textures, but now they just dont look like before i mported RTP package.
    so what i think, RTP generate shader and store it in some folder and that shader now replace main unity shader and that means this shader now is main for all terrain. in that case i created new terrain nand broke others.

    im working in unity 3.5.7. i cant work in U4 (my company decided that we dont need U4). is there another way to import RTP and not broke other work?
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    No, in U3.5.7 it's impossible. There might be only one shader for all terrains for all scenes i your project in U3. Convince your company that you need U4 then...

    Tom
     
  38. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Or wait just a little bit and convince them you need U5 : p
     
  39. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    Much easier to kiss the moon then convince our company =) but i understood you
     
  40. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    Hi Tomas,
    Just a question :D

    How have the grass textures visible at far distance without using colormap?

     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi, tell me your setup and what you'd like to achieve. I probably don't undersand your question. If you use option to not use detail colors at far distance, but only global colormap you simply need grass areas be on the global colormap. You can see any layer (its detail texture color) at far distance in the other case (not using option "no detail color at far distance"). The reason you don't see grass there might be related to UV blend replacement. If your grass is blended with other texture (cliff) at far distance it migt be completely replaced depending on UV blend setting for grass layer. You'd need to adjust UV blend routing in LOD manager then (so grass is UV blended not with cliff but with itself).

    Tom
     
  42. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I have some big problems getting this to work and i think the documentation is not 100% clear on this.
     
  43. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    got another problem. shader create button create that:

    Material doesn't have a texture property '_MainTex'
    UnityEditor.DockArea:OnGUI()

    what is that mean?
     
  44. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Did you assign textures to your terrain? And did you assign even amount, like 4 or 8?
     
  45. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    all textures in slots. have 8. option for 8 textures is activated too
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    This is additional info when shader has errors when compiling. Could you give me exact error ? This should available in shader inspector when you select ReliefTerrain-FirstPass.shader or ReliefTerrain-AddPass.shader

    If there is an error you need to give me exact LOD manager setup on which you can't compile shader.

    Tom
     
  47. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    will do that, but after 4 days. im not on work.
     
  48. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    Hi Thomas !

    Thank you, work fine :D

     
  49. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Pretty please?
     
  50. matej_mnoucek

    matej_mnoucek

    Joined:
    Mar 6, 2014
    Posts:
    17
    Hello Thomas,
    we have a specific problem with your shader ... We have just developed a loading system for our terrains and we need load terrains in runtime based on player's position. We store terrains as prefabs. When it comes to instancing, shader give us bunch of strange artifacts. Do you know why?

    Thanks