Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    54
    Thanks for the reply I appreciate it. If I might ask one more question. In my build reports I'm seeing what looks like 2x loading of the terrain textures. The game seems to be loading both the atlas textures from RTP, as well as the source texture sets (8). Is it possible Unity terrain is still referencing the individual textures?

     
  2. Darkmonk

    Darkmonk

    Joined:
    Nov 3, 2010
    Posts:
    50
    Hi,
    I have just upgraded our project from Unity 5.6.1f1 (64-bit) to Unity 2017.3.0f3 (64-bit) . Everything looks like its working and setup the same as the previous version however when i do a RealtimeGI bake and then try to view the baked information in the RealtimeGI Shading Mode I get a couple of different errors and the terrain displays as black so i dont believe it has any lighting information. The other objects in the scene light correctly. In the older version of unity this all worked correctly and i could see the lighting information.
    The errors are :-
    - SetPixels32 called with invalid number of pixels in the array
    - Texture rectangle is out of bounds

    This also happens when i try to baking lighting in your demo scene "TerrainScene" RTP_LightingIssues.jpg
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Ouch, seems like some values are lost after upgrade which causes RTP editor to throw this exception hence parameters are not applied correctly. Upgrading RTP is best to use presets which can store and share parameters before/after upgrade. I hope you still have backup to do it? Otherwise it would might be necessary to reapply RTP on your terrains (remove ReliefTerrain from all terrain objects and apply RTP again).

    I'm wondering which array is out of bounds here.

    Code (csharp):
    1. SplatPrototype[] splatPrototypes=new SplatPrototype[globalSettingsHolder.numLayers];
    it's array we're pushing data to (Unity terrain sctructure)

    while this is line where we access bumps in global settings holder object:
    Code (csharp):
    1. splatPrototypes[i].normalMap=globalSettingsHolder.Bumps[i];
    Can you check it in debugger wheter globalSettingsHolder.numLayers is not correct or globalSettingsHolder.Bumps size is invalid? Is global settings holder object saved and restored correctly in AssetBundle? It's scene object, not an asset that's why I'm wondering if saving to AssetBundle doesn't break this reference (and globalSettingsHolder itself).

    wireframe is something that's Unity reference only (Unity uses input mesh). Black plane is rendered one. Have you attached tessellation height&normals texture to ReliefTerrain object (Globalmaps section)? Texture must be linear (sRGB not checked). If terrain is black - there might be multiple reasons. Some textures not (re)created (like atlas), missing script on light (refer to my example scene) in deferred. Shaders not recompiled in LOD manager.

    In editor source texture references are stored. In build There is ClearAuxTextureReferences script that works to postprocess assets - it clears references to source texture in my scripts so that they theoretically shouldn't be included in build. Still Unity terrain engine holds references in terrain object. The way to workaround might be replacing these references with some dummy textures at build stage. I'm wondering though about detail heightmaps - they are not referenced by Unity, so there must be other reason. You could place some Debug.Log() in my clear references script to check if they are actually called when making a build. These textures are stored in ReliefTerrainGlobalSettingsHolder which is shared between terrains (ReliefTerrain) within group (which is terrain at the same hierarchy level with ReliefTerrain script attached). It's just a trace you could check (is it possible any orphant ReliefTerrainGlobalSettingsHolder is referenced somewhere in your code and not affected by texture reference clearing in your build?).

    I can reproduce the issue but it seems to not be realted to RTP. When I removed RTP script from terrain (example scene), changed shader used to default the problem is still there. Most probably must be something wrong with lightmapper for terrain objects. I can not even locate the origination of error logged in the console. It's internal Unity one.

    Tom
     
  4. fisherman_b

    fisherman_b

    Joined:
    Dec 18, 2014
    Posts:
    28
    Hello Tom,

    thanks for your reply.
    Let's forget about the plane being black for now, I think I got this solved in the meantime. The real problem is the fact that there is a converted mesh displayed as a wireframe with all the height information and another flat plane being rendered with the textures but it's far above the mesh and it's flat, heights are missing.

    I used the same height & normals texture on the mesh for tessellation that I used on the terrain before the terrain-to-mesh conversion. I did not change any parameter. It worked with the terrain, but not with the mesh. My idea was that it may be related to adjusting heights by 0.1 or 0.2 on the terrain to be able to form some rivers etc. Will this lead to issues during or after the conversion to mesh?

    Cheers,
    Bernhard
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Checked it again on my eample scene and it seems to work (with original mesh I have set valid displacement height and offset values - you can check this recompiling shader in LOD manager with 8 layers and tessellation turned on). Did it using U5.5.0. I also checked it with simply a plane mesh - the only thing was to manage displacement and offset so that it fits original terrain. Take into account that you need to take care about collider yourself (to match displayed terrain) - whenever you use terrain collider or mesh one.

    For tessellation displacement itself - it works the way it just skip world y coordinate and takes it from texture (scaling/offseting by value). On my example scene I use mesh as collider and reference and it fits the case when somebody (low end GPU) don't afford tessellation (or it's incompatible like for DX10 GPUs). You can use any mesh and refine it with tessellation. Using completely flat one could give problems with refinement on close distance though. So it's advised to have some low-poly terrain mesh (but outlining the overall shape of terrain) then apply tessellation on the top of it. Workflow might be - make terrain (hi-res heightmap) - export it to obj, decimate/optimize in modelling tool, then import back as base mesh for tessellation.

    Tom
     
  6. Saevax

    Saevax

    Joined:
    Nov 3, 2012
    Posts:
    58
    numLayers = 4
    Bumps = UnityEngine.Texture2D[0]
    Heights = UnityEngine.Texture2D[0]

    I'm not sure if it's saved correctly. I load the preset on a terrain, save the scene, then build the scene into an assetbundle.
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    I assume ClearAuxTextureReferences script from RTP is called while building AssetBundle. This is meant to not include source textures into build while they are not used anymore by RTP shader. The line that throws the error is meant to sync terrain detial normalmap array with Unity terrain object which is helpful only in editor. I haven't excluded it from script using #if UNITY_EDITOR that can indeed break it. Can you check if commenting it out (this line of code and accessing Bumps[] array is only for editor convinience) sovles your problem?

    Tom
     
  8. Saevax

    Saevax

    Joined:
    Nov 3, 2012
    Posts:
    58
    Apologies for my delayed response.

    When I comment out that line everything appears to work and look correctly when I build the player. Thank you for your help!
     
  9. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,320
    Hello,

    Is there a way to use a splatmap or overall texture map within RTP itself? Or is that something outside of RTP? I have a splatmap I generated with World Machine. If you can use one with RTP where would I use the overall splatmap (and the overall normal map) -- like which tab or setting within RTP? Thanks for any info.
     
  10. briank

    briank

    Joined:
    Mar 25, 2017
    Posts:
    67
    RTP is exploding my scene size. I tracked down a line in the .scene file which is many megabytes worth of "_typelessdata". It looks related to a texture but I'm not sure which one.

    Anyone else ran into this?

    I'm also storing scene files as text so they can be revisioned in github. The problem is that the scene file has gone from 2MB to 100MB so it exceeds GitHub's file size limit. :(

    EDIT: I think some of these textures are related to splat maps. It is still unclear. I can't rid my scene of all these embedded textures (I've found 5 in total) as visible artifacts do start to pop up (terrain normals are broken by removing one of these textures). Luckily I was able to remove the big textures without noticing any visible draw back so my scene file is now down to 15MB instead of 100MB. Getting rid of the all embedded textures gets the scene down to 2MB which is where I'd like it to be ultimately.

    Unity version: 2017.3.1f1
     
    Last edited: Mar 4, 2018
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    If you provide single splamaps in grayscale from WM you can combine them right in RTP (Coverge tab), Refer to my pdf doc. Overall texture/normalmap - I'm not sure if I get it right - there is one global color/global normal map available to be spanned over terrain in RTP.

    RTP uses bit different textures for editing and shading. Detail normalmaps and heightmaps are only referenced in editor. They are them merged in pairs (normals) or quads(heights). To reduce scene size you first need to save all such combined textures (refer to combined textures tab). Combined textures can be reused between different terrains/scenes then, If you use atlas then detail color textures are also not used for rendering. Still - Unity terrain refers to them and you actualkly can't remove them w/o breaking terrain rendering. You could replace them with some proxy dummies (like 2x2 white textures) from script when you make build - asset postprocessors are then called. One of my scripts ClearAuxTerrainTextures.cs does similar job - removes references to textures not used for rendering when making the build.

    Tom
     
  12. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Hi
    Why far distance start circle is so obvious?
     

    Attached Files:

  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    First check if it really is. It's very frequent that shadow cascade split forms such border. Then you could check overlapping distances (near, far in RTP) and normalmaps that most often causes it (likesome simplified rendering set faraway in LOD manager).

    Tom
     
    ksam2 likes this.
  14. Amfu

    Amfu

    Joined:
    Apr 9, 2013
    Posts:
    180
    Hi Tom,

    How can I make a mesh semi-transparent with RTP3?
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Such feature is not included. You would need to tweak shaders code (ReliefTerrain-FirstPass.shader, ReliefTerrain-AddPass.shader ReliefTerrain-FarOnly.shader)

    Tom
     
  16. Amfu

    Amfu

    Joined:
    Apr 9, 2013
    Posts:
    180
    Thanks for your reply.
    That's what I was thinking.

    I'm not very good at coding shaders... Could you give me some tips to start with (like, where approximately in the code should I make some changes, and what kind of changes)?

    I hope this is not too complicated.
     
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Google for surface shaders examples and transparent directives (alpha:fade). Starting point:

    https://docs.unity3d.com/Manual/SL-SurfaceShaders.html

    Tom
     
  18. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Don't know why but none of them worked, still looks like below pic.
     

    Attached Files:

    • D.png
      D.png
      File size:
      647.1 KB
      Views:
      426
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    From this perspective it looks like ranges set in RTP. Beyond the edge we have perlin noise applied while we have it not upclose. Try to set close distance (RTP/Settings/Main) starting from 0 and set sensible fade length. In Settings/Perlin normal set starting from 0 as well (with some higher range). At least increase fade length in perlin settings.

    Tom
     
    ksam2 likes this.
  20. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Now I have a more weird issue I wasn't able to fix in any way.
    What is this square?
     

    Attached Files:

    Last edited: Mar 8, 2018
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    The square means upclose terrain chunk is rendered with not matching different variant. Can you tell that this is the issue on RTP example scene when you instell RTP on fresh project? My blind guess it must be something very specific to your RTP setup (LOD manager, scene?)

    Tom
     
  22. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Hi @tomaszek , I asked about wet look for the edges of water a week or so ago and it must of been missed. Any advice or docs on doing this?

    It's like the opposite use case of the wet mask because I want an area (height around a metre or two above my shoreline to stay wet and even flow water down to it if possible.

    Any suggestions?
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Can't you do it like we did on Island Demo? Used wetmask around shoreline and controlled water level per layer (sand). It was taken from world Y position of invisible object floating over the ocean surface. Notice that water level is also influenced by caustics (which prevents water to flow and being glossy below ocean level). Another trick might be inverting global wetness ranging. Now threshold says where water starts and will be present higher (to emulate lava flowing down). To control water level the way it appears at threshold and is present below you might need to tweak shader code. In RTP_Base.cginc and RTP_AddBase.cginc you could find this line:

    Code (csharp):
    1. float wet_height_fct=saturate((TERRAIN_WetHeight_Treshold - IN.worldPos.y - TERRAIN_WetHeight_Transition*0.5)/TERRAIN_WetHeight_Transition);
    and replace with inverted range:

    Code (csharp):
    1. float wet_height_fct=1-saturate((TERRAIN_WetHeight_Treshold - IN.worldPos.y - TERRAIN_WetHeight_Transition*0.5)/TERRAIN_WetHeight_Transition);
    Tom
     
    AndyNeoman likes this.
  24. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    872
    Thanks Tom, I will take another look at the Island demo.
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    "Island Demo" I mean showcase video, not example scene. You can see how things can work though.

    Tom
     
    AndyNeoman likes this.
  26. _Matt_

    _Matt_

    Joined:
    Aug 21, 2014
    Posts:
    1
    Hi Tom,

    I tried some terrain shader assets and RTP is my favorite, easy to use with good performance and beautiful rendering.

    I have a question about Tessellation rendering, i tried to use it with "displace detail heightmaps" checked and set LOD level to "Simple" (i wanted only tessellation without POM shading) and the textures seems strecthed when Global normal strength is greater than 0 (see image below) :

    [OK] POM Shading + Global Normal strength to 2
    RTPIssue_POM.png
    [OK] Simple Shading + Global Normal strength to 0 + displace detail heightmaps
    RTPIssue_Tesselation01.png
    Simple Shading + Global Normal strength to 2 + displace detail heightmaps
    RTPIssue_Tesselation02.png
    Textures seems to be projected (world coordinate).
    Is there a fix or does not RTP support Tessellation + Global Normal map ?

    Matt
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Things are generaly meant to be extruded along surface normals. That's why changing global normal strength tilt it from upward direction to horizontal. In using tessellation (displacing detail heightmaps) does it as well while textures are projected top-down (xz plane). That's what you probably find as an issue. Yes - for higher displacement values such discrepancy might be an disturbing. I would rather suggest to not use tessellation with detail displacement. To get good resolution we need to subdivide mesh a ton which adversely impacts the performance. So - maybe use POM over tessellated terrain (w/o detail displacement). It doesn't produce correct silhouettes and for higher displacements can produce some artifacts but it's a lot more performance-wise.

    Tom
     
  28. andy-tache

    andy-tache

    Joined:
    Jan 10, 2013
    Posts:
    5
    Hi.

    I've been using your Relief Terrain for a while successfully but then upgraded to 2017.3.

    In 2017.3.1f1 PRO, I see the scene as it should be in the editor (attached screenshot), but when I build my game, the textures are all white, except for one texture, which renders properly (also, attached screenshot).

    Any leads to why this may be?
     

    Attached Files:

  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    This stone pavement is terrain layer or added via geom blend? I can also see that terrain textures at distance seem to be correctly displayed. That's the wierd issue indeed.Could you provide me with your exact setup (LOD manager). How many layers do you use (I assume 8). Lighting path used. You could try to narrow down the issue to a feature (like trying simple terrain setup if it beaves the same). Also you could try to newest RTP installation that brings some fixes. We might try to reproduce the issue on example scene first.

    If it can't be solved I'd probably need test build from you to catch a frame in RenderDoc and analyse RTP input shader parameters. Although I'm gonna to GDC for the whole next week so it will introduce some lags in responses form my side.

    ATB, Tom
     
  30. andy-tache

    andy-tache

    Joined:
    Jan 10, 2013
    Posts:
    5
    I'm using the following settings:

    POM
    Use 8 layers
    POM Soft Shadows (Layers1-4+4-8)
    UV Blend (Layers1-4+4-8)
    Global color blend multipractive
    Dynamic Snow (Layers1-4+4-8)
    Water (Layers1-4+4-8)
    Heightblend AO (Layers1-4+4-8)
    SuperDetail (Layers1-4+4-8)
    CrossPass heightblend

    however, I tried 4 layers (2 passes) and also tried removing all settings except for the basics (UV Blend and Global Color only), as well as PM instead of POM Soft Shadows. I also noticed that the atlas was not saved to disk so I saved rebaked the textures, and even created a new scene with the default RTP settings. In all cases, the terrain textures were all white...
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    I will try to address the issue as soon as Im back from gdc next week

    Tom
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    I'm not able to reproduce the issue (using newest RTP installaton) - I made a build from example scene both using atlas and w/o it. Can you check it as well - I mean RTP example scene with all settings the same as in your project (camera path, lighting, etc.). You might be able to determine what makes the difference within your project.

    Tom
     
  33. osmondmcleod

    osmondmcleod

    Joined:
    Jan 6, 2016
    Posts:
    5
    Hi Tom,
    We are getting white terrain with deferred lighting.

    I found this:

    What is the RTP version do you use ? (look at verinfo.txt file included). In deferred you need to add script to main directional light. As I see your closeup terrain isn't white mean you've got more than 4 layers used but rendered in 2 passes. In Deferreduse "8 layers" mode in LOD manager so that all layers (8 exactly) are rendered in one pass otherwise problems with specularity might occur.

    Tom

    Can you advise the script that needs to be added to the camera?
     
  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Look at RTP example scene and main directional light - this is the script I mentioned. And this is right - in deferred lighting when you use 8 layers you need to render them in single pass (using atlas and "8 layers" mode set in LOD manager for first pass).

    Happy Easter, to those of you who celebrate it!

    ATB, Tom
     
  35. osmondmcleod

    osmondmcleod

    Joined:
    Jan 6, 2016
    Posts:
    5
    We are only using 4 layers. So is it just a matter of adding the script to the directional light?
     
  36. gvince

    gvince

    Joined:
    Sep 22, 2017
    Posts:
    3
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Please place again exact Unity version against exact RTP (look at verinfo.txt file attached to my package and give me contents) so I can to reproduce the issue. Try download latest RTP from AssetStore.

    Tom

    P.S. What's 2018.3.1b11 ?
     
  38. gvince

    gvince

    Joined:
    Sep 22, 2017
    Posts:
    3
    Sorry, that was a typo, I meant 2018.1.0b11. I'm using the
    3.3l version from the asset store.

    RTP3.3l for U5.5 & U5.6 & U2017 (U2018.1.0b6 checked)


    RTP works with all Unity 2018.1 versions up to the 2018.1.0b10. But with the versions starting with the 2018.1.0b11, it throws the following shader compilation error :

    Shader error in 'Hidden/Relief Pack/ReliefTerrain2GeometryBlendBase': 'tex2D': no matching 4 parameter intrinsic function; Possible intrinsic functions are: tex2D(sampler2D, float2|half2|min10float2|min16float2) tex2D(sampler2D, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2) at Assets/ReliefPack/Shaders/CustomLighting.cginc(97) (on d3d11)
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    OK, I'll look into this and get back to you ASAP.
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,732

    I just had to fix this for MicroSplat- basically, Unity changed the compiler under the hood, and changed the defines around, and I suspect triggered the same issue in your code. I am assuming that you had to define your own samplers for tex.SampleLevel that use a shared texture sampler? If so, this is what seems to work for me:

    Code (CSharp):
    1.       #if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER) && UNITY_VERSION >= 201810)
    2.          #define MICROSPLAT_SAMPLE_TEX2D_LOD(tex,coord, lod) tex.SampleLevel (sampler##tex,coord, lod)
    3.          #define MICROSPLAT_SAMPLE_TEX2D_SAMPLER_LOD(tex,samplertex,coord, lod) tex.SampleLevel (sampler##samplertex,coord, lod)
    4.       #else
    5.          #define MICROSPLAT_SAMPLE_TEX2D_LOD(tex,coord,lod) tex2D (tex,coord,0,lod)
    6.          #define MICROSPLAT_SAMPLE_TEX2D_SAMPLER_LOD(tex,samplertex,coord,lod) tex2D (tex,coord,0,lod)
    7.       #endif
    Note the new Mojo shader stuff in the defines..
     
    sharkapps and hopeful like this.
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Indeed split shaders macro wasn't defined due to compiler changes (thanks Jason!). So if you need immediate fix for this, please open VS and look for all occurences of such code:

    Code (csharp):
    1.  
    2. #if UNITY_VERSION >= 560
    3.  
    Below matching #endif (9 lines below) you can add this:

    Code (csharp):
    1.  
    2. #if !defined(UNITY_USING_SPLIT_SAMPLERS) && (defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER) && UNITY_VERSION >= 201810))
    3.    #define UNITY_USING_SPLIT_SAMPLERS
    4. #endif
    5.  
    There are a few occurences in shaders and .cginc files.

    files_to_fixRTP.JPG

    Save it and reimport shaders folder to recompile. Should work.

    Tom
     
    emmettjnr likes this.
  42. Chris-Crafty

    Chris-Crafty

    Joined:
    May 7, 2013
    Posts:
    27
    Hello tom, I have a strange problem building with UBER shader. I have quite a large, ancient project that I wanted to rebuild in Unity 2017.1.3f1. It works fine and builds on a machine with Windows 10 64 bit german with 16 GB RAM and a GTX 970, but it consistently crashes on a Windows 64 bit english with 8 GB RAM and a GTX 960. Both have the same drivers, both have the same Unity Version and both have definitely the same project. This is what happens just before the crash:
    I tried excluding UBER_PostProcessModelForPOM.cs as a test, but then the build won't go through (as opposed to the import, I don't even get to building at the moment). FYI, I only use UBER on very specific and rare occasions in the game. If you need the whole build log, just let me know. What I find strange is really that this doesn't happen on another machine, and that a 4GB "wall" shouldn't exist in 64 bit.

    Any ideas would be greatly appreciated, thank you!
     
  43. gvince

    gvince

    Joined:
    Sep 22, 2017
    Posts:
    3
    Thanks Tomasz, I'll try the fix tommorrow and report back here!
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    What's the UBER version? Ancient one might not work with Unity2017.1. It has something to do with RAM, but not sure if with UBER. Although very first UBER versions on early Unity5 consumed a lot of RAM while compiling shaders (for build Unity also might attempt to recompile all possible shader variants, not only currently used in scenes). Excluding script from build - if you don't use POM stuff with depth writes you might even remove this script in case you only use some core UBER features (even POM, but not precise/silhouette ones).

    Tom

    P.S. Please, post it on my UBER thread instead
    https://forum.unity.com/threads/uber-standard-shader-ultra.335493/page-34
     
  45. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    882
    Hey there @tomaszek , I had a question about your asset. I see that it has something for making underground environments. Is that particular features something that makes that section of terrain exclusive to your terrain shader or is it possible to make underground environments while still using another terrain shader?

    --- Edit, my apologies, I thought there was an actual tool for "digging" and creating/forming the caves.
     
    Last edited: May 2, 2018
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    As UBER is on Madness Sale - it's the best way to get UBER+RTP very cheap now (for some time crossgrade to RTP is for $15 only).

    Tom
     
  47. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    199
    Sorry to bother but I can't find infos on how to set Multi-Terrain.
    I've a pretty simple 5x5 terrains with math ad stuff. But how to tell it to RTP?
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,747
    Basically - you don't need to do anything apart from applying ReliefTerrain script component to your 25 terrains - the RTP script checks for its instances in scene and automatically shares settings needed (all detail textures for example). Some properties stay per terrain only (like terrain global normalmap or colormap) which is logical. Sometimes you would need to separate a terrain in scene from others completely (other set of detail textures for example). You use so grouping for this - put such "separate" terrain as a child in different transform. Your case seems to be the opposite though.

    Have you taken a look at the video below?



    This explains multiple terrain setup on example of 4 terrains. Some details might be different as tutorial was done on eralier version of RTP, but general principles stay the same.

    Tom
     
    MaximilianPs likes this.
  49. sh_code

    sh_code

    Joined:
    Apr 8, 2015
    Posts:
    11
    hello, @tomaszek , i have a question: how would I go about adding Stencil masking into the 2-sided/Core , so that it works correctly with Unity's UI masking?
    (simplest use-case: if I use the uber shader for items in a Scrollview)

    thank you for any advice
    P.S. I know very little about HLSL, ShaderLab, and... any of graphics programming, basically.
    (But I'm willing to learn! :) )
     
    Last edited: May 7, 2018
  50. needles

    needles

    Joined:
    Feb 24, 2013
    Posts:
    5
    I can't find documentation for using Substances. Material is set to RAW like it should, but generated textures are broken. Normal map is pink, none of textures have alpha channel.

    Edit. I don't think it is substance, it looks fine when just dropped in geometry

     
    Last edited: May 8, 2018