Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    505
    @tomaszek Is there an ETA for the directional light cookie issue?
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Soon
     
    buttmatrix likes this.
  3. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    505
    So the 'floating tree' issue can be resolved if we place trees based on the original terrain heightmap data, then downscale and tessellate?
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    To solve it solid way - use 2 separate terrain data objects. One with original (hi-res) heightmap - will be used as terrain collider and vegetation (trees) renderer. For this terrain uncheck rendering in Unity terrain settings. The other terrain will render terrain surface with RTP and tessellation. This terrain data you can downscale and use high pixel error. RTP shader will refine terrian mesh using tessellation.

    Cookie problem. There is something weird I've noticed in Unity5.6 and up. On U5.5 cookies worked. Now, when inspecting rendering process in frame debugger I've noticed Unity render terrain this way (we're talking about forward rendering, in deferred cookies work):

    1. Terrain is batched to depth for shadow collecting - that's good for optimization to init depth buffer and optimize further overdraw caused by expensive terrain shader.
    2. Terrain is drawn to get ambient/GI light only - that's bad - we don't have realtime light defined (causing screwed results in shader) and this step is pure bad because we have additional pass that's not necessary at all (could be rendered with directional light together!)
    3. Terrain is drawn once again to add directional light with cookie

    Don't ask me why Unity does it like this. Anyway - beware about performance drawback.

    I will submit/upload new RTP version today, but will take sometime until it's available on AssetStore. Meantime you can fix it manually. RTP_Base.cginc and RTP_AddBase.cginc. Find this part:

    Code (csharp):
    1.  
    2. #if defined(UNITY_PASS_PREPASSFINAL) || defined(UNITY_PASS_DEFERRED) || defined(LIGHTMAP_ON)
    3. uniform float4 _WorldSpaceLightPosCustom;
    4. #endif
    5.  
    and simplify into this:

    Code (csharp):
    1.  
    2. uniform float4 _WorldSpaceLightPosCustom;
    3.  
    Then find myObjSpaceLightDir function and replace it with better one:

    Code (csharp):
    1.  
    2. inline float3 myObjSpaceLightDir( in float4 v )
    3. {
    4.    float4 lpos = _WorldSpaceLightPos0;
    5.    #if defined(DIRECTIONAL) || defined(DIRECTIONAL_COOKIE)
    6.        if (abs(dot(lpos, lpos) - 1.0) > 0.01) {
    7.            // _WorldSpaceLightPos0 undefined
    8.            lpos = _WorldSpaceLightPosCustom;
    9.        }
    10.    #endif
    11.    float3 objSpaceLightPos = mul(unity_WorldToObject, lpos).xyz;
    12.    #ifndef USING_LIGHT_MULTI_COMPILE
    13.        return objSpaceLightPos.xyz * 1.0 - v.xyz * lpos.w;
    14.    #else
    15.        #ifndef USING_DIRECTIONAL_LIGHT
    16.        return objSpaceLightPos.xyz * 1.0 - v.xyz;
    17.        #else
    18.        return objSpaceLightPos.xyz;
    19.        #endif
    20.    #endif
    21. }
    22.  
    Save, recompile shaders - should work. There are also some inconsistency moments in scripts due to conditional compilation where U2017 is not taken into account and I will fix it as well, so - you might simply wait a week for RTP3.3h to be available (these "alphamap..." errors in console are caused by the mentioned conditional compilation problem).

    ATB, Tom
     
    buttmatrix and Dwight_Everhart like this.
  5. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    505
    @tomaszek I appreciate that RTP is not officially supported in 2017.x, but I can confirm that RTP is not working as expected in 2017.1.0b1 and 2017.b1.09.

    In previous versions of Unity, after adding RTP component - Engine Terrain or Mesh, the terrain updates from the Built-In Standard material to a custom RTP material. This does not occur in 2017.x. Is there a workaround, e.g. assign custom material / shader manually to terrain? Manually assigning ReliefTerrain - First Pass shader does not overcome this issue.

    For example, 2017.1.0b1 the console prints the following error when trying to compose splats:
    *this error does appear in 2017.1.0b9

    Code (CSharp):
    1. OutOfMemoryException: Out of memory
    2. ReliefTerrainGlobalSettingsHolder.RecalcControlMaps (UnityEngine.Terrain terrainComp, .ReliefTerrain rt) (at Assets/ReliefPack/Scripts/ReliefTerrain/_Internal/ReliefTerrainGlobalSettingsHolder.cs:3082)
    3. ReliefTerrain.RecalcControlMaps () (at Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs:451)
    4. ReliefTerrainEditor.OnInspectorGUI () (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:2033)
    5. UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1218)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Other issues:
    • Terrain2geometry workflow; splat map from terrain does not fit low poly terrain mesh UVs
    • Importing RTP terrain into existing scene with RTP causes imported terrain textures to become overexposed (broken gamma correction?)
    • terrain2geometry workflow; Unity only handles meshes with less than 65,000 verts, can RTP handle multi-subobject meshes?
    • Separate terrain data sets are affecting each other; adjusting RTP script on one terrain affects RTP settings on another terrain unexpectedly?
     
    Last edited: Jun 19, 2017
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    I have submitted RTP3.3h which I adjusted for Unity2017.1.0b9. I hope it will resolve most of your problems, still:

    1. Out of memory - checked in U2017 in example scene and 1k input control masks - it doesn't seem to take unrealistically high amount of RAM and I was able to compose splats for 8 layers. Can you give me more details ? How big are your input masks ?
    2. terrain2geometry workflow - you need to take care your model has 0..1x0..1uvs spanned topplanar across the rectangle mesh - like Unity terrain mesh has. Then it should make it. I believe that the issue you're refering to is not much RTP vs. Unity 2017 related. It's the way RTP shader on mesh object works.
    3. textures overexposed - hard to say. You might check sRGB flags for all textures used by RTP shader.
    4. It's up to user to provide RTP with mesh. The way you do it doesn't matter. When you export terrain to obj and reimport it as mesh Unity i9s supposed to split it into submeshes - if RTP doesn't apply the same material for all submeshes - do it yourself (copying RTP material to all of them as all submeshes shall share the same material).
    5. This is feature, not bug. If you'd like to keep it independent - place separate terrain/RTP objects into separate anchor transforms to break grouping.

    Tom
     
  7. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    505
    @tomaszek Everything is working so far since the 3.3 update, I'll keep you posted (thank you!)

    EDIT: got terrain2geometry working (9 draw calls - incredible), thank you so much!
     
    Last edited: Jun 20, 2017
  8. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    875
    My terrain is black after lightmapping. I am in forward and tried both Enlighten and Progressive. What have I missed? I'm sure it's one check box or another. Where should I start debugging? Thanks.

    RTP_lightmap_01.PNG
     
  9. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    505
    You can see the discrepancy between the control map on the terrain versus on the low poly geo. I keep getting the following warning, "source control alpha maps should have 1024 size". I'm assuming the lower resolution splatmap (originally 2048) is responsible for this quality loss.

    Is there a workaround?

    EDIT: I can copy the RTP component on the original (high poly) terrain, paste it to geo (low poly) terrain, and compose the splats to achieve the same result. However, this will replace the composed splats on the high poly terrain, which is undesirable, but acceptable (in my case) because I'm not actually drawing the terrain. Nevertheless, I'm curious what the correct way to do this is.

    _terrain.png _geo.png
     
    Last edited: Jun 20, 2017
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    This is due to lack of realtime light. As it is supposed to take the same render complexity you can add proxy/dummy light (with low intensity like 0.02) in the scene after lightmapping. I believe that RTP3.3h you can download since yesterday might solve your problem out of the box as soon as you add this light script to main directional light (either before or after baking it) - refer to my example scene to see the script attached to main directional light.

    Tom
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Compose splatmaps for terrain, save them (they are accessible under coverage tab in RTP inspector) and reuse for mesh. I'd say different look is rather matter of detail heightblending not working the same way on mesh. Attach RTP component to mesh separately (don't copy it) and setup (reuse combined then saved detail heightmaps or drag&drop them on mesh again to rebuild combined textures used in shader).

    Tom
     
    buttmatrix likes this.
  12. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    505
    Posting this here because the savings are incredible

    Terrain (left), geo (right). Thanks Tom!

    Screenshot (375)_terrain.png Screenshot (376)_geo.png
     
    hopeful likes this.
  13. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    468
    Im getting this error since the update.

    Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs(4991,53): error CS0029: Cannot implicitly convert type `Tool' to `UnityEditor.Tool'

    this is on unity version 5.6.1f1.
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    I remember checking newest RTP3.3 against U5.6.1 and don't have this problem. You might have installed yet another class that's named Tool which confuses compiler? Should be simple to fix (qualifying/replacing Tool occurences in script with parent UnityEditor.Tool).

    Tom
     
  15. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    53
    So I just updated from 3.2 to 3.3e and things are quite a bit different. Mostly for the better. I'm using Unity 5.4.1. The shader options are awesome now, and good logical arrangement. I use the Standalone/Parallax Mapped Triplanar - PolyBrush shader to color my custom voxel terrain through vertex colors. For testing it just applies the 4 colors based on slope, no blending on my part (ex: Color(255,0,0,0)). In the example scene everything works fine. In my larger scene there is a weird issue, where the meshes flicker. They keep their correct texture based on there vertex color, but the appearance changes. As I move the camera around the textures change, pop and flicker. This is the same image, just after turning the camera just a little bit. At first I thought it was just the normals changing, but the actual texture positioning changes too. I reviewed the example scene and made sure every setting was exactly the same. I checked the texture settings to make sure they were identical. I made sure the deferred script was on the light, and that the triplanar script is on the parent gameobject for all terrain tiles. Am I missing something?

    Sample1.jpg
    Example.jpg
     
  16. BonsaTech

    BonsaTech

    Joined:
    Dec 22, 2015
    Posts:
    47
    Hi @tomaszek , I´ve a question about the integration between RTP and my meshes that use UBER shaders.

    Is it possible to use the geometry blend feature between a RTP terrain and a UBER mesh?
     
  17. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    53
    The issue appears to be only when I set to UV blend. If I turn that off it is fine, but looks pretty bad. The UV blend makes such a dramatic difference. As per my post above, it is constant flickering as I move about.
     
    Last edited: Jun 27, 2017
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    UBER package consists of geom blend shader variant that is suitable for RTP.
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Is it possible for you to upgrade to higher Unity / RTP? Most recent version is RTP3.3h over Unity 5.5.0p3 and above. I believe that might solve your issue. Sorry I for not updating RTP for all previous Unity versions. It's awkward and sometimes impossible due to changes in Unity rendering pipeline and improvements indroduced.
    Can you check it on my example scene where triplanar standalone is used (this weir "asteroid"). It has UV blend turned on so you could compare and for me it would be easy to reproduce the issue in case we can both get the same issue on 3.3e installed on U5.4.1. Comparing with my example scene might guide you to determine the difference between this mesh and yours and what can ncause the problem.

    Tom
     
  20. ModularBuilds

    ModularBuilds

    Joined:
    Jul 16, 2014
    Posts:
    88
    Hi, I had some questions about RTP before I purchase.

    • Does it support multiple terrains? I am using World Streamer to stream the world in and to do this I have to split the terrain multiple times.
    • The cave/tunnel system, does it use the geometry blending or are we suppose to cover it up with a mesh?
    • Have you tested it with any water products? I am using AQUAS and the current terrain shader I use doesn't play well with it (depth problems??).
    • I've heard some people say the learning curve for this asset is very high, why is that? Does it just have a lot of options?
    • If you could, can you explain the process to get the shader up and running? Like is there a bunch of steps, caching, and generation that is needed or can you just apply it and go (not including setup)?
    Thank you in advanced, your asset looks amazing! :)
     
  21. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    53
    I updated my Unity to 5.6.1f1 and deleted old file, then installed the newest version. I didn't change anything, and dropped the Standalone/Parallax Mapped Triplanar - PolyBrush shader onto my terrain prefab. It generates tons of terrain tiles, which initially don't have a mesh - it gets generated at runtime. I also have an lod system that uses a simple plane made in blender where I just adjust the vertice heights. Both objects use this shader I attach the Relief Terrain Triplanar script the a parent object and set the material for mip setup directly. So everything is the same as the demo scene, and it till has the same popping error.

    So my mesh objects don't have any uvs, does that matter? I only have vertices, normals, and tangents. I thought maybe it was some kind of tangent problem, but used your method and makes no difference. Does it need anything else? Any ideas?

    I have another sample scene I made for testing noise generation for making random terrain. This works with just the planes and no voxel generation. I will play with that version to simulate the same behavior. Later I can wrap up the project files and send them to you if that helps. Its all procedural so the file size should be really small.
     
    Last edited: Jun 28, 2017
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    1. Yes, it does. I believe there's is (or was) video tutorial for WorldStreamer on how to setup it right to work with RT
    2. geom blending is covering it with mesh but the advantage is that we can hide seams where mesh intersects terrain so cave entrance fits.
    3. not sure because I haven't tested it with vast range of water products. As far as I know most of them should work w/o problems though. Depth problems you might only encounter with tessellation in forward lighting. Again - most probably this issue is not valid anymore with newest Unity releases where depth for forward objects is constructed using shadow/depth pass which RTP provides. Technically speaking - missing part in RTP is RTP tessellated terrain shader pass in replacement depth pass (it is/was used in forward only).
    4. It's very subjective matter. One can find the basic concepts of RTP different to one experience with other products, but I definitely wouldn't say it's "that hard". Setup single terrain is very simple.

    a. make terrain (4 or 8 layers)
    b. attach RTP script
    c. set features needed in LOD mnanager and recompile shaders
    d. provide RTP with parameters which standard terrain doesn't need (detail normalmaps, heightmaps)
    e. tune other parameters to get best visual results (depends on your terrain, textures, lighting and many other factors - there's no "best set of parameters working in all cases")

    Best to invest some time to read pdf manual where all concepts are explained in detail. This might save you a lot of time later when you could stuck scratching your herad "why it doesn't work like I think it is supposed to".

    For multiple terrains when you add RTP to the other terrain object it will share most settings with the first unless you intentionally put it in different transform (it's so called grouping which in some cases is necessary). So - when you setup sucesfully one te4rrain slice you can simply add RTP component to the other slice and adjust per terrain parameters only (like global maps - global color map, global normalmaps and so on). RTP is meant to setup large environments in minimal set of steps still giving you freeedom to manipulate terrains separately.

    Tom
     
    ModularBuilds likes this.
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    I see. Triplanar standalone doesn't need uvs. Triplanar maps it ... "triplanar" :). Tangents are needed for detail normals / lighting / parallax calculations though. So you can't reproduce the issue on my example triplanar scene ? Are you able to save your runtime mesh to asset (via editor's createasset method) and send me for tests ?

    Tom
     
  24. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    80
    Hi, we are working on game, where we let players build a stuff, so GI is impossible as we cannot bake. We found solution SEGI (https://www.assetstore.unity3d.com/en/#!/content/64763). I read, that there were some issues, when you converted RTP to unity 5 with GI. Do you know if it will work together with this lighting solution? Or does anyone have experience?

    Thanks in forward :)
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    I'm not aware of any problems. RTP solves lighting thru Unity surface shader layer. The only problem might arise only in deferred lighting path where RTP tweaks some default Unity functionality with it's own shader. However - it's not obligatory to use RTP lighting shader in deferred at cost of compromising translucency and POM self-shadowing (unless you can merge functionality of RTP added to Unity default deferred lighting shader with SEGI if that's the case - it's not "that" hard to find where I tweaked code - it's very well commented and outlined).

    For your game check first if your environment has dimensions SEGI can handle. As far as I know SEGI creates kind of volumetric data structure where computations are performed in. It was an issue in early SEGI versions, not sure how is the status for this now. Expect rendering cost to become quite demanding as well. If you plan to release game in 2-3 years from now it might be not an issue though.

    Tom
     
    Kusras likes this.
  26. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    395
    For World Streamer I found best thing to do it if you have multiple terrains is duplicate the Lod Manager and child to each terrain, so it will be available in each scene and the pop up wont show when you go to build, :)
     
  27. Swagmiral

    Swagmiral

    Joined:
    Jul 26, 2015
    Posts:
    15
    Self-shadows have a very big offset (no shadow unless an extrusion is really big) and poor quality (steepness), is it possible to fix it?
    Is there any way to get more control over self-shadow?
    Thanks
     
    Last edited: Jun 29, 2017
  28. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    53
    I have a sample scene that generates a bunch of terrain when you hit the Generate button. This project doesn't include the the RTF files so those need to be imported. Just use the default settings for the PolyBrush shader. It was created using Unity 5.6.1. Mark the Walk Surface On Load checkbox to walk the surface once it is generated and you will see the flickering terrain when you walk around. I'm using Unity's RecaculateNormals and switched to using your tangent Solve method to rule that out as a problem. Please let me know if you can figure it out.
     
    Last edited: Jun 29, 2017
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    All parameters can be tweaked via RTP/Settings/POM
     
  30. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    875
    I am on 3.3h. It does appear to work out of the box, but only after I open your scene first. So when I open my project and Play the scene, the terrain is black. I open your TerrainScene, then re-open my scene and it looks fine. I can't figure out what the difference is or why opening your scene fixes it.

    Also, I'm loading all of my scenes into a main scene at run-time. The terrain comes in fine in the editor, but not the build. What do I have to do to load RTP into another scene at run-time? Thanks.
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    It must be missing script on directional light then (compare with my example scene).

    Tom
     
  32. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    53
    How would you set up the triplanar shader from code. I get how to set the 4 materials, but how do you access the individual layer options. I tried setting a property (Ex: RTP_metallic0123), changing the active_layer, then setting the same property again, but it appears any change appear to change all values on all layers. I don't see anything that represents an array or anything in that shader code. I need to pragmatically generate nearly 1000 materials, since setting by hand is just impossible. I need to be able to set all the options under the Choose Layers heading (ex: PBR - props - layer, Aux proprs, UV Blend, etc.) by code. Any help would be appreciated.

    Also what is the significance of the bumpmaps and heightmap textures. If I change the bumpmaps I don't see any difference. If I change the heightmap is appears to change the appearance of blending between vertex color values. Looking through the documentation, it says the other shaders use some of this for the global colormap which I don't plan to use. Also I remember in the older shader, there was a way to make the normal strength pretty high even in full light, which added a lot of detail. Is that possible in this version. Thanks.
     
    Last edited: Jul 11, 2017
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    We RTP_metallic0123 as vector/color material property which has individual values stored on subsequent channels. If you change this property on material to for example (1,0,0,0.5) would mean metalness for layer 0 will be set to 1 and for layer 3 to 0.5. My specialized material editor only splifies it using active layer property to change one component of vector at once thus leading to make things more intuitive for users (on older RTP versions users had to change numerical values on vectors exposed in material editor to manage per layer settings). Again - there is no "array" of values and ASAIK Unity still can't serialize (think "store") array values in material assets. Per layer scalar(numrical) values are solved using vectors.

    Note that RTP script can work on separate bumaps for each layer while triplanar shader version assume you provide already combined textures (RG - tangent xz direction from 1st layer, BA - xz direction from 2nd layer). So - bumpmaps are arranged in paris. Heightmaps arecombined in quads (RGBA values for 4 subsequent detail heightmaps).

    I'm not sure what kind of normals to be set srong you're refering to. Detail or perlin? For detail you need to compose them from normalmaps that has strong enough values. For perlin normals we can influence them per layer at shader level. If you find them still not enough (take care - perlin normals are taken from combined texture - it might be simply used as such combined texture is already available saved in my package). If you still find perlin normals not enough strong you can change its range in shader code - look at proper "0123" vector property that defines perlin strength per layer. By default it ranges 0..1 but you can change it to 0..2 or anything.

    Code (csharp):
    1.  
    2. [RTP_MaterialProp(layer,0,1)] _BumpMapGlobalStrength0123("Perlin normal strength", Vector) = (0.3, 0.3, 0.3, 0.3)
    3.  
    Tom
     
  34. Hynopsis

    Hynopsis

    Joined:
    Oct 25, 2012
    Posts:
    53
    Wow. How did I not put that one together... That totally makes sense. Thanks again.
     
  35. netincome2

    netincome2

    Joined:
    Nov 8, 2014
    Posts:
    10
    Hi,
    we have a problem with combination of Geometry vs Terrain Blend component and our decal system.
    We are using this decal system: https://www.assetstore.unity3d.com/en/#!/content/76410
    We use it without problem on all objects except for object using Relief Pack - GeometryBlend/Basic material. Then this happens: http://c2n.me/3M2QsRk.jpg - decal is placed under the object. Any idea what we could do to prevent this behavior? Thanks!
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Deferred decals are placed over deferred buffer while geom blend works as forward pass that's rendered like transparent geometry (after all opaque gbuffer/projected decals) pass. So - the quick answer is - that won't work until geom blend is done in forward. For the future plans - RTP4 will bring new geom blending options.

    Tom
     
  37. Curunir

    Curunir

    Joined:
    Nov 21, 2015
    Posts:
    16
    Good time of day, Tom
    I am have the couple of errors witch happends in ReliefTerrainEditor script end led to impossibillity to use script campabilities via inspector.

    First error reproduces if I open "Layers" in inspector:
    Line 590: tex = _target.Bumps[n];
    In inpector I get next behaviour:
    upload_2017-7-12_18-36-41.png

    Secound reproduces if I open "Coverage":
    Line 1676: Texture2D tex = _targetRT.source_controls[n];
    upload_2017-7-12_18-37-5.png

    Could you help me with fixing this errors? :c
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Most reliable fix would be removing ReliefTerrain script component and LOD manager from scene and reapply RTP script to terrain.

    Tom
     
  39. Darkmonk

    Darkmonk

    Joined:
    Nov 3, 2010
    Posts:
    47
    Hi, I seem to be having a strange issue with the indirect ligthing on my terrain, i have recently updated my project to 5.6.1 and i am using RTP3.3h. When I bake the indirect Global illumination and then change my scene view to show me the indirect lighting it only seems to have lit a small corner of the terrain, the albedo looks correct but indirect and directionality are both only displaying in the corner. is this correct ? or am i doing something worng? If you need anymore details please let me know. ive attached an image showing the effect RTP_Lighting.jpg
     
  40. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Easiest way to check if this is "a common behaviour" would be switching to Unity terrain shading and check again in scene view debug mode. If it spans over whole terrain might mean there's something wrong in RTP meta pass shading that I need to take a look.

    Tom
     
  41. Darkmonk

    Darkmonk

    Joined:
    Nov 3, 2010
    Posts:
    47
    Not sure i understand what you mean, how do i change it to use unity shading ? I have tried a new terrain object without RTP assigned and it did span accross the whole object.
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    If vanilla Unity terrain (w/o RTP) gives different debug output it might mean I need to take a closer look at this.

    Give me your RTP version (verinfo.txt file) Unity version and lightmap setup so I can try to reproduce the issue (if it is an issue).

    Tom
     
  43. Darkmonk

    Darkmonk

    Joined:
    Nov 3, 2010
    Posts:
    47
    cool thanks,
    RTP = 3.3h
    Unity = 5.6.1f
    Lightmap parameters = Default-VeryLowResolution

    Realtime lighting = On
    Mixed lighting = Off
    Indirect resolution = 1 Texels per unit
    Directional mode = Directional

    Everything else is default at the moment
     
  44. d0th3do

    d0th3do

    Joined:
    May 17, 2017
    Posts:
    2
    @tomaszek I can't find any information on this, but I am wondering if RTP supports Single-Pass Stereo Rendering. I was looking to purchase this pack for a Steam VR game that is currently using the Single-Pass Stereo Rendering feature and just need to know if it will work. Thanks.
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    I might check if I use uptodate matrix transformation macros or ol' good UNITY_MATRIX_MVP multiplication in vertex shaders. Anyway - making it compatible with single pass stereo rendering would not be difficult as far as Unity terrain rendering solution allows it.

    Tom
     
  46. d0th3do

    d0th3do

    Joined:
    May 17, 2017
    Posts:
    2
    That's great to hear, I am currently working on a large multi-mesh terrain that would need a mesh-based splat map solution and see you do support that and many other nice features. If you can find a definitive answer to this sometime this weekend it would be much appreciated and if I don't hear back regarding this issue I may purchase the package anyway and will let you know if I run into any issues, since you seem to be very active here and helpful in supporting your product.
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Sure you can cry 1 minute after you buy RTP. I'm here to help my customers the best I can :).

    Tom
     
  48. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    44
    Hi Tom,

    I hope you can help me with a problem I'm having with RTP when saving the height & normal maps. It was easier to make a short video showing the behaviour (below) than trying to explain it all in text.

    Thanks for any help on this! :)

    Best regards,
    Heinz

     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Using the same products (RTP/Unity) on my example scene I can't reproduce the issue. Can you check as well on my example scene with fresh RTP installation. Then compare what might be different with your setup and if GI is actually resolved wrong way? You can always place some colored static dummies here and there on the terrain and check if they add to terrain indirect lighting (for example big red box on the white textured terrain - check if terrain receives bounced red light, another test - make big white box and check if it receives light bounced from terrain - for example from grass area - should tint bounced light green).

    Here's the span I get for all kind of GI debug outputs:

    RTP_GI_LightmappingCheck.jpg
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,422
    Heitghmap/normalmap combined saved to files - I bet it's due to encoding texture after saving. Both combined normals and heightmaps are supposed to be RGBA linear. After saving Unity probably reimports them with changed behaviour - they get compressed/encoded wrong way, or - most probably - they get incorrect sRGB marking under import settings which make them gamma instead of linear. Check this out.

    For saving problem - it's kind of non serialized properties that are stored in scene when it's edited but those properties are not actually saved to any files after saving scene thus they got cleared. I'd suggest to make dedicated material (create new material asset) and attach ReliefTerrain-FirstPass shader to it. Then use this material on Unity terrain settings - custom material slot. By default RTP creates material for each terrain but this material is scene asset instead of being persistent/saved asset. This should help (together with saving _all_ textures - not only combined normals and heights but also perlin normals combined into "special combined" texture - so iterate thru all combined textures sub tabs in RTP and save whatever possible. Again - some sRGB inconsistency can occure (sorry I might miss it when Unity changed some texture reimport treatment in newest U2017). Also - check if reselecting terrain or using RefreshAll button (under RTP/Settings/Main subtab) explicitly helps. Ibeleive all above checks and tweaks should solve the problems you're facing.

    Best Regards, Tom

    P.S. Your interactive problem explanation via YT with extensive comments recorded is pure gold... (I wish every user might communicate such way, but this also would mean my resonses should beas perfect as yours which takes time... - so again I really appreciate the time you spent on recording it :) ).