Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

Discussion in 'Assets and Asset Store' started by eagle555, Sep 16, 2012.

  1. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi Nat, I'm wondering if you can add to settings to Enable/Disable Bake Light Probes for Trees, with 64 terrains takes a few mins to go thru each one to disable :D

    Thank You if you can Jim
     
  2. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Everyone,

    I have a new TC2 version ready to test on Mac. Need to import the package over the Asset Store version.

    For it to work you need Unity 5.6 and higher as it needs Metal. Metal needs to be enabled in Unity Menu -> Edit -> Project Settings -> Player -> 'Metal Editor Support* (Experimental)'.

    Meer info in deze post van Unity:
    https://forum.unity3d.com/threads/metal-editor.450548/

    Also your GPU needs to support Metal. If it doesn't you will get FindKernel errors. If you get a flickering TC2 window and Inspector let me know.

    On the Mac you can delete a node with 'Backspace' key. Duplicate a node with 'control + d' key.

    Nathaniel
     

    Attached Files:

  3. Vanidash-Studios

    Vanidash-Studios

    Joined:
    Mar 9, 2016
    Posts:
    71
    Thanks for the quick response, here its a screenshot of the setup
     

    Attached Files:

  4. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You have the layer disabled, click on the eye to enable it:

    upload_2017-7-7_19-5-54.png

    Nathaniel
     
    Last edited: Jul 7, 2017
  5. _Luthien_

    _Luthien_

    Joined:
    Apr 24, 2015
    Posts:
    52
    By way of illustration what that flickering looks like, I posted a screen cast here:

     
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm on PC and while I don't get that flickering, I'm getting the same errors when I generate one of the sample terrains:

    Releasing render texture that is set as Camera.targetTexture!
    UnityEngine.Object:DestroyImmediate(Object)
    TerrainComposer2.TC_Compute:DisposeRenderTexture(RenderTexture&) (at Assets/TerrainComposer2/Scripts/Generate/TC_Compute.cs:1639)
    TerrainComposer2.TC_CamCapture:DisposeRTCapture() (at Assets/TerrainComposer2/Scripts/Generate/TC_CamCapture.cs:60)
    TerrainComposer2.TC_Generate:Compute(Int32, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:253)
    TerrainComposer2.TC_Generate:GenerateOutput(TCUnityTerrain, Int32, Boolean, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:458)
    TerrainComposer2.TC_Generate:GenerateHeight(TCUnityTerrain, Boolean, Rect, Boolean) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:478)
    TerrainComposer2.TC_Generate:Generate(TCUnityTerrain, Boolean, Rect) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:401)
    TerrainComposer2.TC_Generate:Generate(Boolean, Rect, Int32) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:375)
    TerrainComposer2.TC_Generate:Generate(Boolean, Int32) (at Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs:313)
    TerrainComposer2.TC_NodeWindow:ClickMenuMain(Object) (at Assets/TerrainComposer2/Scripts/Editor/TC_NodeWindow.cs:556)
    TerrainComposer2.TC_NodeWindow:DrawMenu() (at Assets/TerrainComposer2/Scripts/Editor/TC_NodeWindow.cs:479)
    TerrainComposer2.TC_NodeWindow:OnGUI() (at Assets/TerrainComposer2/Scripts/Editor/TC_NodeWindow.cs:166)
    UnityEditor.DockArea:OnGUI()

    [EDIT]
    Using Unity 5.6.2p1 and TC2 version 2.5 patch update.

    [EDIT 2]
    After clearing the errors, I get them again by moving around one of the stamp layers with Auto generate on. So the error occurs when generating terrain. The generation seems to be fine, but the error is persistent.

    [EDIT 3]
    Cleared the errors again and just did a single click on the MountRanier Node and the error popped up 27 times just for the single click.
     
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Spoke too soon. The terrain generation is messed up. Watch the following video:

     
  8. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    This is good news.
    Anyone know of a software test that can test if a macbook pro supports metal?
     
  9. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
  10. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    Hi all,

    Sorry to bother with maybe an already asked question, but is there some erosion sytem in TC2 to apply at the end...
    I'm searching for erosion thru all my terrain tools at the moment!!:p sorry!
    thanks in advance
    cheers
     
    Alverik likes this.
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I made a fix for this including a few others:

    Features:
    • Mac support with Metal for Unity 5.6 (Experimental)

    Fixes:
    • Unity 5.6 releasing render texture that is set as Camera.targetTexture.
    • Portals node in other outputs than 'Height' output work correct now.
    • Splat seams on edges on multi terrain.

    Nathaniel
     

    Attached Files:

    magique likes this.
  12. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    It's not there yet, but on the roadmap. The stamps included have erosion applied, also there erosion looking noises Swiss and Jordan with presets.

    Nathaniel
     
    eaque likes this.
  13. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    Many thanks for your prompt answer!
    I'm gonna check those stamps tonight!!:)
     
  14. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    Hi all,
    I'm getting errors.

    Failed to create Compute Buffer UAV, HRESULT: 0x80070057
    Failed to create Compute Buffer SRV, HRESULT: 0x80070057
    Failed to create Compute Buffer, HRESULT: 0x8007000e

    When I turn my splat maps up to 2k. Is there a way around this issue? or is it to much for the compute shaders to handle?

    Edit: I'm doing allot of extra stuff with Masks than might be expected. I'm using them to add line work around masks to make a more drawn look. It works quite well but I suspect thats where my issues are arising. One problem I have is not having enough iterations in the blur, shrink and expand nodes. So I'm having to stack 2 or even 3 together to get the desired blur etc.
    Is there a way to increase the blur iterations from 30 to something a higher?

    Cheers!
     
    Last edited: Jul 10, 2017
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thank you. That fixed my issue completely.
     
  16. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Which Unity version are you using? And what kind of GPU do you have? Can you show a screenshot of your TC2 window with Unity window also visible?

    Nathaniel
     
  17. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    Hi Nathaniel,

    Loving TC2. Its allowing me to do some interesting stuff. Hope this isn't going to scupper my plans to much ;)

    I'm doing allot of extra stuff with Masks than you might not expect. I'm using them to add line work around masks to make a more drawn look. It works quite well but I suspect thats where my issues are arising. One problem I have is not having enough iterations in the blur, shrink and expand nodes. So I'm having to stack 2 or even 3 together to get the desired blur etc.
    Is there a way to increase the blur iterations from 30 to something a higher?
    And if there's a fix for the shader issue anyway that would be amazing.

    Graphics card is a Nvidia gtx970

     
    Last edited: Jul 11, 2017
  18. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes more then 30 blur iterations is possible, basically can be endless, I will expose an int field for it instead. Will implement and post it tomorrow. The error issue is strange, as I only keep a few compute buffers in memory while generating. Seems to happen if compute buffer size is zero:
    https://issuetracker.unity3d.com/is...-when-creating-a-computebuffer-with-zero-size

    Maybe you can send me your TC2 project to my email: Nathaniel_Doldersum@hotmail.com (TC2 window -> File -> Save, then right click on the saved prefab and export as Unity package).

    Nathaniel
     
  19. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hi,

    Sorry to ask what this here, I'm just not sure where to find the answer. How hard is it to generate a terrain off of real world data? If I wanted to generate an actual desert, is this possible? What are the steps to do this?

    Thanks!

    PS: I already own this ... just not sure how to accomplish this.
     
  20. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Actually I made WorldComposer for this, it extracts real world heightmaps and satellite images:
    https://www.assetstore.unity3d.com/en/#!/content/13238

    The heightmaps of WorldComposer can be used as stamps in TC2, and the satellite images can be used in the Colormap output and can be used for masks for object and vegetation placement.

    Nathaniel
     
  21. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66

    Hi Nathaniel,

    So, I might have figured out the source of the problem with the shader errors. I had Photoshop open in the background. When Photoshop is open it will also be using the GPU (I guess even minimized) and I have found that its a bit of a resource hog like all adobe products... When I don't have Photoshop open the errors go away.

    Sorry for the false alarm on your end.

    However, more iterations on Blur AND Expand/Shrink nodes would still be super useful to me!

    Many many thanks for a great bit of software and great support!
     
  22. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hi Darren,

    Glad you solved the GPU memory issue.
    Here's the update with int field for more blur/expend/shrink iterations.

    Nathaniel
     

    Attached Files:

  23. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I made a Scene called NoCrashyCrashy xD

    I've been having a problem with TerrainComposer2, maybe I set it up wrong idk.

    I have a 2048x2048 terrain and I have been following an hour long tutorial about how to make a map (and island with mountains), however by the end of it I went to optimize it for Occlusion Culling. Apparently you can't occlude the trees if they are part of the terrain. So to sort that out I split the terrain into 8 pieces (I took 2048 and / it by 8 and got 256. So I made the terrain the size of 256x750x256 and made 8 tiles). That reproduced the scene I was in.

    However ever since then it's been using alot of RAM and crashing a lot, which is kind of weird. Atm I finally managed to start the Occlusion process so I am hoping that helps the Editor? I was just wondering if there are something I am supposed to look out for while doing this, did I make too many terrains maybe?

    Thanks.

    Edit: Er rather I was meaning to say that the Scene view has been performing slow as heck. It especially takes a while if I select the terrain(s).
     
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Maybe you should call it IWantaCrashyAlot instead. ;)
     
  25. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Haha nice. So too many tiles is what you mean?

    Edit: Having better results by 512x4. Seems to have helped.
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I have no idea what's wrong. I was just being silly. However, occlusion culling in an outdoor scene is very tricky. In general, you're not going to be able to gain any performance and will most likely lose performance. The only way to really gain performance is to have really large occluders and set your baking to only occlude for very large objects (e.g. large cliffs, huge rocks, etc.). And when I say very large, I mean very, very large. For trees you just need to reduce draw distance for trees so they don't draw very far off. Also, tree colliders is an issue in Unity terrain when you have lots of trees. So a system that only enables colliders when the trees are close up is a good way to go. There are some systems out there that can handle this, but Unity doesn't provide one built in.
     
  27. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Thanks yeah. I was thinking Occlusion would have been good to reduce the amount of trees visible, that way you get better performance so that the trees are can't see (behind you) aren't bogging down your system.

    Maybe I've been thinking about this a different way though.
     
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Unity will automatically frustum cull trees so that's not the issue.
     
  29. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Ah okay thanks. Well I managed to get everything working smoothly. Following the tutorial though I can't see how to set an object to a specific layer via the TC2 Editor. I am using a Collision Mask but it didn't say how the Rocks (or trees now in my case) got to the Objects Layer. There wasn't even an Objects layer, I just made one.
     
  30. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    If you want great improvement in tree and grass performance, there's coming a system for it called 'Vegetation Studio':
    https://forum.unity3d.com/threads/wip-vegetation-studio.479244/

    At the moment I'm looking into integration with TC2.

    It's just the Unity Layer system, so yes you need to make one yourself and can name it differently.

    Nathaniel
     
  31. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I should have rephrased it. When TC2 generates the map it forces all objects to be on the "Terrain" Layer, instead of the "Object" Layer. Is there somewhere in TC2 where I set the layer of the Object/Tree node? I can't set the SpeedTree itself to a specific layer because SpeedTrees are not editable in that manner, prefabs are.

    Edit: Ah yes, the object prefab can be. How do I do this for Speed Tree's though?

    Edit 2: More importantly, I have a nice scene generated with Gaia and was wondering how I can import the heightmap over to TC2 to do some advanced touch ups?
     
    Last edited: Jul 21, 2017
  32. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    @eagle555, I found a very minor "bug", but it's on the support web site and not in the software. :)

    I wanted to download the Stamp Pack, and clicked on the Dropbox link. You left out the colon in the URL, so you have "https//" but needed "https://" as the prefix. It was easy to fix it manually in my browser, but I thought you'd want to know so you can edit your web page.
     
    Seneral likes this.
  33. ramsicle

    ramsicle

    Joined:
    Sep 16, 2013
    Posts:
    6
    Hello Nathaniel, I get this error when trying to open the latest TC2 window.
    MissingControls.png
    As you can see, I get a blank window. Not sure what to do from here. I've deleted and re imported TC2 twice and still get the blank window. I will say this only started happening with the latest update. All was fine before, so I've gone to your website to get a previous version to use for now.

    I have also followed along with instructions and created terrains as mentioned, remember it did work well with previous version. FYI, I'm using Unity 5.6.x.

    Thank you,
    Rob.
     
  34. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Can you show a screen of the console?
    Also had this once or twice, but only because I forgot to import base TC2 from the AS before importing the updates from this forum;)

    EDIT: Just update to the latest AssetStore version, getting that, too, no errors...
    Reverting back to the 2.5 version that was available on the forums:)
    EDIT2: Just overwriting the Scripts/Editor/TC_NodeWindow.cs did the trick for me, no errors, rest of the code is still latest:) Might do a diff of that...
    EDIT3: Seems like it's just a wrong variable default value. Scripts/Editor/TC_NodeWindow.cs/l.122, change
    Code (csharp):
    1. int correctSetup = -3;
    to
    Code (csharp):
    1. int correctSetup = 0;
    , anything other than 0 creates a blank window...
     
    Last edited: Jul 21, 2017
  35. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I created a popup window that asks if you want to create a new TC2 project, to not automatically do that if TC2 window is open with an empty Scene (a fix for multi scenes with TC2 window open). Seems indeed a bug on existing TC2 window. Here a quick fix with Senerals suggestion.

    Nathaniel
     

    Attached Files:

    Last edited: Jul 22, 2017
    Seneral and docsavage like this.
  36. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    TC2 ExampleMountainVillage gives an empty scene. Looks like all the content is installed.
    TC2_noscene.jpg
     
  37. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    How to reduce pixel error to "1" When creating 3x3 terrain tiles? (besides clicking on each individual tile)
     
  38. ramsicle

    ramsicle

    Joined:
    Sep 16, 2013
    Posts:
    6
    Quick fix working so far.

    Cheers.
     
  39. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Have you tried creating the terrains and clicking generate? Could be he didn't include all the terrains for space reasons (since the data is generated either way).
    Yes, the terrain area object manages all settings for each tile centralized. Just check the settings tab:)
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Did you follow the readme? You need to import 2 packages, one with stamps the other with examples, link are in the readme in the Scene.

    It's like Seneral says. Reducing to pixel error 1 should only be done in the editor to get better visuals, but in the game itself should always be 5 or higher for good performance.

    Nathaniel
     
  41. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    Hi there.
    Can yo tell me please what RAW format exporting from TC2 ? i cant open it in photoshop. only i see is errors or strip mess (if i play with import options).
     
  42. Jogalog

    Jogalog

    Joined:
    May 15, 2013
    Posts:
    2
    Is there any updated info/tutorials for altering terrains at runtime? I am running into problems trying to figure it out on my own.

    The ExampleAnimated scene, in the examples folder, works perfectly in the editor but when I build the project for PC and play the terrain no longer animates. Oddly most of the splat textures seem to be missing as well. The whole terrain suddenly appears to use only the "Dirt" and "Forest&Sand" splat textures.

    I must be missing something!
     
  43. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    That's nicely documented 16 bit raw grey scale and how to open in photoshop ;)
    http://www.terraincomposer.com/terraincomposer2-documentation/#stamps

    Nathaniel
     
  44. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Is their way to manipulate RAW file without going into photoshop, especially with free software?
     
  45. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    tried.
    didnt work as i planed.
    well, this instruction is ok if i set heightmap to 513. but i wanted to export 4097 and fail. only way i found is export 64 maps by 513 resolution (i have 64 terrain to make possible paint accurate splats) by option in TC2. then pain - open 64 raw in photoshop and stich them manualy. it worked for me and god bless i needed it only once.

    long story short - work for 513, not for 4097 ((
     
  46. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    got another problem (((
    now all gone and dont want refresh ((
    upload_2017-7-28_10-52-52.png

    found out that TC2 folder mus be in root folder (Assets), not be child of something.
    moved in root, reloaded, refreshed, all in place now. scared me alot... 2 days work =)
     
    Last edited: Jul 28, 2017
  47. YHS

    YHS

    Joined:
    Aug 10, 2014
    Posts:
    31
    Hi there

    I'd like to know how to use TC2 to integrate with unity terrain. I know that I can export height map, but is it the only pipeline? Let's say I want to use TC2 to generate most of terrain shape at first. Then I use unity terrain brush to sculpt more detail by hand. What if I want to go back to TC2 again? How do I make the terrain data read by TC2 again and keep the detail I add by hand? It's not easy to find "integrate with unity terrain" topic on the document. Thank you.
     
  48. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    this is the point =)
    overkilled terrain by imagination? hit click to regenerate and all magic is done =) bonus - regenerate trees, grass, splats, custom objects.
    mostly its not integration with terrain. its like a tool for generating height map for terrain. author will correct me if i wrong.
     
  49. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I do anything by hand last... do all the generating before doing anything by hand. Not sure if he added anything, as I have not used it much lately. But that is how I did it for many years with even TC1... So that is typically what you want to do is save all hand changes last...then do not generate height anymore..
     
  50. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I'm trying to use TC2, latest version (just purchased it yesterday) on a MacBook Pro 2013 (so it has Metal) running 10.12.5. I've enabled Metal and Metal API in the player settings ,but when I click the Generate button, I get the flickering shown in _Luthien_'s video above. Has anyone figured out how to fix that?

    This error is in the console when I load the Examples scene:

    NullReferenceException: Object reference not set to an instance of an object
    TerrainComposer2.TD.Init () (at Assets/TerrainComposer2/Scripts/Editor/TD.cs:214)
    TerrainComposer2.TC_NodeWindow.OnGUI () (at Assets/TerrainComposer2/Scripts/Editor/TC_NodeWindow.cs:143)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
     
    Last edited: Jul 28, 2017