Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

InTerra ~ Terrain Features

Discussion in 'Assets and Asset Store' started by IneffabilisArcanum, Jun 17, 2021.

  1. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Update 3.2.0 is now available!

    Added Updated shaders for HDRP 2022.2
    Added
    Warning if the Shader Variant Limit is not set to needed value.
    Improved MeshRenderer finding for determining on which Terrain it is placed on.
     
  2. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Update 3.2.1 is now available!

    Fixed
    bug with One Layer selection for Object into Terrain Integration shader in HDRP
     
  3. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Sorry about forgeting to mention the 3.3.0 update...

    Optimized the updates for Objects Materials in editor and added the file InTerra_Setting (in Script folder for 2021.2.0f1 version or Data folder for the 2019.3.0f6) where you can disable all auto updates or specify it more closely.

    Added Tiling and Offset for Color Tint Terrain Texture.



    And now the Update 3.4.0 is available!

    Added Tessellation shaders for HDRP, currently as a beta feature.
    Added Setting of Mip Maps fading distance for Parallax Occlusion Mapping for improving performance (It can really help a lot).
    Improved / Changed The Object Normals blending intersection. Now it is calculated per pixel instead of per vertex, it may look slightly different, but now it can be adjusted far more precisely and it no longer affects the whole polygons and did not affect the Object parts as before.
     
    Quique-Martinez likes this.
  4. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Update 3.5.0 is now available!

    Fixed The problem with NaN for Object-Terrain normals blending for HDRP
    Optimized The updates for Objects Materials (Thanks to David E who gave me the tip via discord)

    Tessellation is out of beta!
     
  5. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    95
    @IneffabilisArcanum could it be used on custom mesh terrain, or is it only Unity Terrain? Especially curious for blending
     
  6. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Right now the asset is designed only for Unity Terrain, but I already helped one guy to make the blending work also for custom mesh, it require a few changes and you need to have the heightmap and control map (also called splat map or alpha map) for your custom mesh terrain and be using Unity Terrain Layers.
     
    Last edited: Feb 5, 2023
  7. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    95
    would be grateful if you point me in the right direction. We have heightmap and control map
     
  8. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Which pipeline are you using? Also, are you planning to use only one mesh terrain for the scene?
    The main trick is to copy the shader Object into Terrain Integration, and do a little changes in it (the shader shares a lot of code with terrain shader, but it is designed for meshes) and assign it a little changed terrain GUI and then it can be used for mesh terrain.
    And for the blending there is also need to adjust the InTerra_Data script.
     
  9. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    95
    HDRP. We have a lot of terrain meshes in scene, but we use one 4k heightmap for all of them sampled in world space. Same for control maps. The world is basically infinite and procedurally generated.

    Ok, will look into it.

    Great asset, by the way. At least from the first impression :)
     
  10. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    That sounds interesting, but very different from the other project I helped. :)
    It is great that you are using just one heightmap and control map though, then it will be easier and the InTerra_Data script could be simplified - maybe for now look just into this one script (in InTerra/Scripts folder) since everything the Materials needs for blending is sended from it.

    I will take time tomorrow to give you more insight about the possibilities of the mesh terrain shader.
     
    TimNedvyga likes this.
  11. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    @TimNedvyga
    I would recommend to try this first at demo scene, create there a plane and assign it the "Object into Terrain Integration" first, so the Terrain data will be loaded in Material (you can try to send it your mesh terrain data later) and then after copying the shader (the file is in InTerra/HDRP/Shaders folder and the name you will give the copied file will be also the name of the shader), open it and in the Graph Inspector/Graph setting there is almost at the end the Custom Editor GUI, you can change it to terrain editor (I will send you a little changed terrain GUI editor file into inbox with some comentary)
    Then you can find the Node with Custom Function "NormalAndHeight" you can replace the file of the function with the "InTerra_TerrainMesh" that I will also send you into inbox - basically, there will be no calculations that are needed for Object blending and there is added definition of INTERRA_TERRAIN_MESH keyword, which will be needed for the file InTerra_SplatmapMix (also in InTerra/HDRP/Shaders folder) to avoid another unnecesery calculation, so if you will open the file, go to line 153 and change it from

    #ifdef INTERRA_OBJECT
    to

    #if defined(INTERRA_OBJECT) && !defined(INTERRA_TERRAIN_MESH)

    and then change the line 207

    mixedAlbedo = mixedDiffuse.rgb;
    to

    #ifdef INTERRA_TERRAIN_MESH
    albedo = mixedDiffuse.rgb;
    #else
    mixedAlbedo = mixedDiffuse.rgb;
    #endif


    This should be the basic for the shader part, but there may still be need to fix some minor things...
     
  12. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    95
    Nice!! It helped greatly, I just started today, but done a lot thanks to you!)
     
  13. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    Hello, Ive bought the asset and imported it fine into unity 2023.1 beta. However, my terrain doesnt seem to be lit properly, as it is always very dark. The terrain looks normal if I use the basic terrain lit material from HDRP. Any ideas? Shader variants set to 1538 already.

    upload_2023-2-17_14-10-13.png
     
  14. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Hi!
    It is because Unity changed one shader keyword for lighting in 2023.1, the updated shaders should be in the next InTerra update.
    But for now I can send you a small unofficial package into the inbox that will add just the Terrain shaders for 2023.1 that seems to be already working fine, so you can try.
     
  15. JernejCundric

    JernejCundric

    Joined:
    Apr 4, 2018
    Posts:
    3
    I'm planning to buy this asset, looks promising for HDRP. Will there be an Android version for URP (OGL3 or Vulkan) running on mobile and/or VR?
     
  16. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Hi!
    Originally the support for URP Android was planned, but there are some issues that I did not find a workaround so far... I'm planning to look into it further, but cannot promise anything right now...
    I think there should not be a problem with URP/VR on Windows, but I still need to do some testing :)
     
  17. JernejCundric

    JernejCundric

    Joined:
    Apr 4, 2018
    Posts:
    3
    Thanks, for a quick answer, I went through the thread and saw that URP on Android is complicated. I was thinking about mobile VR, so mostly Android - i know it's computationally intensive and it might not work because of performance reasons... Unity is working on Terrain system for mobile, maybe this will change things.
     
  18. Jack_Martison

    Jack_Martison

    Joined:
    Jun 24, 2018
    Posts:
    102
    @IneffabilisArcanum I'm curious about tessellation, if something like this is already added, can we expect similar thingy like TraX from microsplat?
     
  19. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    It is one of the feature I'm considering to add, but still not sure about. :)
     
  20. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    38
    I'm having 4 last layers (I think its last ones, atleast one of them is) drawn as black/empty texture on terrain when building for Windows PC. Works fine in the editor itself. Is this a known issue, or I might be doing something wrong? Works fine with my triplanar shadergraph in build.
     
  21. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Hi!
    I'm not aware someone else would have the exact same problem, but once there was a problem with some Terrain Layer because the person was previously using Microsplat and it probably changed some hidden setting, but when the Layer was created as new, everything worked.
    Or something similar happens if you are using "Normal map in Mask map" Terrain feature, but do not have the proper Mask map that includes the Normal map, but in such case it happens also in the editor...
    Also, if you are using URP or HDRP, Unity sometimes does not import shaders properly and it helps to right click the URP/Shaders or HDRP/Shaders folder and click on Reimport.
    But if you think you did everything right, but it is still not working, then maybe if it would be possible to send me just the problematic Terrain Layer I would check it out...
     
  22. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    38
    yeah we did try using microsplat previously and it's still in plugins folder. can't exactly tell if it was on these layers. using 2023.1.0b10 unity version.

    in build:
    upload_2023-4-3_11-52-15.png

    In Editor:

    upload_2023-4-3_11-52-31.png

    Reimported all layers, and shaders. Created a new snow layer to test.
    It does indeed seem to be a problem of last 4 layers in the terrain, not the layers themselves. They are just not drawn. Could it be a beta unity version? did you try it out on the beta version?
     
  23. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    I'm actually working on the InTerra update where there will be the shaders for 2023.1 Unity version, since there are some changes in shader Keywords, so far I noticed only the one related to lighting, but if you are using HDRP with eight Layers, maybe Unity changed something related to the "eight Layers" Keyword too, in which case only first four Layers would work... I will check it out...
     
  24. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    38
    alright, will wait for the update, because I can't seem to figure out the cause by myself :)
     
  25. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    I was experimenting for a while, but cannot reproduce the error so far... I wonder if you would reproduce the error if you would start a new project just with InTerra imported and just quickly created new random Layers, or Layers with your textures and add them to demo scene, but I do not want to make you lose your time, but just in case you don't mind, it would be helpful information.
    By the way, are you using the "Normal map in Mask map" Terrain feature? And is my assumption correct and you are using HDRP?
     
  26. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    38
    Yes I use HDRP, the project is massive so something else could be causing this. Not using normal map in mask map. Will do some testing later in an empty project.
     
  27. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Update 3.6.0 is now available!

    Added Updated shaders for HDRP 2023.1
    Added
    Tool for managing Materials for multiple Terrains, currently as beta.
    Fixed The Normal map in Mask map bug in HDRP

    Note: I spent a lot of time trying to find out better solution for blending with multiple Terrains, but especially with SRP Batcher (https://docs.unity3d.com/Manual/SRPBatcher.html) the current solution is the best so far.
     
  28. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    38
    made this quick tool for terrain objects. basically clones existing materials by creating their variant and adds it to its own terain. not sure if this is what the update gives.
     

    Attached Files:

  29. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Yes, something like that, but since in the older Unity version the "material.parent" does not exist it was a little bit more complicated (and since I'm kind of paranoid when there is some creating/deleting assets files I rather released it as beta for now)... but with "material.parent" it may be better for you to just use your solution anyway.

    By the way, did you already find out what is going on with those last four Layers in built? I still do not have an idea what could cause the issue...
     
  30. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    38
    no didn't have time to take a look at it yet, will try new builds soon.
     
  31. FrodoUndead

    FrodoUndead

    Joined:
    Aug 30, 2018
    Posts:
    2
    Hello,
    I have a few questions about this asset before I bite the bullet and make a purchase any help would be greatly appreciated.

    1.) I currently have ~25 terrain texture layers for my unity terrain. Anytime that I have more that 4 layers on top of each other for blending, a white color starts to show through due to the 4 layer limit with default terrains. Will this asset stop that from happening? If so, is this by increasing the texture limit or by using heightmap based rendering?

    2.) Does this asset support Triplanar shading with GPU Instancing enabled on the terrain? Does this asset support terrain holes while Triplanar shading is enabled?

    3.) Does this asset have a limit for the total number of layers that can be used? I have bought terrain shader assets in the past that allow for ONLY 8 layers in total.

    4.) does this asset require that a specific color space be used? (Gamma or Linear)

    My project is using the Built-In render pipeline.

    Sorry for all of the questions. I just want to be sure that this asset will work for everything I need before I make another terrain shader purchase that I ultimately have to abandon for one reason or another. Thank you in advance to anyone that can answer any of the questions for me.
     
  32. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Hi!

    1.) I actually never tried that many layers, but I'm afraid that since the InTerra shaders are based on the Unity default shaders the issue will be also there... even if I'm not quite sure about the white color problem if there are more than four Layers.

    2.) Yes, Terrain holes and also triplanar with GPU Instancing enabled is supported, but the triplanar is working only with the first four Layers, the limitation could be turned off by adjusting shader Keywords, but 25 Terrain Layers with triplanar mapping would be killing the performance.
    There is actually also limitation of four Layers for heightmap Layers blending, because it is problematic to do it across different passes, that is why Unity also does support it only for four Layers in URP.

    3.) The maximum number of Terrain Layers is the same as for Unity Terrain shader.

    4.) No need for specific color space.

    It is ok to ask questions, so no need for sorry. :)
     
    FrodoUndead likes this.
  33. FrodoUndead

    FrodoUndead

    Joined:
    Aug 30, 2018
    Posts:
    2
    Thank you so much for the fast reply! I've been having soooo many issues with my terrain and it's keeping me from completing my game. I'm really hoping your asset is a proper solution for me. I'll have to give it a deeper dive later this week. Thanks again for your help!
     
  34. pixelmonk

    pixelmonk

    Joined:
    May 25, 2011
    Posts:
    11
    Hello. I just purchased Interra and imported into Unity 2021.3.5f1. The "Object into Terrain Integration" URP shader is missing. Tried re-importing several times. Shader Variant Limit to 1152. MissingShader01.jpg MissingShader02.jpg
     
  35. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Hi!
    It looks very unusual, but you can try to open the shader graph file InTerra/URP/Shaders/Object into Terrain Integration and then click on "Save Asset" in the top left corner.
     
  36. pixelmonk

    pixelmonk

    Joined:
    May 25, 2011
    Posts:
    11
    Clicking "Save Asset" in the shader graph file fixed it. The shader is no longer missing. Thanks for your help!

    However, even though the shader seems to be working I am getting a warning in the shader graph that the Variant limit is exceeded, even though I've set the variant limit per the instructions. VariantLimitError.jpg
     
  37. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    It never happened to me like that as far as I can remember, if the limit was exceeded the shader didn't work at all. I wonder if there can be some bug in Unity related to checking the variant limit, but it is no problem to raise the limit, so you can try it.
    I will try to reproduce it in the Unity 2021.3.5f1 version.
    And sorry for the inconvenience.
     
  38. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    I was looking at it and it seems like there was some changes in Unity newer versions and the shader variant limit should be at least 1538 for 2021.3.5f1 version.
     
  39. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    A small update 3.7.1 is now available!

    Fixed bug with detail texture samplers in URP .
    Fixed problem with precomputed velocity in HDRP.
    Improved / Changed part of the code to make selecting of the Objects more responsive in some cases.
     
  40. GoldenZen

    GoldenZen

    Joined:
    Dec 15, 2021
    Posts:
    7
    Hello there!
    Thank you for the work put into this asset. I really love the concept and some of the results. However I'm finding myself in some situations where the objects into terrain function yields blocky results (as can be seen in the picture).
    I'm using Unity v. 2022.3.4f (HDRP)

    Is there a fix for this?

    Thank you and keep up the great work
     

    Attached Files:

  41. IneffabilisArcanum

    IneffabilisArcanum

    Joined:
    Jun 1, 2020
    Posts:
    103
    Hi!

    Nice to hear you like InTerra.

    You can check the Triplanar Mapping in your Material setting, or just try to increase the Distortion (by Albedo), in case you want it to be more performant, but not so nice...
    Also, make sure your Heightmaps (blue channel) in Mask maps for Object and for Terrain Layer are correct.