Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

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

  1. interfacelab

    interfacelab

    Joined:
    May 1, 2017
    Posts:
    2
  2. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    93
    Hello everyone
    I would like to know the progress of implementation for "vegetation studio" a tc2
    More I am amazed by the new addition that he make (it works fast and well)
    Here no evolution?
    There is even more need to use trees and grass that eats all fps and slows tc2
    (Google traduction)
     
  3. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Hey, I'm the one doing the integration so far. There are actually several phases planned...
    Currently, VS is updated and vegetation is placed whenever TC2 generates heights and splats. That part works wonderfully, but it still relies on VS's spawning. If you want to place vegetation with TC2, we have to wait for @LennartJohansen to implement point cache input so it will use TC2s generated data.
    I also got the idea to pass the texture output of TC2s grass and tree outputs and even object to VS to use as a mask, for grass that is certainly viable, but the other outputs directly work on the point data, so I'm not sure how and when that'll be possible.
    I also planned integrating my painter with it, so you can paint vegetation but still use VS's native spawning system.
    Still, some of the features of VS needed for these integrations are still in development and might not even be on the first release...
    If you're in the VS beta and want that first version of integration, just shoot me a PM:)
    Seneral
     
    recon0303 and Alverik like this.
  4. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    Hi all, I was hoping someone who knows TC2 better than I do could help me figure out how to do something. I have a terrain that I've made in TC2 and I'm trying to take a section of it and make it flat. I'm using the Constant node to do this. So far I've been able to raise the terrain that was lower than what I want, but I can't seem to figure how to flatten the terrain that is above the flat.

    Here is a shot that I hope explains what I am trying to do. The white checks are where the Constant Node correctly raised the terrain to the flat level. The red are the areas that I want to flatten down. I don't want to raise the terrain any higher than it is so I need to flatten down the hills inside the Constant Node.

     
  5. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    I assume you do that with the max operator so terrain lower than your constant node is raised to your constant value. If so, you can apply that concept the other way around. Not with the same node unfortunately, so just duplicate it and set it's operator to min, so any terrain higher than your constant value will get flattened:)
     
  6. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    I tried that. When I do that it flattens the entire map except for the area of the constant. Pic below shows the result and my nodes. All other nodes are inactive so I am just focusing on the first three.

    If I move the node on the far right in front of the island, I get the same result as the previous post. :(

     
  7. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    Oh and I increased the brightness of the constants so they could be seen easier. In TC they are very dark gray since they're both low height (15).
     
  8. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Oh sure, forgot. It uses the dark area around it, too. This has to be white, while the constant value still has to remain the same. A bit tricky, just invert it (with a curve or whatever) and adjust the maximum value so it matches again (usually size.y-height depending on scale). And because that requires you nasty synchronization between the two nodes to work properly, just put the first constant node really high, so you get a large platform, and then use the min node to adjust the height (or rather the inverse of the height). That way you can ignore the first node when you change the height:)
     
  9. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    Ok cool, I will give that a try. Thank you very much!
     
  10. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    No matter what I do I can't get the background to be white while still having the constant. It's either full white or none at all. Sorry, I am sure I am missing something simple, but I can't seem to get this to work.
     
  11. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    36
    Ok, I think I figured it out. For some reason I couldn't get the constant to work, but using a rectangle worked perfectly. Thank you again for the advice Seneral, very much appreciate it!
     
  12. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Hm that's weird. Maybe you didn't have clamp enabled on the constant? Else this might be a bug or at least unexpected behaviour... Might send that case to Nath. Glad you figured it out:)
    Seneral
     
  13. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    In TC2 is there a way to be able to rotate around a specific point? I've created a piece of terrain that's exactly what I want, but oriented incorrectly. The piece I want to keep happens to not be near its layer origin.

    Edit: Solved! In the TC2 window, go to Settings and then un-hide the TerrainLayer GameObject. Create a GameObject of your own at the origin you wish to rotate around. Make your origin GameObject a child of the TerrainComposer2 GameObject, and the TerrainLayer GameObject a child of your origin GameObject. Rotate your origin as desired.

    :)

    It'd be good if a way to do that was built into the UI, though. TC2 has a habit of deleting GameObjects put into its hierarchy, so it took a bit of trial and error to get that working, and I'd be surprised if it doesn't cause issues elsewhere.
     
    Last edited: Aug 7, 2017
  14. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Well you can move it manually to that point and then rotate it, fastest way I know of.
    And there's an option to more the layer pivot without affecting children, click Lock Children on you parent layer, move it to that pivot you want to rotate around, click Unlock and then you can rotate the layer and it's children around that pivot:)
    Hope that helps. Manually fiddling with the hierarchy is a bit brute force if you ask me:)
    General
     
  15. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    Manually move what to the point? My issue was that I could rotate any node around whatever arbitrary point its handle was at, but I don't (didn't) know how to get the handle to somewhere useful without changing the data. This sounds like the solution I was looking for...
    ... so thanks! I'll give that a go next time. :)

    Well, yeah... that's why I was asking. :)
     
  16. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Well this assumes you do not need perfect placement... is your terrain somehow exactly measured so you need to arithmetically rotate around a certain pivot? Probably not, it's usually enough to just rotate and position it manually:) As I said, fastest but not accurate....
     
  17. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    is this for everyone in beta? for VS and owns, your tool:)
     
  18. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Hehe sure, anyone in the VS beta and who has TC2 can PM me, as I said it's just a basic integration, two blocks of code:)
    Eager to implement more advanced integrations between these three tools, but those are for a later date as of now:)
    Seneral

    EDIT: For simplicity, I'll just post it here:)
    Add this block in TC_Generate.cs/l.1128 in ComputeHeight after the terrain height is assigned:
    Code (csharp):
    1. #if VEGETATION_STUDIO
    2. Vector3 areaSize = TC_Area2D.current.bounds.size;
    3. Vector3 boundSize = Vector3.Scale(areaSize, new Vector3(generateRect.width, 1, generateRect.height));
    4. Vector3 boundsPos = Vector3.Scale(areaSize, new Vector3(generateRect.center.x, 0, generateRect.center.y));
    5. boundsPos += TC_Area2D.current.currentTerrain.transform.position;
    6. Bounds changedBounds = new Bounds(boundsPos, boundSize);
    7. AwesomeTechnologies.Common.VegetationStudioManager.RefreshTerrainHeightMap(changedBounds);
    8. #endif
    aswell as this block in a similar fashion at the end of ComputeSplat (about l.1300):
    Code (csharp):
    1. #if VEGETATION_STUDIO
    2. Vector3 areaSize = TC_Area2D.current.bounds.size;
    3. Vector3 boundSize = Vector3.Scale(areaSize, new Vector3(generateRect.width, 1, generateRect.height));
    4. Vector3 boundsPos = Vector3.Scale(areaSize, new Vector3(generateRect.center.x, 0, generateRect.center.y));
    5. boundsPos += TC_Area2D.current.currentTerrain.transform.position;
    6. Bounds changedBounds = new Bounds(boundsPos, boundSize);
    7. AwesomeTechnologies.Common.VegetationStudioManager.RefreshTerrainSplatMap(changedBounds);
    8. #endif
    This will update VS's vegetation placement when TC2 updates the terrain heights or splats. Notice the conversion of the generateRect into worldspace bounds is the same.
     
    Last edited: Aug 7, 2017
    recon0303 and Alverik like this.
  19. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    It wasn't "exactly measured" but nonetheless, in this case, that's exactly what I needed. ;)

    In this case I'd made some terrain, identified an area in it I liked, and used a mask to turn it into an island. I wanted to rotate the island, but it happened to be nowhere near the origin.
     
  20. interfacelab

    interfacelab

    Joined:
    May 1, 2017
    Posts:
    2
  21. fx77er

    fx77er

    Joined:
    Apr 20, 2015
    Posts:
    6
    Hi Guys
    TC2 is driving me crazy. Please help me.
    I am playing around to find out how TC2 is matching in our projects. All is fine but the following strange behavior which i can't explain.
    Let me break it down.
    I created a Roadmap (just for testing, no heights) black and white to mark my ways in the splatmap. Lets say white is the ways and black is the grass.
    Map:

    Splat:

    But when i now use the same map to mask my grass, it seams the image is a little translated and maybe scaled. Grass and splatmap don't fit exactly.

    Grass Settings:


    Due we have some complex terrain structures in some projects it is not possible to scale and translate one of those maps by hand. Shouldnt i expect them to fit without translating?

    Result:

    All nodes are not transformed (standard values). the image is either the same image or, in testing the exact same resolution. I tried with and without raw, jpg, png, Power of two and power of two plus one, allmost any resolution, whatever. I even reimported TC. Nothing seems to fit.

    Anyone any idea what i am doing wrong?

    Thanks in advance

    Basti

    PS: Fighting to upload the screens, please be patient. has been a long day ^^
    PPS: The forum wont accept my result screen (inappropriate or spam).. not my day... http://fs5.directupload.net/images/170808/4z5idcjg.jpg
     
    Last edited: Aug 8, 2017
  22. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
  23. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    @ff77er I also notice the grass shifting, not staying in the boundaries of the mask.
     

    Attached Files:

  24. fx77er

    fx77er

    Joined:
    Apr 20, 2015
    Posts:
    6
    Jip, exactly what i am noticing
    I tried to use terrain -> splatmap as mask for the gras which brought better results but still not what i am expecting

    Edit: 118 Pages of threads and we two are the only ones who are experiencing that... really?
     
    Last edited: Aug 9, 2017
  25. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    not everyone uses TC2 for grass. Just saying. Be sure to report it, to Naths email. I'm sure it should be an easy fix. something he may be able to hot fix . I know he is super busy with his game, but he does reply on Skype as well. When he can. I tested it a little bit ago, and didn't get that issue, but that don't mean much, prolly a bug .
     
  26. fx77er

    fx77er

    Joined:
    Apr 20, 2015
    Posts:
    6
    Thank you recon, I think I'll give that a try and write to Nath. As beeing a developer myself, I just try not to be too much of a pain to the developers if there is a chance to get support in a forum. I just didnt think it was such an uncommon problem I ran into.
    May I ask what you are using for spawning gras based on mapdata?
     
    Last edited: Aug 9, 2017
  27. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I will be happy to share info but I dont promote other tools on someone else forum, not really professional so your welcome to PM me.
     
  28. fx77er

    fx77er

    Joined:
    Apr 20, 2015
    Posts:
    6
    Kudos my friend, that's fair sportsmanship.
     
    recon0303 likes this.
  29. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Nathaniel
    Yes you can manipulate it with TC2. GIMP is a free and open source and it supports RAW files:
    https://www.gimp.org/

    Yes you can't change the TC2 folder atm.

    I will look into this today.

    For manual terrain editing and keeping the changes I recommend to use Senerals TC2 node painter. It's more powerful then Unity terrain brushes and it can paint on multiple terrain tiles.

    Nathaniel
     
  30. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    As for the flickering issue on Mac. It's something that is wrong on Unity side in Metal Unity Editor, I will contact them and ask if they can take a look into this.

    I'm looking into this offset issue, got a report as well that it happens too on splat texturing. Will post a fix for it today...

    Nathaniel
     
    syscrusher likes this.
  31. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Last edited: Aug 11, 2017
  32. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    Tutorial Request TC2 + Multi Terrain Height maps + World Machine (or other, Wilber, Photoshop etc.)
    Getting Terrain to look massive has been a challenge. There is aliasing in TC2 that does not happen with default Unity terrain and I'm not sure why. Nathaniel's helpful demo scene has the kind of world size I'd like to make.
    What is the workflow to get the tiled, massive mountains as shown in the tutorial video?
    unityTc2_MultiTerrain.png
    1. is it best to export Tiled Heightmaps from WM (World Machine) into Unity?
    2. Height map resolution, Height map size and Terrain size?
      • the imported Height-map is 2049x2049 or 4097x4097
        the TC2 Terrain Resolution is 2048.
        If I set TC2 Terrain Resolution to match the Height-map 4097, the terrain becomes aliased.
    3. My test workflow - Photo Real Terrain
      In Photoshop, create or edit 16bit grey scale 72ppi.PNG and save as RAW
      If saved at 2048 or 4097px does Unity automatically add the +1, or do the maps need to be created 2049 or 4097?
    • TC2 "RawFiles" converts 4097px 16bit grey scale image and converting it to 2048px Stamp.
      Why in this case, does a stamp with power of 2 work as a Heightmap, when there supposed to have the +1?
     

    Attached Files:

    ftejada likes this.
  33. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Trying to answer a few questions...
    There is no specific workflow to creating big mountains - I agree there's more to it than just scaling it up:) Actually, making the scene feel gigantic is not always easy.
    First off, you have no reference points in your scene (yet) that would give the viewer a sense of scale - splat map, for example, but more importantly trees and stuff the viewer knows the real scale of. I think that is probably the most important aspect and the easiest to mess up! Then, there's perspective - you're looking down on the mountains, whereas in the video the camera looks up from a position very near to the ground with scale reference points (the houses).
    Finally, there's some effects that strengthen the large scale look, like the fog. The tip of the mountain visibly fades in a distance fog, which might help - other effects might do aswell, but atmospheric fog is definitely a good start:)

    Regarding your raw heightmap questions - TC2 does not scale down your images in any way. If put in a RawFiles folder it generates a lower res preview image of it, true, but it is only used for referencing the raw file. Don't put the image in a normal image node, but a raw image node, and it uses the raw file:)
    The stepping/aliasing you see means the image resolution is lower than the terrain heightmap resolution. Could be you used the lowres image as explained above. From your image it also looks like you assume the terrain size is the resolution (atleast that's what you're comparing in the last screen between TC2 and Unity). But you need to make sure your resolution matches up, which is the next TC2 tab:)
    You can safely ignore the +1 - I never had to mess with it, just keep the power-of-two and Unity adds the 1 internally...

    Hope it helps a bit:)
    Seneral
     
    Alverik likes this.
  34. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Tbh, I've personally never managed to get any raw file to open in any free program... and I think I searched alot. GIMP does support raw with certain extensions, as seemingly many programs do, but when they say RAW they usually mean some sort of camera-related raw files which is different than the true raw data files used by TC2 and Unity. (On that note, might be simple to do an extension for GIMP to do that, since it's really simple after all. Anyone? :))

    If I'm allowed to say so, my TC2 Node Painter allows import and export of these raw files and allows conversion in PNGs atleast, so you can edit them externally. But you loose precision this way, because unity only supports 8Bit files... I think of adding some external image format that supports 16 Bits like TIFF if there's need.
    If it's only painting and simple modifications (contrast/brightness) that you want you can do that inside of the painter of course, that'll allow you to keep the 16Bit:)

    Seneral
     
    neoshaman likes this.
  35. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
  36. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    What is the real state of TC2 on Mac? There's a lot of conflicting information. The documentation still says "Doesn't work on Mac", other reports here in the forum says it does, yet others report no success in getting TC2 to run on the Mac, despite Metal support.

    I'm using the latest version of TC2 with Unity 2017.1 and "Generate" for the example scene simply hangs Unity.

    We've seen "I hope to get [Mac] support working next/this month" a number of times now. What's making you deprioritize the Mac version month after month? We all understand the 5.6 and Metal considerations, but Unity is way past 5.6 now. Some of us have been waiting very patiently for Mac support for a very long time.

    As alternatives are beginning to appear, it would be good to hear how you reason about these things.
     
    Last edited: Aug 12, 2017
    syscrusher likes this.
  37. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    It works for some people but not for others. I'm beginning to think it's due to the GPU. I have nvidia 750M and TC2 flickers the entire interface, unusable. A colleague has Radeon R9 and it works fine. So maybe older GPU models can't handle it well, or just old-and-tired GPUs. Would be interesting to see what GPUs everyone has and if TC2 works or not. (Metal works fine for me with World Creator, though.)
     
    _Luthien_ likes this.
  38. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The real state is that I did my part to make TC2 compatible with Metal. The flickering/hanging seems to be a bug on Unity's side. Luthien did a bug report on it and Unity replied they could reproduce it and they are looking into it:
    https://fogbugz.unity3d.com/default.asp?894663_ek2brkhtnekl5flt

    Nathaniel
     
    PeterB, syscrusher and hopeful like this.
  39. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Glad to hear that Unity is on it (and I'm not saying it's not Unity's problem to solve, but we all know how long that can take) -- but for those of us stuck in the current situation, I still think the GPU might be a factor. Luthien has a GT 650M and I have a 750M, and we both have the flickering, but Radeon R9 works fine. So I'm curious to hear what GPU PeterB has. (Mainly because I'm trying to decide whether to move up my plans to buy a new MBP so I can get to work with TC2.)
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The workflow for getting terrain look massive is just setting the terrain height to real world size. So if you want a mountain that is huge like 3500 meters, terrain size y needs to be at least 3500. All you need to do is drag and drop you stamp preview image and scale the node up.

    You don't need to export tiled heightmaps from WM, TC2 can handle 16k heightmaps from WM. You can directly export R16 from WM as this is 16 bit raw grey scale that TC2 uses. I made the TC2 stamps with WorldMachine...
    Exporting from WM I explain here:
    http://www.terraincomposer.com/terraincomposer2-documentation/#frequently-asked-questions

    So you can skip entire point 3, just export R16 from WM, drag and drop into a RawFiles folder in your Unity project. TC2 creates a preview image in the folder above, drag and drop that on a TC2 node.

    TC2 leaves the resolution of the Raw file exactly like it is and you can go up to 16K, and you can position/rotate/scale the node and it shouldn't give any blocky-ness.
    upload_2017-8-12_20-50-22.png

    You are right, I'm able to reproduce the blocky-ness issue if I scale the terrain more up. I found the issue and fixed it, you need to import the 'TC2 blocky-ness fix'.

    Nathaniel
     

    Attached Files:

    Last edited: Aug 12, 2017
    Alverik and hopeful like this.
  41. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes Radeon is AMD and Geforce is Nvidia, it might be a GPU driver related issue. Do you have the latest Nvidia drivers installed?

    Nathaniel
     
  42. _Luthien_

    _Luthien_

    Joined:
    Apr 24, 2015
    Posts:
    52
    It's rather annoying though that this is also the last thing I ever heard from Unity. I can no longer log on Fogbugz (which is a bit odd in itself) and there's no way to figure out whether there's any progress on this issue. When I originally submitted this issue, the reply stated that:

    but I can find no mention of this issue there at all :( ...

    EDIT

    I just found the issue in the Issuetracker after all!

    It's here: https://issuetracker.unity3d.com/is...ws-flickering-when-using-metal-editor-support

    Please upvote this ticket; maybe that helps!
     
    Last edited: Aug 12, 2017
  43. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Yeah, I did upgrade my Nvidia driver, no help. But true, it still could be manufacturer rather than generation issue. I guess that's the one upside of AMD in the latest MBPs.
     
  44. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    Thank you! when being new to it's difficult to know how much is ignorance or an actual issue. ..i'm not crazy (downloads fix) ..i'm not crazy...
     
  45. eagle555

    eagle555

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

    I have a fix for the splat/grass offset issue. Let me know if it works now...

    Nathaniel
     

    Attached Files:

    fx77er and Seneral like this.
  46. fx77er

    fx77er

    Joined:
    Apr 20, 2015
    Posts:
    6
    Guys it's been a rough week with illness, lot's of traveling and a big hassle with my son's mum.
    Sorry that i wasn't able to reply earlier. I'll do better next time :p

    Thank you very much. I really appreciate that. I'll gonna give that a try asap. Hope to get a dive into it during the weekend. I'll let you know as soon as i can. Thanks again. Btw. If you''ll ever be in germany (neer Frankfurt or Mannheim) let me know. Theres some beer and ribs i owe you :)

    Sebastian
     
  47. WileE

    WileE

    Joined:
    Apr 12, 2016
    Posts:
    21
    Same or different problem on Mac/Metal?
    (TC2 2.59 patch, Unity 5.6.3, macOS 10.12.6, Radeon R9 M390) 7x7 terrain area, 1km each, 1024 splat resolution, with splat image masks scaled to 7000 to match the overall terrain size.

    Splat generation does not work with more than one splat layer defined (second image below).

    The TC window shows individual layer nodes being rendered, but the result node for each layer and the entire Splat Output remains blank in the TC window. On the terrains themselves, a single splat covers the entire terrain no matter what mask nodes were created for that splat.

    One splat layer will generate. (first image below)

    The same project generates properly on the same hardware and Unity version under Windows 10 DX11.

    single splat generation.png Empty Splat Generation.png
     
  48. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    @eagle555 I tried to parent spawned objects to a created transform (Parent Mode: Existing) but after each terrain spawn the childs of this parent are destroyed. In the end i have the spawned objects of the last terrain spawned, all others are empty. Is it possible to clear the parents in the Existing Parent mode only at start of the generation operation?
     
  49. terapong

    terapong

    Joined:
    Mar 5, 2013
    Posts:
    17
    why splat texture in angle node draw wrong position.
     

    Attached Files:

  50. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    It's a bug and has already been fixed, check Nathaniels post about it:)
     
    terapong likes this.