Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

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

  1. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Sorry, Nathaniel -- my bad -- the file was a patch but Unity forum formatted as C# (best of few options). Yeah those two aren't C# :-D Just leave 'em out. (If you're curious, they tell the 'patch' command which lines to change (i.e. start at line 215 and change 6 lines to 9 by adding the ones with +).)

    So yeah sorry, just add this (below) to TC.cs around line 218 please :)

    Code (CSharp):
    1.                 if (null == UnityEditor.AssetDatabase.LoadAssetAtPath(TC.installPath + "/GUI/Buttons/Button_Minus.psd", typeof(Texture))) {
    2.                     TC.installPath = "Assets/TerrainComposer2";
    3.                 }
    Thanks, Rupert.
     
  2. Lijianjian

    Lijianjian

    Joined:
    Feb 26, 2017
    Posts:
    16
    I need some help !
    Sorry for my poor english !
    I update my TerrainComposer from 1 to 2 . But I have some trouble , I creat new layer ,new node set it to Noise >Perlin in Height section, but when click height button to active , but nothing happen .unity give me a error "UnityException: SetTexture failed" I try many time but i have the same problem.

    I am Unity 5.5.1p2 ! Win7!
     
  3. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you show a screenshot of your Unity window with TC window open?

    Nathaniel
     
  4. Lijianjian

    Lijianjian

    Joined:
    Feb 26, 2017
    Posts:
    16
    This is Screenshot also include a Console Screenshot
     

    Attached Files:

  5. Lijianjian

    Lijianjian

    Joined:
    Feb 26, 2017
    Posts:
    16
    I don't understande why i failed to create terrain by using Terrain Composer 2 ,even in a fresh project that only have terrain Composer 2 install !
     
  6. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    #if UNITY_EDITOR
    UnityEditor.EditorApplication.update += MyUpdate;
    UnityEditor.EditorApplication.playmodeStateChanged += BeforePlayMode;

    //#endif (was here)*******
    if (!UnityEditor.EditorApplication.isPlaying)
    {
    restoreAutoGenerate = true;
    }
    #endif

    Was getting a build error line 79. Simple fix to move the endif (As above encapsulating the if statement.
     
  7. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    You seem to be in DX9, either you're PC doesn't support DX11 (very unlikely) or you have emulation enabled (disable in Edit/Graphics Emulation/No Emulation). Other problems could be unsupported target platform, but you seem to be on PC so it should not cause this.
    TC2 needs to have DX11 because of Compute shaders, sometimes Unity Editor messes this up even if your PC and your target platform does support this...
     
    Mark_01 and antoripa like this.
  8. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Like Seneral says you are in DX9 mode, you need to enable DX11, I explain it in the beginning of the TerrainComposer2 Examples Tutorial video in the post above how to enable it.

    Nathaniel
     
    Mark_01 and antoripa like this.
  9. Gssev7

    Gssev7

    Joined:
    Jul 9, 2014
    Posts:
    32
    Screen from a terrain I'm working on. Used some camera effects as well. TC2 is working well:)
     
    ftejada likes this.
  10. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Is there world streaming support with models on terrain or only terrain tiles streaming support ?
    Is there support for automatic placement of model cliffs and rocks (aka Skyrim landscapes) ? or the abiltiy to paint random models rocks on moutain cliffs ?
     
    Last edited: Feb 27, 2017
  11. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    The streaming that is planned for TC2 generates the terrain on the fly, unlike to any other streaming solution - so yes, it streams everything on the terrain that you generate through TC2 - terrain, grass, objects, trees, ... But that also means manually placed objects aren't streamed, if you need to stream those you can fall back to an ordinary streaming solution.
    So far, there is unfortunately no good solution to perfectly place objects like that (with correct orientation and placement that makes sense). Would also love to see this supported to allow for cliff/overhang meshes.
    Don't know what you mean by the last point. You can't paint random objects with standard TC2, only with my upcoming painting extension. But still, these are placed by standard TC2 placement rules, because they are controlled by a mask and not individually.
    If you chose that you're terrain height is final, you could disable and manually place these cliff meshes of course.
     
    Mark_01, antoripa and Arkade like this.
  12. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    From the video, there was a huge terrain with a viking village, i thaught it was streaming.
    You mean if we place some houses on the terrain, the streaming don't display them, i don't see the interest of the streaming feature , if all models you placed on terrain will not work with the streaming feature of the plugin.
     
  13. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    First off, the dedicated streaming feature (generating on-the-fly) has not yet been implemented into TC2 - although possible, there is no official support for it, it is only planned.
    I don't know if the initial TC2 Trailer with the viking village was streamed, if it was, it was with a seperate streaming solution such as Sectr or World Streamer.

    Seems I have to explain a bit more in-depth. These seperate streaming solutions take any object in your scene, save them as chunks on your hard drive and load them into the scene when needed.
    The planned TC2 streaming on the other hand does not need any preparation, when you got your terrain project in TC2 it can stream the terrain tiles by generating them on the fly. This includes all objects, trees, grass, etc. that are being generated by TC2.
    Some people have POIs like villages manually placed, and those objects WON'T be streamed (aka generated-on-the-fly) by TC2. They will instead just sit in the scene where they were as usual and you could load those manually or just leave them be - and when the tile is generated around them, they will adapt just as they were in edit mode.

    Maybe there was a misunderstanding, the upcoming TC2 streaming
    1. needs DX11 on the target platform
    2. needs some processing power as opposed to hard-drive memory other solutions use
    3. is the only way to stream your terrains randomly generated with TC2 at runtime
    So, it's not meant as general replacement for all streaming solutions, but only for some specific requirements.
     
    Last edited: Feb 27, 2017
    Mark_01 and antoripa like this.
  14. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    One of the other popular terrain assets has an optional "infinite terrain" feature that's a core feature of the product that will continue to generate random terrain endlessly as the player moves through the environment. It doesn't do fancy GPU-based generation, but FYI.
     
  15. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    206
    Hi, this may be a silly question but,
    Is the upgrade price also reduced in this week's "Wishlist sale"?
     
  16. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Upgrade prices are never affected by sales.

    Update: TC2 will be given a discounted upgrade price during the sale. I think that must be Nathaniel's doing, because I don't think I've ever seen that happen in the store before.
     
    Last edited: Feb 27, 2017
    rrahim likes this.
  17. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Sorry, I simply assumed the use of TC2, but of course there are multiple other terrain tools that support this. MapMagic does, for sure...
     
  18. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    I guess I misunderstood what you were saying. It happens. :D
     
  19. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Nah you're right, improved the wording a bit;)
     
  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Sector is not a real open world streaming solution, but as it's name a sector based approcah and your level design must work this way.
    World Streamer is specific and i am not sure it would support TC2 plugin as it uses some offset to bypass the numbers float precision moving player tile to 0,0 each time the player moves to a new tile.

    For this you need a plugin able to generate the streaming data for each tile , once you have designed your scene in the editor placing models on top of the terrain (somewaht like World streamer plugin)

    The video advert was misleading, as you said and from all i have read TC2 streaming is for terrain only, it is not a full game world editing and streaming solution.
    The only complete solution i have is with Unreal 4 out of the box terrain editing tools, streaming and world composition, it's all integrated, no plugins or plugins dependencies.
     
  21. eagle555

    eagle555

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

    TerrainComposer2 is on Unity's Asset Store wishlist sale and you can get it instead of $45 only for $33.75. The upgrade price from TC1 to TC2 during the sale will be on discount as well $18.75 instead of $25.

    TC2_Sale.jpg

    By the way I'm working on a new update with a new way of stamping and WorldComposer integration. Also working on the advanced distance system.



    Nathaniel
     
    ftejada, Mark_01, antoripa and 3 others like this.
  22. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    It does support TC2 because TC2 outputs standard unity terrain - when you're not using TC2 at runtime (which Sectr doesn't support either way) there's no problem using any streaming solution with TC2 terrains.

    Not sure what you're talking about.
    If you have some manually placed houses that adapt to the terrain (by using the TC2 collision node), there's no problem in using TC2's streaming because when the terrain tile aroung these objects are generated the collision node will no problem pick up these objects and adapt the terrain around them. So if you just got a few villages manually placed you could still use the TC2 streaming because these would not harm performance that much when idling in the scene.
    Also not sure what video advert you are talking about. I don't think he said anywhere that a video even used TC2's built-in streaming just because it isn't even there yet.


    @Nathaniel Amazing. Looking forward to the update;)
     
    Mark_01 likes this.
  23. MahaGaming

    MahaGaming

    Joined:
    Feb 25, 2014
    Posts:
    82
    terraincomposer 1.96 doesn't work for me, I cannot afford to upgrade yet
     
  24. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you show a screenshot of the Unity console with the error you get?

    I tested it on my side and it works here, got a Debug.Log message that render texture is not created. I made a patch for this. The patch also includes the build fix (which AndyNeoman pointed out) and a fix for the TextureImportSettings normalmap obsolete warning for Unity 5.5.

    Nathaniel
     

    Attached Files:

  25. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Thanks for telling, I fixed it with the patch in the post above :)

    Looks great, thanks for sharing! :D

    World Streamer is compatible with TC2. Streaming which needs generating at runtime is already possible with TC2, only moving the terrain tiles with the camera I need to finish the script for it.

    In TC2 trailer the viking village was hand placed. I didn't put any text that this was streamed or infinite terrain. These were basically 3 terrains tiles, can of course split them up in more. I only show terrain tile streaming as a feature in the trailer when moving the camera around and automatically new terrain tiles are generated, but can see this is not the terrain from the trailer. So everything that is generated with TC2 can be streamed (procedural generated), including objects and buildings, etc.

    What I wanted to show in the trailer was the possibility to mix different terrain biomes, like desert, canyon and mountain forest into 1 terrain. This was already possible with the very first beta I released, as the trailer I made with even an earlier prototype version. Now with automatic RTP color and normal map assignment it is even easier to create a similar terrain. I will make a demo + include it into TC2 + tutorial for this.

    So In trailer I write 'Multi terrain and streaming support' while moving the camera around and terrain tiles are generated. I don't think the trailer was misleading about streaming, my apologies if you misunderstood it for a hand placed object streamer. Think WorldStreamer is best for this. TC2 will support the offset for the moving to scene origin.

    Nathaniel
     
    Mark_01 and ftejada like this.
  26. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes I adjusted the upgrade price with the same discount.

    Nathaniel
     
  27. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    In which Unity version do you use it? Can you show me a screenshot of your Unity console? (Control-shift-c)

    Nathaniel
     
  28. rrahim

    rrahim

    Joined:
    Nov 30, 2015
    Posts:
    206
    Thanks. Picked it up last night when I noticed your earlier post.
    I'm quite excited to explore it.
     
  29. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Anyone having issues with latest update (from the store). Now my heightmap has gone crazy. I have not changed anything but it has huge spikes everywhere. I use RTP and have tessalation on. It was fine before I updated.

    Error can be repeated by pressing generate on TC2 with heightmap enabled.
     

    Attached Files:

  30. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    forgive me if this has been asked already, but I didn't get if TC2 is using a new terrain engine or still the unity one.
     
  31. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    The default unity one:) It's still the main bottleneck in generation speed though - maybe we need a unified community-built terrain engine...
     
    Alverik likes this.
  32. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    we do :)
     
    Alverik likes this.
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    One that is voxel based in editor, but which bakes to square poly mesh before being turned into triangles. That way you can sculpt the terrain in 3D with holes and overhangs (using voxels), save to mesh with square polys so you get good seams for streaming and can thus vary the density of the mesh by powers of two to create areas of interest and areas of high performance, and the final baked product would be in triangles.

    Maybe something like that. ;)
     
    Alverik likes this.
  34. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Cool! Is it available somewhere? Or for specific requirements? :)
    EDIT: Lol, misunderstood
     
    Last edited: Mar 8, 2017
  35. rhamoud

    rhamoud

    Joined:
    May 20, 2013
    Posts:
    18
    Does TC2 support creating terrains for WebGL builds?
     
  36. No0B25

    No0B25

    Joined:
    May 2, 2016
    Posts:
    70
    Yup. Just don't expect to generate anything with it at runtime.
     
  37. rhamoud

    rhamoud

    Joined:
    May 20, 2013
    Posts:
    18
    Sorry, I am new to TC2 what exactly does that mean?
     
  38. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Just remember to turn graphics emulation off (Edit/Graphics Emulation/No Emulation) so the editor uses your hardware and not unsupported WebGL graphics capabilities (see below). Even then Unity is a bit weird and some things might not work as expected (just tested on an older version, works but spits an unimportant log out which can be commented - might be fixed in the latest version).
    That means that you can't tell TC2 to generate your terrain at runtime - in the WebGL build - because WebGL does not support the DX11 shader features TC2 needs (Compute Shaders in this case).
    Usually you're creating a standard terrain and don't ship TC2 with your build at all though so no big deal.
     
    rhamoud and No0B25 like this.
  39. No0B25

    No0B25

    Joined:
    May 2, 2016
    Posts:
    70
    TL;DR: If you generate your terrain in the editor and then delete TerrainComposer from your scene, you won't face any problems in a WebGL build, because in the end it's all Unity's integrated terrain system. If you want to generate terrains with TerrainComposer while your build is running, you can't use it in a WebGL build.

    Well, TerrainComposer outputs some texture maps that are applied to Unity's integrated terrain system. I don't know how versed you are with graphics technologies, but it does most computations for these texture maps on your graphics card, instead of your processor, making it quite a bit faster, depending on your hardware. It utilizes so-called compute shaders, which are relatively simple programs that use the graphics card's hundreds/thousands of computing cores (like your processor has, but way dumber, but also way more numerous) to crunch some numbers to get the texture map it outputs at the end.

    TerrainComposer can do all of that while running a build - theoretically. Compute Shaders need to be supported by the graphics API (e.g. DirectX, OpenGL or Vulkan) and have a functioning implementation in the engine to work. A WebGL build is based on OpenGL ES 3.0, which is a very stripped down version of OpenGL also used on Android. OpenGL ES 3.0 doesn't have an implementation for Compute Shaders in Unity. In fact, it doesn't have support for Compute Shaders at all, which were introduced in 3.1.
     
    Last edited: Mar 1, 2017
    rhamoud and Seneral like this.
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Maybe we can do a skype session, my account is Nathaniel.Doldersum

    Has anybody else have this issue with the latest update from the Asset Store? I posted a patch a few posts back:
    https://forum.unity3d.com/threads/t...red-terrain-tool.151365/page-110#post-2975877

    Patch shouldn't make a difference though.

    Nathaniel
     
    AndyNeoman likes this.
  41. terapong

    terapong

    Joined:
    Mar 5, 2013
    Posts:
    17
    Hi Nathaniel
    I really interested in advance distance system. Will it be release in the next update?
     
  42. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes that's the plan or the update after the next one as I almost have another update ready with WorldComposer integration. Also have terrain streaming script almost ready.

    Nathaniel
     
  43. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    I disabled tessellation for now as it was causing problems with my grass shader too.

    If the error still shows when I re-enable I will send you a message to arrange the skype. Thanks for the support.
     
  44. Jixzer

    Jixzer

    Joined:
    Feb 3, 2014
    Posts:
    15
    Confused?

    Having tc2 v2.21 and updating to v2.3 I still see v2.21 in the about box for both.
    Now I believe them to be different versions as I see the newer version tc23 node window menu |File|Options|Help|Documention| displayed, and in the older version tc221 node window I see |File|Options|Help| only.

    Also with the older version I got the warn error:
    Assets/TerrainComposer2/Scripts/Generate/TC_Generate.cs(632,25): warning CS0219: The variable `size' is assigned but its value is never used
    This doesn’t come up in the newer version of tc23

    So what do I have here?

    ty Jixzer
     
  45. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    You're on 2.3, just checked I also get the 2.21 version when checking about but definitely have 2.31 - so I guess Nathaniel forgot to update the version number. And the documentation tab is definitely new in 2.3.
     
  46. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I indeed forgot to update the version number inside the code, so you do have 2.31. As Seneral says I added the documentation button.

    Nathaniel
     
  47. Jixzer

    Jixzer

    Joined:
    Feb 3, 2014
    Posts:
    15
    ok thank both of you for the quick responses.
    And to Nathaniel your doing some fantastic stuff here!

    Jixzer
     
  48. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    if your talking about placing Cliff meshes, I disagree, Gena is great for procdeurally or manually, or can use Run time to place stuff like that and does a fantastic job of it.

    @zenGarden Now using TC2 with World Streamer, I do all the time with TC1, now TC2, Gaia, Map Magic, Works great. I tend to export out the terrain tiles. then use World Streamer for the actually streaming.
     
    Mark_01 and Seneral like this.
  49. ytrewq

    ytrewq

    Joined:
    Aug 5, 2012
    Posts:
    42
    We needed exact values for height and angle in splat mapping, so slider without explicite numbers did not fit for this. That's why I modofied on oh the methods in TC_ItemBehaviourEditor.cs script. hope it will be useful for someone.

    public void DrawMinMaxSlider(SerializedProperty property, float minValue, float maxValue, float limit, GUIContent guiContent, float width = -1)
    {
    GUI.changed = false;
    EditorGUILayout.BeginHorizontal();
    Vector2 v = property.vector2Value;

    if (width == -1)
    {
    EditorGUILayout.PrefixLabel(guiContent);
    EditorGUILayout.MinMaxSlider(ref v.x, ref v.y, minValue, maxValue);
    //EditorGUILayout.LabelField("");
    //rect = GUILayoutUtility.GetLastRect();
    //v = GUIW.MinMaxSlider(rect, v, minValue, maxValue, new Vector2(rect.width, 50));
    }
    else
    {
    EditorGUILayout.PrefixLabel(guiContent);
    EditorGUILayout.MinMaxSlider(ref v.x, ref v.y, minValue, maxValue);
    }

    EditorGUILayout.EndHorizontal ();

    EditorGUILayout.BeginHorizontal ();

    float minInputVal, maxInputVal = v.y;

    minInputVal = EditorGUILayout.FloatField ("min", v.x);

    if (maxInputVal < minInputVal)
    maxInputVal = minInputVal;

    maxInputVal = EditorGUILayout.FloatField ("max", maxInputVal);

    if (minInputVal > maxInputVal)
    minInputVal = maxInputVal;

    minInputVal = Mathf.Clamp (minInputVal, minValue, maxValue);
    maxInputVal = Mathf.Clamp (maxInputVal, minValue, maxValue);

    v.x = minInputVal;
    v.y = maxInputVal;

    EditorGUILayout.EndHorizontal ();

    property.vector2Value = v;

    if (property.vector2Value.x + limit > property.vector2Value.y)
    property.vector2Value = new Vector2 (property.vector2Value.x, property.vector2Value.x + limit);

    if (GUI.changed)
    {
    // if (property.vector2Value.x < limit) property.vector2Value = new Vector2(limit, property.vector2Value.y);

    AutoGenerate();
    }
    }
     
    doq likes this.
  50. ytrewq

    ytrewq

    Joined:
    Aug 5, 2012
    Posts:
    42
    Values are relative, in range [0, 1]. So calculatior is need to convert from absolute values to relative.

    minMax.png