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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    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:
    90
    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:
    90
    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:
    90
    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:
    90
    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:
    94
    @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:
    90
    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:
    94
    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:
    90
    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:
    94
    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:
    90
    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:
    90
    @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:
    94
    Nice!! It helped greatly, I just started today, but done a lot thanks to you!)
     
  13. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    59
    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:
    90
    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:
    90
    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:
    33
    @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:
    90
    It is one of the feature I'm considering to add, but still not sure about. :)