Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,862
    I was able to reproduce the issue for scaled meshes. I didn't have single pixels but instead whole mesh broken at distance. Symptoms were the same (black output for HDR white for LDR and supernova like when using SE bloom).

    Find this line in RTP_Base.cginc

    Code (csharp):
    1. float3 worldNormalFlatTMP=mul(_World2Object, float4(worldNormalFlat,0)).xyz;
    and change to:

    Code (csharp):
    1. float3 worldNormalFlatTMP=normalize(mul(_World2Object, float4(worldNormalFlat,0)).xyz);
    seems like in LOCAL_SPACE_UV switch in shader makes it break for scaled meshes. I hope this will work for you. If the problem is not related to yours, I will look into this when I'm back from vacation in 2 weeks. Then I would ask you for some basic small project version zipped with your models so I can test it on your floating terrain chunks not only on cubes and spheres :).

    Tom

    P.S. don't forget to reimport your triplanar shader after modifying RTP_Base.cginc for changes to be actually recompiled.
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'm again testing it on Unity5.1.1. Seems like Unity cleanup unreferenced textures after they are all saved in RTP inspector. The key was - unselect RTP object (select anywthing) and Ctrl+S. It works for me and scene doesn't store any unreferenced textures that RTP made. What I've introduced in new RTP update (3.2h - I'm just about to submit it) is calling DestroyImmediate on texture that has been saved, so Ctrl+S right after saving a texture cleans the file (no need to unselect RTP object). I'll try to keep track on it when texture is changed to something else (not saved but replaced by some existing reused combined texture asset).

    Tom
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I've been working on RTP3.2h update. Submitted today. News are:

    - terrain material type set to custom fix
    - HLSL compatibilty (PS4 tex2Dgrad problem)
    - more output platforms
    - fixed issue in triplanar standalone shader
    - better cleanup scene from unreferenced combined textures

    And the most important price is going to be adjusted. I can't keep it that low forever $45 does not reflect the real package value at all. So, I've decided it's not advertised like "temporal %50 off" anymore, but the price is going to $60 (better than previous $90 which also doesn't reflect package value I feel). It's now both reasonable for indies, but not underpriced.

    If you'd like to pick your copy at $5 - hurryup before Unity AssetStore staff accept the update on new pricing (might be week or might be 1-2 working days - we never know).


    ATB, Tom
     
  4. Patidinho

    Patidinho

    Joined:
    Jul 19, 2015
    Posts:
    8
  5. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Thanks so much Tom, testing this afternoon. You are THE MAN! :)
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Go to Unity terrain component settings and change terrain material settings from built-in to custom. Then refresh all button in RTP/settings/main

    This will be fixed in the upcoming update.

    Tom
     
  7. Patidinho

    Patidinho

    Joined:
    Jul 19, 2015
    Posts:
    8
    Thank you so much <3 No gay :D
    But which material?
     
  8. Jarek-Defiler

    Jarek-Defiler

    Joined:
    Feb 6, 2015
    Posts:
    64
    upload_2015-7-19_10-42-28.png
     
    tomaszek likes this.
  9. Patidinho

    Patidinho

    Joined:
    Jul 19, 2015
    Posts:
    8
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Keep it "custom", go to RTP/Settings/Main and click refresh all. Right material will appear automatically. Or simply select terrain with RTP component. It should work out of the box.

    Tom
     
  11. Patidinho

    Patidinho

    Joined:
    Jul 19, 2015
    Posts:
    8
    The Ground Gets Invisible
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Refer to my example scene. Probably your global colormap (if used) has black alpha channel when used together with holes fetaure turned on in LOD manager.

    Possible "dangers" are mostly covered in my pdf documentation.

    Tom
     
  13. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Thanks again Tom, tried your suggested code this weekend and ALL IS GOOD now heh. Terrain looks so awesome with your RTP shader!
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    :)

    Tom
     
  15. DrivingSim

    DrivingSim

    Joined:
    May 28, 2013
    Posts:
    32

    Just wanted to make everyone aware who run into this issue that it popped up when we updated Unity to 5.1.1f1 and 5.1.2f1. And the fix quoted above worked for us. The weird thing is that when I updated Unity to 5.1.2 which just came out this weekend the error popped up again. Don't know if Unity is changing the code when updating or it got accidentally overwrittin in our version tracking software (which I doubt since I only merged in art assets before converting and the error was not there before ). Just thought it was strange. We're using RTP v3.2g

    The error occurres in ReliefTerrain.cs line 457 Just change |BindingFlags.NonPublic to BindingFlags.Public and error goes away.
     
  16. Lasse-Loepfe

    Lasse-Loepfe

    Joined:
    Mar 28, 2014
    Posts:
    29
    Hi,
    just got the Uber shaders, very nice but now I'd love to see the Glitter on my terrain..
    any change to have this in RTP?
    Lasse
     
  17. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Sorry for questions, I don't know why in far distance terrain texture looks awful but in very close distance it looks good

     
  18. Meznaric

    Meznaric

    Joined:
    Mar 2, 2013
    Posts:
    2
    Unity is crashing for me after shaders are recompiled. It doesn't happen if I do not tick 8 Layers in first pass. It does not seem to happen during recompilation but rather when material is being applied to terrain.

    I am on OS X 10.10. and Unity 5.1.1f1. Tell me if you need any more information to help me get this working.
     
  19. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    Hi Tom,

    Already contact you about mobile export, i finaly decide to do my project for pc first, and after that convert it for mobile (with or without your future asset, I have a deadline so it will depends on when you release that one for mobile terrain. Hope it will, you are doing great work :) )

    So, here's a screen of the project : Captsfdeure.jpg

    My problem : Textures are a bit blurry because forced to be in 1024 by the 2048 combining texture, because the base texture resolution can not be more than 2048
    Is there any way to hack that and have 2048 or even 4096 textures ? (Would be great)
    I am ok to change my terrain to a mesh if needed, i want very good texture quality for this project.

    Thanks in advance and sorry if my english is bad ;)

    Jonathan.
     
  20. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Ok, RTP is making me crazy... is there ANY way to get the terrain to look decent in Deferred mode, or should I just give up and render terrain in Forward mode? No matter how much I mess with the sliders there is always a very bright specular highligh when looking towards the sun. In these screenshots, the layer brightness is set to 0, ambient color and RTP ambient correction are both solid black, and spec multiplier, fresnel, and gloss are all set to 0; spec color is set to solid black. In Forward, it looks like I'd expect: solid black. In Deferred, there is a huge amount of light, which seems impossible to get rid of.

    Capture1.JPG Capture2.JPG
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You are refering to something not related to RTP.In deferred lighting is managed by Unity pbr. It is default Unity behaviour. However you can try to replace deferred lighting shader. Settings/graphics/custom deferred lighting shader dropdown. Unzip shader provided in RTP shaders subfolder and place it there. But you need to be aware that this also changes the way lighiting is handled by _every_ object in the scene rendered in deferred path.

    Tom
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Not sooner than RTP4 comes. No schedule on this though.

    Looks like you use 2 types of 'green' textures placed by some random noiselike key. At distance you could make better usage of uv blend globalcolormap perlin noise or even vertical texturing to hide the patterns.

    Tom
     
    ksam2 likes this.
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Give me exact LOD manager setup which makes it crashing. I will try to check it in opengl mode when I'm back from hollidays. What is your unity version ? And there is rtp3.2h availble on AssetStore since yesterday. You could try.

    Tom
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You mean 2048 detail textures can not be atlased ? Because I don't know what do you refer to by 'basemap' texture which is not related to closeup detail textures. Have you checked superdetail feature ? You could visually improve detail a bit close to the camera using this.

    Tom
     
  25. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    Hey thanks for the answer ! The problem I have is that i don't use any normal maps or perlin normal, i'm using tessellation also, so I guess i can't use Superdetail (Maybe i'm wrong) . I made very HD textures, from 2048 to 4096, and when i tried to put them in their true format size, i have a message that says my texture has been reimported in a lower resolution. Here's a screenshot of the message, and the texture i try to put in 2048 on the terrain. I have this message when i hit "refresh" in layer detail panel from your script.
    If needed i have a great capture of all my settings in LODmanager.
    Captezfure.PNG
     
  26. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,373
    @corjn That's probably because you have some texture that has a 1024 resolution. RTP requires all textures to have the same size and will re-scale all textures to the minimum value.

    I would like to request to @tomaszek to have an option to force texture size import settings to a specific value we can enter. It's very annoying when we put a new texture and forget to check its size, only to realize all textures have been re-scaled and we have to manually change all textures again.
    I think it's much more appropriate to set the texture size ourselves instead of RTP choosing the minimum value automatically.
     
  27. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    Hi @eskovas, thanks for the answer !
    Already tried to put all textures at the same size but it does'nt work, when i do the atlases, the script reimport all my textures in 1024...
     
  28. Patidinho

    Patidinho

    Joined:
    Jul 19, 2015
    Posts:
    8
    Terrain now gets purple #DX9
     
  29. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I don't see such a huge difference between Forward and Deferred on anything other than RTP though. Standard Shader objects do have big specular highlights but they're basically the same in Forward and Deferred. Is the difference that in RTP, Forward lets you damp the spec output entirely whereas you can't in the Standard Shader Forward?
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I think I will remake the workflow for this in next big RTP release. I'm not sure I fore 1k textures for atlasing in the code. Will check this later.

    If the error is like max. Temp registers exceeded - tell this to Unity or better - Microsoft which hlsl compiler Unity uses now in U5. Look at the beginning of RTP_Base.cginc there are switchez to make it 'better' but they are already used. Simply in DX9 you are limited when using 8 layers mode or triplanar with more features turned on.

    Whats rtp version you're refering to ?

    It is Unity pbr used in deferred. Rtp simply outputs to gbuffer like other shaders do and lighting is done in lighting shader. By default it is unity's one. You can replace it by custom one though.

    Tom
     
  31. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I purchased your product today based on my ownership of World & Terrain Composer.

    I have attempted to import your asset into my project for the first time. (I have never used it.) And I am getting a naming conflict since you are using the global namespace. Specifically you are clashing with another MouseLook.cs script. Is it possible for you to move your asset into its own namespace? (I am asking the other asset developer to also move out of the global namespace as this is not a good practice for third-party assets for just this reason.).

    Thank you.
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Mouselook.cs is not part of RTP's core functionality. I placed this for example scene only and you can simply remove this. Rest of rtp stuff should have names unique enough. Yes probably you re right, but I'm still this ol school Unity developer thar came from dark ages of Unity2 where namespaces were no available...:)

    Tom
     
  33. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    MouseLook.cs is a pretty much standard/well known script and isnt in the same namespace as any asset ive ever used, generally unless you really really need standard assets you choose to not install from the package or delete afterwards. I dont really like it when standard assets are packed in with an asset from the store but i think expecting every asset maker going to reinvent the wheel when its working normally in a universally available form is too much. You get to learn about the usual ones that crop up though and if you have a situ where you have a few assets you import into a project as a matter of course (if im doing terrain, rtp is one of these) then you get used to the typical conflicts
     
  34. Patidinho

    Patidinho

    Joined:
    Jul 19, 2015
    Posts:
    8

    I'm using RTP 3.2G
     
  35. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Kia ora

    I like the look of this, I'm being careful as I'm very new to Unity and I don't code yet.
    It reaally easy I found to get inover ones head, this will for me end up at round $80
    so I need to do some research before adding it to my hobby tools

    I guess thats the first question, can this be used without the need to code all be it maybe
    not have FULL function of it. and as I have Erosion Bush for working terrains I need to
    know if there is any issues with the two working together

    In case your not aware of it

    http://forum.unity3d.com/threads/er...-paint-terrain-with-noise-and-erosion.290257/
     
  36. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    109
    Okay got it. Not sure why I couldn't get this before. I don't think I was refreshing the layers after i add the normal and height maps.
    FYI I'm using deferred rendering and I don't have the issues you are describing.
    I'm using 5.1 and linear color space. I have integrated UFPS, UniStorm, AdvancedFoilage Shader , and RTP into one project and everything seems to be working okay.
    I am having some issues with trees being too dark but that is most likely something with the A.F.S. mentioned above.

    If you haven't already try an empty project with just RTP install to do a sanity check.
    If you still have issues I'll help if i can, just gimme a shout.
     
  37. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    I'm getting the following error message after importing my project into unity 5

    Code (CSharp):
    1. Can't access alphamapTexture directly...
    2. UnityEngine.Debug:LogError(Object)
    3. ReliefTerrain:GetControlMaps() (at Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs:464)
    4. ReliefTerrain:RefreshTextures(Material, Boolean) (at Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs:273)
    5. ReliefTerrainGlobalSettingsHolder:RefreshAll() (at Assets/ReliefPack/Scripts/ReliefTerrain/_Internal/ReliefTerrainGlobalSettingsHolder.cs:625)
    6. ReliefTerrainGlobalSettingsHolder:ReliefTerrainGlobalSettingsHolder$RefreshAll$(Object, Object[])
    7. UnityScript.Lang.UnityRuntimeServices:Invoke(Object, String, Object[], Type)
    8. Map_tc:create_rtp_combined_textures(terrain_class2) (at Assets/TerrainComposer/Editor/Map_tc.js:7430)
    9. Map_tc:set_terrainArea_splat_textures(terrain_area_class, Int32) (at Assets/TerrainComposer/Editor/Map_tc.js:5848)
    10. Map_tc:create_terrain(terrain_area_class, terrain_class2, String, Transform) (at Assets/TerrainComposer/Editor/Map_tc.js:5692)
    11. Map_tc:Update() (at Assets/TerrainComposer/Editor/Map_tc.js:3614)
    12. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    It's creating terrains but not applying the satellite imagery. The images exist as I can see them as separate files.
     
  38. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    168
    So my problem is normal? Should i try with a mesh and not a terrain ? (I can put combined textures file in 8192 and put full res 4096 textures in it with photoshop)
     
  39. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It would be awesome if there was a way to get it working. Could you post a screenshot of what it looks like for you standing on terrain looking towards the sun (or some bright directional light that's at a mostly horizontal angle)? I really can't tell if my setup is just broken or if Unity's PBR is just supposed to look this weird. Almost every thread where someone talks about issues is answered with "Everything has fresnel! That's what it looks like in real life!" But... well, unless my real life rendering is messed up, that's not what it looks like in real life. ;)
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Noise brush is tool for shaping terrain - that's the main feature. Rtp is for making the terrain looking beautiful. I see no reason they couldn't work together.
    Try update unity version.
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If you don't use atlasing (which is obligatory in 8 layers mode) I guess you should be able to get 4k detail textures working. Atlases however are not just as simple as combined 2x2. They are also padded. For maximum quality I' d suggest not using atlases because you can not have aniso filteringthen. Also - take a look at superdetail feature you can pump just alittle bit of perlin normal detail on close detail textures.
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Do you render in gamma maybe ? That might give huge difference. Google in forum for something like 'marmoset toolbag match' . This switch can be turned off in unity config .cginc file - look at built in shaders files available for download. Btw - have you tried my deferred lighting shader included ?
     
  43. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    No, I'm in linear. I haven't tried your deferred shader yet because I'm hesitant to change the way everything is rendered just to change the terrain, but I'll try it out.
     
  44. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    I'm using the fully updated version of Unity 5. Satellite images aren't rendering when I create new terrains despite them downloading as needed from the map interface.
     
  45. DoubleIsLoveDoubleIsLife

    DoubleIsLoveDoubleIsLife

    Joined:
    Nov 29, 2014
    Posts:
    32
    I've got a slight problem. I just can't seem to get this to work. First, my editor crashed while trying to import, so I had to import it in small chunks. Next, I opened the example scene. The example scene's terrain was black, with purple closer to the player (shader didn't load or something). So I tried to compile the shaders in RTP_LODManager, Which imported some stuff, but fixed nothing. I also clicked 'Refresh All' a couple times in the terrain's RTP script.

    All of the shaders have a syntax error at line 1, somehow. I also get these following errors:

    Shader compiler: internal error preprocessing shader: Timeout writing to external process

    Shader error in 'Relief Pack/GeometryBlend_PM': Can't find include file Assets/ReliefPack/Shaders/CustomLightingLegacy.cginc at line 48 (on )

    Shader error in 'Relief Pack/GeometryBlend_PM': Include callback failed at line 109 (on )

    Shader error in '': Parse error: syntax error at line 1

    Shader error in 'Relief Pack/ReliefTerrainPMTriplanarStandalone': Can't find include file ../RTP_Base.cginc at line 275 (on )

    and some more, which I cant be bothered pasting.

    I think something screwed up with importing, but I have re-downloaded RTP multiple times, and re-imported it a bunch of times as well.
     
    Last edited: Jul 24, 2015
  46. DoubleIsLoveDoubleIsLife

    DoubleIsLoveDoubleIsLife

    Joined:
    Nov 29, 2014
    Posts:
    32
    I fixed some of the errors I was having, I imported the cginc first, then the rest of the shaders. Now it works mostly, still a couple errors though.
     
  47. DoubleIsLoveDoubleIsLife

    DoubleIsLoveDoubleIsLife

    Joined:
    Nov 29, 2014
    Posts:
    32
    Scrap that, whenever I refresh the terrain I get errors 'communicating to shader compiler'.
     
  48. Jarek-Defiler

    Jarek-Defiler

    Joined:
    Feb 6, 2015
    Posts:
    64
    What is the the recommended resolution for splat textures? I'm having some tiling issues with my grass textures that I can't get rid of and it's probably cause it's a weird resolution.
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Sorry I don't really understand your issue. Satellite images are meant to be used as global colormap input. Does not it work?
    Your problem looks very strange. Have you installed rtp in default location ? Whats the unity version used? Newest rtp i tested on u5.1.1f1 and it worked.

    Detail textures can be teoreticaly of any resolution as far as they have the same size for layers oer texture type. Like all diffuse detail textures the same size, normalmaps, heightmaps. They don't need to be the same across types, but for example all color/diffuse (with gloss in A channel) textures should be the same. Rtp try to uniform them decreasing size or simply disallowing texture of non matching size to be set.

    What is exactly your tiling issue ? If you set detail tile size small you have better resotion upclose but also tiling patterns visible when looking at terrain area from distance. Use availble twchniques to hide it. Perlin normal, uv blend, global colormap.

    Tom
     
  50. Jarek-Defiler

    Jarek-Defiler

    Joined:
    Feb 6, 2015
    Posts:
    64
    Arrrggg, Terrain Composer wiped my splats again so I have just a basic setup right now. But this is what it's doing with the 2 grass textures (and only those 2 textures, everything else looks fine).
    Untitled.png

    I have played with UV blend, perlin, Global Color mapand everything else that has knobs and buttons, but I can't get rid of the blatant tiles. The closest I got was maxing UV blend val, but the tiles still remain. Is it just poor quality textures maybe? Just don't know what it doesn't do it on any other ones I have.