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
    If you disabled RTP shader (set built0in shading in Unity's terrain settings) and you have got such output - it simply means control textures are lost when you scale textures. This would be like Unity bug rather than RTP issue.

    Tom
     
  2. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    Ok i disable everything an yes it is unity itself, its not the shader.
     
  3. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    211
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
  5. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    211
    Thank you! colormaps now are available, but normals still becoming an artefact...
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You would need to describe your issue in detail. For global normalmaps to work you need to enable this feature in RTP's LOD manager. Refer to my docs.

    Tom
     
  7. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    Hi !

    Someone use RTP with Terrain2mesh ? Because im really stuck, i read all the documentation, look all tutorial video, but still stuck in the process ... I try to understand by the the example scene but all the map used are the same of the terrain way ... So i continue to dont understand what i m supposed to do after import my mesh, import my uv when i put the script on my mesh he told me some of my texture slot are empty ... And it's normal because i use my UV diffuse :(.

    So if someone nice could help me it's will be very very nice :). Thanks
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    To use RTP on mesh you need 2 things:
    1. Mesh terrain with proper global UV's - they are used for global mapping. Like in case of Unity terrain it's supposed to be top planar mapped and spanned over whole terrain rectangle.
    2. Coverage splat control maps - the same Unity uses for terrain. On my example scene I got it from terrain scene (you can save it in RTP inspector - coverage/control maps) then reused them on mesh scene.

    Tom
     
  9. webtron44

    webtron44

    Joined:
    Apr 12, 2016
    Posts:
    5
    Hello,
    We tried to get the RTP3.3 Update working Friday but kept getting this error of corruption (attached image)
    Any idea where we made our mistake? Any suggestions? We downloaded the various sections, but they couldn't seem to get the archive to work or import into Unity. Is there possibly a Unity package for this?
     

    Attached Files:

  10. Rayco-Haex

    Rayco-Haex

    Joined:
    Jul 12, 2015
    Posts:
    15
    @webtron44 I also have issiue's with RTP, i can import it but with unity 5.3.4f1 litteraly nothing works correct! and i don't really want to degradate since we have playwater which requires the unity version. I dont even know if a older version is going to work.
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    This is not issue with RTP. It's issue with multipart archive you downloaded. Make sure that files have been downloaded completely:

    1. z01-z08 files are of 31 457 280 bytes long
    2 zip is 22 576 243

    It happens that on lower download spped file transfer is interrupted by my inet proovider server (sorry, I can't make it better with database/php backend I've got available).

    So download it until you're sure all files are complete.

    Tom
     
  12. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    Yes it's my problem, i dont know who i can build this splat map :/. And i can't save her by the unity terrain, because i use complex mesh with some cavity how i can't rebuild with heigh map, so that's why i would like to use the Terrain2Geometry.
     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If your mesh is that complex you simply can't produce global uvs for global maps nor coverage info, try to use so called standalone RTP shader. Open example scene with triplanar standalone model for reference. It can use (it's set by default) coverage set by world normals (tops receive grass, cliffs receive rock textures).

    Tom
     
  14. Deleted User

    Deleted User

    Guest

    Hi Tomaszek,

    Im using world creator and I'm considering buying RTP now but I have one question I would like answering please. Can I export the textures I create?. The updated version of World creator combines with Terrain to Mesh helps me get the textures I create, on my Terrain, out of unity. I do this to take my mesh and my maps into another 3D software package for editing and rendering. If i purchase RTP i want to be able to export the textures I create out of unity to use in my 3D program, Is this Possible??. Great tool by the way, I love what Ive seen.

    Thanks In Advance
     
  15. Samol

    Samol

    Joined:
    Jul 8, 2012
    Posts:
    14
    Hi. I have a problem with substance assigned to layer in RTP. Using latest version of everything (Unity, RTP, Substance Designer) on Mac. When I assign a substance to a terrain layer and click "Get Textures", I get black diffuse, blue normal, black height, see attached screenshot.
    Also, the RTP manual says "substance compression format should be set to RAW" but I don't see such an option in Substance Designer. Can you please clarify where to set this up? Or are you only referring to B2M (could be mentioned in the manual as we can search a long time for this information if we are not using B2M)? What about support from substance from the Substance Database v2 (in particular PBR materials) or the new store? Can you please update the manual for operation with Substance Designer 5? If there are any limitations with substances, can you please update the manual stating what they are?
    Lastly, it is not clear to me whether the RTP support for substances is just to extract the diffuse/normal bitmaps etc. or full support for dynamic/procedural usage (as when we modify substance properties in real-time). Can you please clarify this point? If in the end we can only use the substance outputs as bitmaps (which is my understanding so far), then how do we match outputs such as roughness and ambiant occlusion (AO) knowing the layer only takes detail (basecolor?), normal and height? I guess we have to preprocess like the basecolor map with AO first in Photoshop? Sorry for so many questions but the RTP manual is completely lacking info about usage of substances.
     

    Attached Files:

    Last edited: May 12, 2016
  16. Samol

    Samol

    Joined:
    Jul 8, 2012
    Posts:
    14
    Unity 5.3.4 Mac Open GL 4.1 + RTP 3.3 : I enabled tessellation + recompiled shaders and my terrain looks very bad, almost black. Things go back to normal after I disable tessellation.
     
    Last edited: May 12, 2016
  17. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    did you prepare the terrain for tesselation?
    like in this video
     
  18. Samol

    Samol

    Joined:
    Jul 8, 2012
    Posts:
    14
    I added a normal map into Terrain/Settings/Global Maps/Tessellation area but same thing. I noticed in the video the author doesn't seem to be using a normal map, but no idea how to generate the kind of map he is using if this is not a normal map. Also, if in LOD manager/Tessellation I only enable Phong, the terrain doesn't go black but a strange purple-like color. If I enable "height&normal from texture" and setup a normal map into Terrain/Settings/Global Maps/Tessellation (or no normal at all), I get the blackish color.
     
  19. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I'm using Tesselation and POM on detail maps, and with certain textures, like noisy normal or height maps, it tends to make half the terrain look like it's swimming, like a weird distortion. There's kind of a line where everything above it on the screen is distorted and everything below it is fine. Here's a screenshot, you can see in the middle of the screen there's a line and the texture above it is displaced from the texture below it. When actually moving around the top half shifts around in weird ways. I get the weird effect with POM but it's made worse by tesselation. I think it's any terrain that is above the a horizontal viewing angle (any thing you'd have to look up to see). Is this just a thing with POM, that it only works when you're looking downwards?

    Capture2.JPG
     
    Last edited: May 13, 2016
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    What exdactly kind of textures would you like to export to 3D modelling software ? What you see in when using RTP shader is combination of quite a lot textures. For example detail textures are blended to hide tiling. Perlin texture is used multiple times to increase bump detail and control coverage of snow, Global colormap is mixed on the top of it and mixing is done by distance between surface of terrain and camera. All textures are available, but can your 3D software use them the same way ? What you probably expect is to export one big color texture from Unity (RTP) that spans over whole terrain. Such texture would be several thousands resolution (like megatexture of let's say 100GB capacity). No, that's not possible for such a reason.

    Look at video Arganth posted above. 1:20 I'm opening the tool that creates texture needed. When you place wrong texture into the height&normal you'll have messed up normals thus terrain is black, lit wrong.

    Quality of POM depends on size of triangles on terrain. With tessellation they are probably small enough, so your issue might be related to another factor. Anyway POM needs precise tangent space conversion which might be not satisfied on terain slopes (it's mapped topplanar without so called "orthonormalization"). From your screenshot I can't tell what's the result of POM displacement and tessellation. I'm afraid using hi-frequency bumps from tessellation and placing POM on the top of it can lead to such artifacts depending on how deep you're trying to "push" POM displacement.

    Tom
     
  21. Samol

    Samol

    Joined:
    Jul 8, 2012
    Posts:
    14
    @tomaszek: thanks!
    I have another problem using 8 layers. I cannot get to a proper rendering. when at close distance, either the tiles appear pink or rendered with wrong color (see attached screen). I have recompiled shared, used Refresh All, restarted Unity... still have the problem. I am using the same texture on each layer (this is just a test) and have no global maps.
     

    Attached Files:

    Last edited: May 13, 2016
  22. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I deleted my whole terrain and started over and for some reason now it's working fine. I think the last terrain may have just angered the terrain gods. I do have one other question: Is there a way to create a build where the user can choose whether or not to use tessellation, for users who don't have video cards that support it? I'd guess I'd need to have two versions of the RTP shader and swap out the terrain material?
     
  23. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    One more question: Am I right that when using Tessellation on Detail Maps, that POM Self Shadowing doesn't work? Should I set the MaxLOD to POM_NoShadows?
     
  24. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    So I am running into this issue again; it's hard to tell what causes it. I made a video so you can see more clearly what's going on: moving the camera around and then messing with the POM sliders, you can see there's a distinct line where POM basically stops working and becomes a mess. The triangles seem fine; I've tried it with tessellating different height map resolutions from as small as 129 up to the original 1025 and it doesn't make a difference.



    After messing with it more, what seems to be happening is that everything past the "line of weirdness" seems to act as if it's a completely black height map. Regardless of how low "extrude height" is set at, increasing "Max search steps" or "Step Length" causes everything past the line to sink further and further into the ground, even when extrude height is nearly zero.
     
    Last edited: May 14, 2016
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    At far distance it looks better, so it seems like your detail normalmaps are wrong.

    You might need to compile 2 shader sets with LOD manager. After maing one set, you need to make a copy of firstpass/addpass/faronly shaders. Rename thej inside and setup proper dependencies in firstpass shader at the very end of the code. You can make 2 materials then and attach first version of firstpass shader to one matieral, and the 2nd first pass variant to the other. You need to remember that global map for tessellatin is different comparing to global normalmap (when no tess is used). You need to swap them in materials as well.

    When you displace terrain with detail heightmaps it makes no sense to use POm at all. Use PM then.

    Carving terrain with POM so deep is not possible. POM solver has its limitations (max steps/step size controlled). The line you see is the place where POM solver reach the limit and flatten out its output.

    Tom
     
  26. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It's not related to how deep the carve is, if I understand what you're saying. Setting the extrustion height to the absolute minimum still causes everything behind the line to sink to a depth dependent only on max search steps and texel width. There's a part in the video where you can see I'm moving the extrustion height up and down; it only affects things in front of the line - everything behind the line stays exactly the same, even when extrusion height is zero.

    I should mention again this only happens when looking uphill. If I turn around, with the same texture but looking downhill, everything is fine at any distance.
     
  27. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    Hi Tomaszek,
    I'm using a standalone/parralax/triplanar with tessellation shader from RTP. I'd like to try using the snow cover as a 'sand cover' instead, by altering the snow color, however every time I try to change that snow color, it just resets back to white. Any idea how to fix this?
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    There is a small glitch in my inspector drawer for this prop. You can workaround for now by opening the shader code, finding this line:

    Code (csharp):
    1. [RTP_MaterialProp(NoAlpha)] rtp_snow_color("Color", Color) = (0.9, 0.9, 1, 1)
    and chaging it to this:

    Code (csharp):
    1. [RTP_MaterialProp] rtp_snow_color("Color", Color) = (0.9, 0.9, 1, 1)
    Tom
     
    Exbleative likes this.
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I was able to reproduce your issue as soon as I set global terrain normals (taken from tess texture) to unrealistic low levels.

    tess_norm_strength1.JPG

    When it's set to default 1 value it works fine looking uphill:
    tess_norm_strength2.JPG

    Can you check this on your side ?

    Tom
     
    Last edited: May 15, 2016
    hopeful likes this.
  30. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Ah! You're a genius! The value was fine but apparently the height/normal texture I was using had a problem with it. I was generating it via code that was based on the RTP Prepare Heightmaps window, and I assumed it was working since the heights were fine and the image looked the same to my eyes, but apparently I messed up somewhere and the normals don't have the correct magnitude. Using the Prepare Heightmaps window fixed it. Thanks!
     
  31. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    Thanks!

    I'm also curious, say I'd like to use that shader with snow for one terrain/scene, then in another scene I'd like to enable caustics or emission, and remove snow for example. Then I'd need to recompile the shader. Would this not break one of the terrains/scenes as they share the same shader? In the above example, I'd lose snow in the first terrain?

    I tried copy pasting the shader and renaming it but I'm getting errors:
    Cant find include file rtp-base.cginc and,
    Include callback failed
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You need to place the shader copy the same location (#include directives have relative paths set) as original.

    Tom
     
    Exbleative likes this.
  33. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Hi i decided to go through the first working steps video hard to follow because i have the newer version of rtp but i was wondering how do you tell that all textures are the right size because i tried it with gaia terrain which uses 2k textures from gametextures.com but it wouldn't take the bump and height maps. The textures are all uniformed to. Just also was wondering is there any new tutorial videos coming out. They all seem to be old videos.
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP3.3 has simplified workflow. Simply you won't see some features that are not used anymore (platform selection for example). You can use 2k textures. Only make sure your detail textures are of the same size before you try to attach them to RTP texture slots for each layer.

    Tom
     
  35. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    This reminds me - a minor bug I noticed. When adding a normal texture that doesn't match the size of the other, it gives you the error saying you need to resize it, but then it opens the inspector for the correctly-sized normal map instead of the incorrectly-sized one, which doesn't make a lot of sense. For example if my rock normal is 512 and I try to add a cliff normal that's 1024, it says something like "You need to set this cliff_n.png to 512!" but then it opens the inspector for rock_n.png, which is already 512.
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It selected 2nd texture from a pair. Changed this it will select bigger one. Thanks for the info.

    Tom
     
  37. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    Hi, as soon as I get to 2:39 in this video:
    I dont get any perlin noise and I cant change any of the texture's tiling. What is causing this? I've followed the video to the letter so far. This is as far as I can get with it
     
  38. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    after fixing the alpha map error I now get this one:

    Texture aux property (unity_SpecCube0_HDR) should never be a built-in name!
    UnityEditor.AssetDatabase:ImportAsset(String, ImportAssetOptions)
    RTP_LODmanagerEditor:RebuildFeaturesInFile(String, Boolean, Boolean, Boolean, Boolean) (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:2704)
    RTP_LODmanagerEditor:RefreshFeatures() (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:1523)
    RTP_LODmanagerEditor:OnInspectorGUI() (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:546)
    UnityEditor.DockArea:OnGUI()
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Tell me your Unity version and RTP version. Looks like they don't match. RTP3.3cthat's available on the AssetStore should work fine on U5.3.

    Tom
     
  40. iiYazza

    iiYazza

    Joined:
    Feb 11, 2016
    Posts:
    3
    Hi,it didn't work when i want to add a new texture, how can i use my own texture ? I have the Diffuse, normal and heght map in .png. When i paint my texture this is plain black lines
    Thank you for some help
     
  41. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I have a sort of complicated question. A few pages back I mentioned I was using the Hidden/ReliefTerrainGeometryBlendBase shader to put procedurally generated meshes on top of the terrain and have them show the terrain right below them. This works great mostly, but vertical planes end up smeared like cliffs. I'm setting the UV's directly to what I want them to be for the vertical planes, giving them corner values as if they were horizontal, but the shader seems to grab the correct square from the splatmap but then ignore those UV's for some aspects and replace them with the world x,z position. Is there a way to get it to completely ignore the world position and to just use the UV's I give it and render that part of the splat?
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP uses world x,z for detail uv mapping. In triplanar it uses all x,y,z. Maybe you should go this way - compile your geomblendbase version of shader with enabled triplanar ?
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Try to follow RTP workflow described in my pdf docs and on first steps video (youtube). First make an terrain, then add 4 or 8 layers to it, then add RTP script component, then select features used and recompile shaders. Then put your additional textures (detail normalmaps, heightmaps) and setup parameters. You can paint coverage on the terrain using Unity's terrain tools.

    Tom
     
  44. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
  45. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yeah I was trying to avoid triplanar if I could since the terrain doesn't necessarily need it, but it does work fine with triplanar enabled. And to be fair, the game does look a lot better with triplanar, so maybe I'll just give in and use it.

    One more question (sorry if I'm being annoying ;) ) - I've noticed that most of the time, the GeomBlend section of terrain doesn't update its rain/global wetness along with the rest of the terrain when I modify it at runtime, unless I manually select the mesh in the editor and poke it somehow to cause it to refresh with the correct values. Is there a way I should be doing this from code?
     
  46. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    ahhhh ok I'll update it and get back to you.
     
  47. Rayco-Haex

    Rayco-Haex

    Joined:
    Jul 12, 2015
    Posts:
    15
    I got RTP to work but now sometimes my terrain randomly turns fully pink (missing textures)
     
  48. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I started keeping a blog of what I'm working on; the first real post is mostly about integrating weather with RTP and UBER! Really pleased with how much detail it adds to the terrain and blocks. Thanks for all your hard work, Tomasz. :)

    https://everfar.wordpress.com/
     
    tomaszek likes this.
  49. Rayco-Haex

    Rayco-Haex

    Joined:
    Jul 12, 2015
    Posts:
    15
    I fixed it by giong to unity 5.3.2 instead of 5.3.4. It works perfect now :D
     
  50. tcn5150

    tcn5150

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

    Is there any chance that a future release of RTP might allow independent detail texture scaling? I know that you have them all locked to the same scale for performance gains, but it would be great to have the option to scale them differently. Or is there a way to edit the shader code to allow it?