Search Unity

► Terrain to Mesh ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Oct 1, 2015.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    It looks like you are using very old (and now not supported) version. Update to the latest version.
     
    Last edited: May 15, 2023
  2. Jonathan_Shaller

    Jonathan_Shaller

    Joined:
    May 9, 2023
    Posts:
    1
    Is it possible "not" to rotate any of the detail objects upon export?
    I created a scene using the basic Unity prop painting and sculpting tools.
    I painted both massive enviroment objects and tiny detail objects. "Quixel Props".
    Once placed. The terrain has been artisiticly sculpted around the props to embedd them convincingly.
    Things are exacctly as I want them.

    Once I got the Amazing converter.
    I see that massive objects are considered detail.
    They rotate upon export no matter what.
    0 will uniformly set them all to the original state.
    And of course 360 and random are also all rotations.

    Can they just not move?

    Many thanks.
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    I will check.
     
    Last edited: Jun 1, 2023
  4. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Hello, I seem to be having an issue with the packages shaders. This happened after I foolishly moved around the folders in my hierarchy but I can't seem to fix it despite undoing my adjustments. I have attempted deleted everything regarding the package, reinstalling, and reimporting to no avail.

    The error I am facing is: Shader error in 'Amazing Asssets/Terrain To Mesh/Splatmap': Couldn't open include file 'Splatmap.cginc'. at line 738

    If I could receive any assistance it would be greatly appreciated! upload_2023-5-30_21-21-11.png
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Try recompile Splatmap shaders as described in the Manual file.
     
    Jacob_Andrews likes this.
  6. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Hello, thank you for the quick reply!

    Unfortunately, the recompilation steps provided in the manual did not seem to resolve the issue. Here is some additional information:

    Unity Version: 2021.3.17f
    Using URP
    The package was working perfectly before I made the mistake of rearranging my project files. Never doing that again :(. I attempted to undo the rearrangement to the best of my ability but may have missed a thing or two.

    a better screenshot of the error:

    upload_2023-5-31_10-55-0.png
     
  7. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Hello,

    After doing some testing, it seems like removing the normal maps from each of the terrain textures makes it render properly. That being said, the error is still present in the console. Is there a reason this would happen?
     
    Last edited: May 31, 2023
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Amazing Assets/Terrain To Mesh folder can be moved to any location inside project. It is not mandatory to have it in the main Assets folder. Just keep original Amazing Assets folders hierarchy.

    Your error only indicates that shader cannot find Splatmap.cginc file. Make sure it is inside Amazing Assets/Terrain To Mesh/Shaders folder.


    Try, delete projects Library folder. This fill force full project reimport and recompile.
     
  9. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19

    Hi there, I can confirm that the Splatmap.cginc file is in the folder. Would there be a specific reason why it isn't being detected. I am a bit paranoid that deleting the library folder may harm my project which I've sunk a couple months into.
     
    Last edited: Jun 1, 2023
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Not sure what has gone wrong when you rearranging project files and then restored them. Looks like something has messed up. References has been lost or incorrect paths are used now.
    Removing TTM and re-importing should have fixed it.
     
  11. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Yeah unfortunately it doesn't seem to matter how many times I reimport TTM : L
    For now, the error doesn't seem to be negatively effect my project in any way as Im able to convert my terrains with no issue. It will just be annoying to have that error there. I guess I will take this as a warning to not rearrange files when not necessary.
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Try new version for Unity 2021.3.
     
  13. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    I wanted to ask: why is the source code not available and all the C# code is precompiled into a .net DLL? On that note, why is it the case with most (if not all, correct me on that) of your assets available on the asset store? I really want to know the reason behind this decision.
     
  14. AwknSky

    AwknSky

    Joined:
    Mar 15, 2017
    Posts:
    2
    微信截图_20230626222555.png

    I installed the Universal package and manually updated the shader, but edgefall is pink. After upgrading to URP material, it looks strange. Can you help me? Unity 2021.3.13
     
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Edgefall uses Unity's default Lit shader. You can't update it.
    Screenshot looks correct. You can change edgefall texture in the generated material.
     
  16. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Is there a setting to get the terrain to bake shadows onto itself?
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Do you mean Lightmap baking?
     
  18. leigh_

    leigh_

    Joined:
    Jun 27, 2017
    Posts:
    2
    I'm having some problems with the T2M package and the Curved Worlds package.
    I want to turn my terrain into a mesh and use the curved worlds package to bend it. However, the resolution of the textures that T2M produces when I use the custom curved world lit shader is low compared to the original texture on the terrain.

    Here are the material settings in T2M:

    upload_2023-9-5_13-54-20.png

    and here is a screenshot of a part of the original terrain:

    upload_2023-9-5_14-4-22.png

    here is the generated mesh:

    upload_2023-9-5_14-4-33.png

    As you can see, I have set the resolution of the basemap to 8192 but it still looks blury.

    Does anyone have any advice or help with this? Thanks in advance!
     
  19. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    You need to have a tiled layered image.
     
    Last edited: Sep 5, 2023
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Why not use Splatmap material, it renders textures in their original resolution. Instead of baking them all into one Basemap texture?
     
    Last edited: Sep 5, 2023
    lclemens likes this.
  21. leigh_

    leigh_

    Joined:
    Jun 27, 2017
    Posts:
    2
    Yeah, I managed to fix it. Got support from the asset dev. The thing I was missing was to activate Curved World shader transformation for T2M shaders. Once I had done that the splatmap material worked.
     
  22. wechat_os_Qy0-2dmM2mxVyN31kcorbMztc

    wechat_os_Qy0-2dmM2mxVyN31kcorbMztc

    Joined:
    Nov 1, 2023
    Posts:
    1
    Hello, I would like to ask, can this product depict terrain with point clouds in unity with agx plugin
     
  23. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    I noticed when baking lightmaps in subtractive mode in URP14 (Unity 2022.3.10). All Materials with the Splatmap Shader stay black, althought correctly baked lightmaps are shown in "Baked Lightmap" View. Does not happen with Shadowmask or Baked Indirect. I already did the Splatmap Shader Updating in the Documentation, no change.
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Just did the quick test and at my side all light baking had the same results (Unity 2022.3.11 URP):
    1.jpg
    2.jpg
    3.jpg
     
  25. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    How would I enable per chunk UV? I cant seem to find an option to toggle it in the TTM window. There is a tick box on the terrain object itself in the inspector window, but a message there says to not adjust anything in the inspector window.
     
  26. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Also it seems like my generated terrain comes with very poor texel validity. Is there a way to tune this? It is generating very poor lightmaps.
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Enable Basemap baking with Export Per Chunk:
    upload_2023-11-16_10-26-11.png

    Are you using High compression for generated mesh? Try lower compression.
     
  28. Mackerel_Sky

    Mackerel_Sky

    Joined:
    Jul 24, 2018
    Posts:
    27
    Hello!

    Doing some research into exploring terrain optimisations for a flight simulation game. I need to render terrains very far away since the camera will be flying around in the sky and I think Terrain to Mesh could be the solution? I'm just looking to have a sense check done to confirm my workflow design will work before I buy.

    1. Convert Unity Terrain using Terrain to Mesh multiple times at low, mid, high resolutions for multiple LODs
    2. Assign generated models to LOD group for each terrain chunk
    3. Do occlusion/frustrum culling on the Camera end

    Would it be that simple in practice?

    I also have the following 2 concerns I could potentially struggle with.

    1. Would there be any potential issues with 'seams' or 'gaps' between meshes if they're rendered at different or low LODs?
    2. I saw there was a generate collider toggle in the documentation. Is this collider an accurate representation of terrain shape? Is it something I can toggle on and off at runtime to save memory?
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    1. Yes.
    2. Yes. You have to manually set up LOD groups as TTM has no such feature.
    3. Yes.

    Concerns:
    1. Yes, meshes with different vertex count will definitely have gaps and seams. However they can be minimized or 'hidden' by generating meshes with 'Edge Fall' option enabled.
    2. For collider TTM generates similar mesh, but with user controllable resolution related to the main mesh. For example if the main mesh has 100x100 vertices and Generate Collider Resolution is set to 0.5, this will create similar mesh but with 50x50 vertices.
     
  30. Mackerel_Sky

    Mackerel_Sky

    Joined:
    Jul 24, 2018
    Posts:
    27
    Excellent! One last thing - I want to utilise satellite imagery for the terrain textures (using another asset like WorldComposer) then modify if needed with roads, (say from Easy Road) I assume as long as end result is a Unity terrain, once I turn it into a mesh the textures will carry over?
     
    Last edited: Dec 7, 2023
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    If WorldComposer uses Unity's built-in terrain shader, then TTM includes similar shader but supporting only 16 layers rendering or all terrain textures can be baked into one Basemap texture.
    As for roads, pay attention to the exported mesh vertex count, if using low resolution mesh export settings, details of the roads from the original terrain may be lost.
     
  32. seempleiq

    seempleiq

    Joined:
    Nov 17, 2019
    Posts:
    2
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    lclemens likes this.
  34. seempleiq

    seempleiq

    Joined:
    Nov 17, 2019
    Posts:
    2
    I have some objects like a rocks and other, they are child of terrain. Is it possible to copy they like a detailed mesh to inside of generated terrain prefab?
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    No. Tools work only with TerrainData asset and not scene gameobjects or other prefabs.
     
  36. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Do you have any recommendations for setting up mesh blending with the terrains this asset generates? I've been hunting for a while, but it seems like a lot of mesh blending solutions rely on the unity terrain system.
     
  37. unity_IL2xcGDjkMsxVw

    unity_IL2xcGDjkMsxVw

    Joined:
    Jun 13, 2018
    Posts:
    18
    Hi, i bought the tool and i have a problem. There are seams between converted terrains. Not between chunks, generated by terrain to mesh, but definitelly between previously existing unity terrain chuinks. (geometry looks ok. problem is probably faces) What to do?
    upload_2024-1-21_2-19-25.png
     
    Last edited: Jan 21, 2024
  38. henryqng

    henryqng

    Joined:
    Jan 17, 2017
    Posts:
    9
    Hi Arkhivrag,

    I'm writing to express my appreciation for the excellent Terrain To Mesh asset. It's been a powerful tool for my projects, and I'm currently using it in combination with Terraland for an exciting AR app.

    However, I've encountered an issue with edge fall while converting terrain to mesh. Changing the "Edge Fall" value (extruded edges) seems to have no effect. I understand the default is -50, but adjusting it to -20 or even -1 doesn't make the baseboard thinner as expected. I've attached an image to illustrate the issue. By the way, the size of this terrain is 60 km x 80 km.

    My question is: is there a way to modify the edge fall values to achieve a thinner baseboard? The current thickness unfortunately hinders my AR app's functionality.

    Thank you for your time and assistance. I look forward to your response.

    MarsAR.png
     
    Last edited: Jan 22, 2024
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Sorry, currently I have no solutions for that case.


    It looks like mesh is generated using High compression method. That is expected behavior. Entering game mode fixes it.


    Which Unity version and render pipeline are you using?
    How about bigger values like -200 or -1000? If it is a bug, such huge values also shouldn't work.
     
    Last edited: Jan 22, 2024
  40. unity_IL2xcGDjkMsxVw

    unity_IL2xcGDjkMsxVw

    Joined:
    Jun 13, 2018
    Posts:
    18

    It is not fixed in game mode: upload_2024-1-23_13-48-32.png

    edit:
    oh and found the compression setting. it is on low. i tryied setting it on medium / high, and it did not help.
     
    Last edited: Jan 23, 2024
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Does generated prefab has TerrainToMeshConversionDetails script attached? And is it enabled?
    upload_2024-1-24_1-43-26.png
     
  42. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Thank you for confirming! Would you ever consider developing this as an additional feature in the future? It would be highly useful for terrain/scenery development.

    I have found outside solutions, but they require a lot of modification to work with the terrains this asset generates.
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    I will check what can be done.
     
  44. unity_IL2xcGDjkMsxVw

    unity_IL2xcGDjkMsxVw

    Joined:
    Jun 13, 2018
    Posts:
    18
    yes
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Contact me on support email (support@amazingassets.world) with asset purchase invoice I we will check it in details.
     
  46. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19

    Hi there! No rush, was just wondering if you had given yourself the chance to look into this. I've tried doing some alternatives, but can't get usable results. I am curious on the feasibility of this.
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Currently no update regarding mesh blending :oops:
     
  48. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    All good! It's more of a curiosity than a necessity for me, although I'm sure a lot of people would love to see it!

    I do have another issue for you though that I was hoping you could guide me through. I have had a terrain that has been increasing in layers throughout the past couple months. For the longest time, this has worked great but it seems like a 12th layer breaks the camel's back.

    Essentially, with a 12th layer, TTM is generating a terrain where the 12th layer does not exist. The only fix for this is to regenerate the entire terrain by throwing the original unity terrain back through the TTM asset, but this seems to only work *sometimes* and, even if it does work, the 12th layer will break again if you close and re-open the unity project. I read on the documentation that the TTM asset supports up to 16 layers. Is there something I am doing that is hindering me from adding a 12th?

    I've attached 3 pictures. The first is the Unity terrain I am trying to convert. The second the result that TTM outputs. The third is my TTM settings.

    Unity Terrain:
    upload_2024-2-9_14-0-32.png

    TTM Terrain:
    upload_2024-2-9_13-59-11.png

    TTM Settings:
    upload_2024-2-9_13-59-31.png


    Additional Info:
    Graphics Card: RTX 3080
    CPU: i7-12700KF
    Memory: 2x16GB @ 3200 MHz
    More than enough disk space

    Unity Version: 2021.3.17f1
    Render Pipeline: URP


    Got any tips? Thanks in advanced!
     
    Last edited: Feb 9, 2024
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Export terrain directly from TTM editor window and send me generated package file on support email (with purchased invoice) - support@amazingassets.world, I will check it.

    upload_2024-2-10_16-47-56.png
     
  50. Jacob_Andrews

    Jacob_Andrews

    Joined:
    Sep 25, 2020
    Posts:
    19
    Hi there, I was actually able to solve this one by simply deleting the entire TTM object and starting from scratch. Since then the 12th texture works as expected. If you still want me to send this over I can.

    I do have another issue that i wanted to run by you though. I believe I posted it in here a while back but ended up just moving past it with a quick-fix. I keep getting these splotches on my terrains when baking my lightmaps (photos attached). I've tried a couple things to get around it including increasing lightmap size, increasing all the different sampling sizes, changing baking methods, etc.

    My go-to solution was to just have a custom lightmapping parameter for the terrain that stretches 15 lightmaps across 400 terrain chunks. This essentially 'smudged' the splotches away and worked for a while, but now I'm wanting to get a bit more detailed with my terrain, which requires proper lighting. This *might* be because of poor texel validity but I'm unsure.

    Photo Mid lightmap bake, ignore the blacked out tiles. The white snow does not have those visual artifacts prior to baking.


    Let me know what you think!