Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Terrain Composer2 a next generation GPU powered terrain tool.

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

  1. user1j3di3j2sa3

    user1j3di3j2sa3

    Joined:
    Nov 5, 2012
    Posts:
    566
    "What would be easier is to able to export it as 1 heightmap I will make that in the next update. TC2 has the _x1_y1 export. I will put the comming time into getting TC2 out."

    That sounds great Nathan, your solution is better :)
     
    Last edited: Dec 28, 2013
  2. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Thanks again for the reply.

    I am still being daft and a control freak...so I like your final suggestion about having different layers for each item and then setting the layer strength value.

    Just dealing with grass at the moment, i am trying to see if i understand this:
    Say I have a terrain 1000 meters on 1000 meters on 600 meters height, with the following resolutions: 1024 for width and length and 1025 for height resolution. Detail resolution of 1024 and Detail per patch 128 (what do these mean?) - does it mean I can only have a max of (1024 squared) grass items.
    With grass density set to 16...

    Now i want to figure the actual size of a position:
    I need 2 parameters - the surface size of the terrain, and the numbers of positions.
    As the number of positions is based only on heightMap resolution squared, and the surface size is fixed (But i don't know how to get to this value) then:
    Size of a position = surface size of the terrain / (heightMap Resolution * heightMap Resolution).

    If this is right...any suggestion's on how to get the terrain size value?

    Knowing the actual size of a position will definitely help me sort out the density issues.


    Nim
     
    Last edited: Dec 27, 2013
  3. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    As for detail per patch, it's descriped in the Unity manual in the terrain part. It is the combined grass patches in runtime to reduce draw calls. I read that 8 and 16 are the best settings, otherwise at the end of your grass distance Unity will draw big junks of new grass squares with too high settings.

    As for resolution, yes that's what it means. 1024 horizontally and 1024 vertically. So you have a grass patch each 1000/1024 = 0.976 meter.

    The number of heightmap vertice position is based on heightmap resolution, while the position of a grass patch is based on the detail (grass) resolution. So you don't need heightmap resolution if you want to calculate your grass position. All you need to do if you want an exact spot is measure it with the measure tool ;). For getting the detail cordinates, look at normalized local position in the measure tool and multiple it with grass resolution.

    Nathaniel
     
  4. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    631
    Any way to disable DOF in that "TheSearch" demo (or build a new one w/o DOF)? Would really like to see what the terrain looks like normally. Thank you.
     
  5. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    just disable it ;) press m for menu... oh and download v1.1 in case you have not!
     
  6. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    631
    Have a link to the v1.1 demo? Assuming mine is older as the menu had no DOF option. Thank you, by the way!

    Edit: What I see:

    $menu.jpg

    Edit 2: Found it; had to remember where I got the original demo. Will report back after it's downloaded and I've had a chance to run through it.
     
    Last edited: Dec 27, 2013
  7. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    631
    Very nice. Performance seems to be the most influenced by grass density/distance, and the results can be dramatic (depending how much is sacrificed).

    Have any other ideas to optimize the terrain? Would occluder planes/brushes hidden under the hills to hide areas when down in a valley work?

    And lastly, is heightmap exporting limited to just JPG/PNG, or are other formats available? For example, if I made a terrain that I wanted to use its heightmap in Crytek... is this possible?

    Thanks!
     
  8. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    If TC has erosion like WM it could be...TC and WM work great together. You can use TC to import everything you made in WM, and make tweak on import WM files.

    Nathaniel
     
  9. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Tree distance also influences a lot. Using occlussion culling could have some benifit, although Unity needs to update their terrain core engine.

    You can vote for it here.
    http://feedback.unity3d.com/suggestions/improved-unity-terrain-core-engine

    Heightmaps are exported as 16 bit raw image files in TC. Because a heightmap uses 16 bit height percision, jpg/png images are 8 bit which will give you 'blockery' terrain. Yes you can use these 16 bit raw height images in other programs like Photoshop, WorldMachine, etc.

    Nathaniel
     
  10. user1j3di3j2sa3

    user1j3di3j2sa3

    Joined:
    Nov 5, 2012
    Posts:
    566
    Yep the workflow for my current project

    1: TC 4x tiles with main terrain design
    2: into WM
    3: RTP3

    Nice combo :)

    Do you know if it's possible to see Unity's terrain collider?

    is an erosion filter really difficult to make?
     
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    It's not possible to see Unity's terrain collider. The terrain collider is a special collider made for the terrain and works with the terrainData heightmap. It's many times faster as a mesh collider.

    Yes making erosion like WM is not easy, otherwise there would be much more terrain programs with such erosion...WM has some secret magic algorithms...

    Nathaniel
     
  12. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Problems with curves and splat textures:

    I have been trying to set 2 splat textures to a certain height range,
    Having them mixed and distributed at random.
    I calculated the normalized height range to be between 0.02 - 0.08

    I Set the filter as follows:
    $FilterSettings.jpg

    Then i set the subfilter:
    $SubFilter.jpg

    Now comes the catch you have to use the following kind of curve:
    $CurveCorrect.jpg

    Trying to use a simple curve clamped to the values of my normalized height range doesn't work.
    $CurveWrong.jpg

    The reason it doesn't work is because at the other height values, which are NOT on the curve - TC will set the splat chosen to have an alpha value of 1!
    Is this the intended behavior? I hope not.
    I'd rather use a simple clamped graph.


    Nim
     
    Last edited: Dec 28, 2013
  13. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello Nims.

    Your first curve is correct. As for your second curve all values are 1 and that is how a curve works in Unity. You can see the grey line on each side going continuing on 1. You can check this out yourself by evaluating an Animation curve by code. So yes this is intended behaviour and the way Unity made it.

    // Attach java script to gameobject in hierarchy, and make your second curve.
    var curce: AnimationCurve;

    function Start()
    {
    // evaluates position 0 on the curve, it will be 1
    Debug.Log(curve.Evaluate(0));
    }

    The first curve gives you much more options, you can even use a fall off to get smooth blending with other splat textures.

    $height_curve.jpg
     

    Attached Files:

  14. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    change the curve type to constant and define your limits, i dont get what is there to complain about...
    how else will you define your zero value? clamp just clamps your values and wont set them magically to zero. I am pretty sure that's the intended behaviour!
     
  15. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    631
    Yeah, imagined it would, but there weren't that many in the demo compared to grass.

    Nice, and 64-bit, too. Used all 10 votes.

    Excellent! Thank you.
     
  16. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Thanks Nathaniel, I had never noticed those grey curves before you mentioned it and i can see the benefits of having rolloffs , for easier transitions between texture alpha values. Just a bit more work defining the curves :)
    I am guessing that if the total splat values exceed 1 for any point TC just calculates all the alpha values of the different textures used to sum up to 1?

    Very odd suggestion there...considering there is no such option for curves in TC. You only have 3 types of curves Normal, Random and Perlin. Please show me how you set your curves to a constant type. As i said i wasn't expecting the values which are not on the curve to default to the value at the end of each curve. It is perfectly reasonable to assume that values which are not on the curve will default to zero.
     
    Last edited: Dec 28, 2013
  17. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    $curve.jpg
     
  18. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Here are some screenshots of golf course model that I have modeled with the help of Terrain Composer and RTP in Unity Free. The total area is 2400x2400m. Only the last 2 screenshot are with mesh trees and therefore there is no shadows in earlier pictures. Naturally this is still WIP and there is still a lot do. Anyway, Terrain Composer and RTP just perfect for my needs. I would just hope that I would have the time to really learn these tools because I still use only small part of their functionality.











     
    Last edited: Dec 29, 2013
  19. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Very very nice :D

    You might want to increase your ambient light a tiny bit and make it just a tint more blueish ;)
    (i say this sentence so often it might become my nickname, lol...

    Also make the sun a bit more yellow to get some warmth in your colors. The sky is a pretty strong and very diffuse lightsource. if you have weak contribution of your sun you might want to bring your shadow strengt down.

    I think you know this already, judged by the quality of your work. I thought you might appreciate the oppinion of fresh eyes as sometimes its hard to see things clearly after spending much time on something!
     
  20. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I don't want to spoil this thread and this is the reason why I write it short. Thanks a lot for the tips! These things (ambient light and sun light color) made a huge improvement. I am just beginner with Unity and I only use it to create architectural visualizations, not for gaming purpose. Therefore, all the tips are more than welcome :D.
     
  21. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello Mk1978,

    Wow that looks awesome!

    Peter as an artist is really good in setting up lighting conditions, I learned a lot from him. Feel free to post screenshots with his suggestions applied ;).

    Nathaniel
     
  22. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    389
    Cheers for this Chad :)
     
  23. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    Is there support for non square terrain tiles? Or is that a Unity limitation? My World Machine project is rectangular but I guess I could just have a lot of blank space
     
  24. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    That's a good question. At the moment it is possible, but you would have position the non square terrains yourself into TerrainComposer. As TC only creates square terrains. It is possible in TerrainComposer 2 to create any terrain shape possible.

    $TC2.jpg

    At the moment I'm working again on finishing TC2.

    Nathaniel
     
    Last edited: Dec 31, 2013
  25. Frantico

    Frantico

    Joined:
    Jun 1, 2013
    Posts:
    16
    Hi Nathaniel thanks for your truly amazing asset. I have just one question, I have had no problem with 2x2 tiled terrains but was creating a 3x3 terrain today and got this problem when importing from world machine. Seams like the problem is with World machine because they are tiled wrong and just flipping the terrains don't work like they are rendered wrong if you know what I mean. Got any tip? (I am already flipping the y axis in WM) $terraincomposer.jpg
     
  26. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello,

    You also have to flip to y-axis in TC when importing tiles from WM. Can do it in filter -> settings.

    Nathaniel
     
    Last edited: Jan 1, 2014
  27. ChadH

    ChadH

    Joined:
    Aug 28, 2012
    Posts:
    101
    Very nice !!!
    I almost forgot what TC2 looked like :p

    Looking forward to its release :D
     
  28. ChadH

    ChadH

    Joined:
    Aug 28, 2012
    Posts:
    101
    Glad I was able to help in some way ;)
     
  29. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,315
    Sorry for the probably noobish question, but I finally got into Terrain Composer yesterday and can't quite wrap my head around how the layers work. I'm trying to make my splatmaps for terrain texture; I want three textures that are based on height - I got that part working. But then I'd like the fourth cliff texture to only show up where steepness is over a certain threshold... and I need the whole thing to end up normalized (all 4 channels adding up to 1.0, so that RTP doesn't get weird results). Adding a second layer with the fourth texture and some kind of curve tends to set the fourth channel to 1.0 (or whatever the layer's strength is) everywhere because only having one texture in the list means any output value will get fully textured. How can I have it add the fourth texture in an amount relative to steepness? Subfilters? And how can I ensure that in the end my whole splatmap is normalized?
     
  30. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    That's a good question.

    Each filter in splat textures paint on the terrain. So what you get that the 4th texture is added but the result there is 2, the total splatmap value, should be always 1 on the terrain. You can measure this with the measure tool.

    What you need to do is make the second layer with your 4th texture as an overlay. A filter chooses the splat textures, while a subfilter is always density. So you need to add a subfilter on steepness (as you want to only paint it on steepness, while in the first layer the splat textures are choosen on height). Then in filter setting you set this to an overlay, filter output to change and level to layer level.

    Let me know if that helps ;).

    Nathaniel
     
  31. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    I've exported a simple black and white bitmap from WM with white dots where I want one of 3 trees randomly placed. Here is a pic of my settings. It just throws trees around everywhere and ignores the image. What am I doing wrong? It is probably something dumb and simple. I remembered you had a video that went over placing trees via a splat or image but I can't seem to find it.
     
  32. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    You have to use 1 color range. So disable 'one', and make the left color black and the right color white.
    You can see a blue button with help video tree layer, there is the direct link to the video....

    http://www.youtube.com/watch?v=y1fk7OoBbO4

    It's the help video tree layer one.
    www.terraincomposer.com/tutorials

    Nathaniel
     
  33. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,315
    Ah ha! That worked! Thanks. But, I'm not exactly sure how it works... I assumed that if I set the output to "Change", and the value from the subfilter was, for example, 0.4, that it would change the splat value there to (0,0,0,0.4). But instead it seems to add to the current splat value and then normalize? That's definitely more useful, but the word "Change" made me think it would overwrite the current value. What it's doing sounds more like a "Blend" than a "Change".
     
  34. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    491
    Doh skimmed the tree video and missed the bit at the end with the splat texture. Thanks Nathan.
     
  35. Zeronine

    Zeronine

    Joined:
    May 22, 2011
    Posts:
    24
    anyone know how object rotation maps work?

    I'm trying to orient buildings in a generated city map.

    Thank you
     
  36. Thorsun

    Thorsun

    Joined:
    Jan 6, 2014
    Posts:
    5
    Help! My Terrain Composer no longer shows up in my Unity-Window menu. I can't figure out how to get TC to load now. I tried reimporting it from the Asset Store. Didn't work.
     
  37. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    That's a bug in Unity 4.3. Somehow the window is still active, but not showing anymore. You can fix it manually. You need to find the TerrainComposer.js script in the folder TerrainComposer -> Editor.

    Then in the script find the 'function OnEnable', can use the mono search for this. It's about line 181. Then add this code:

    DestroyImmediate(this);
    return;

    So like this:

    function OnEnable()
    {
    DestroyImmediate(this);
    return;
    ....
    ....


    Then save the script. And let Unity recompile. Then open the TerrainComposer window again. It will not open, but disable the active window that is not showing. Then remove the code again, recompile and it should work again.

    Let me know ;).

    Nathaniel
     
  38. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    What change does is indeed overwrite. Its like an overlay. However how much the filter overwrites is determined by the output of a subfilter or strength of the filter itself. So if your subfilter result is 0.4 at a position, it will overwrite 40%...

    Nathaniel
     
  39. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,315
    Ah... ok, it all makes sense now. Thanks for the explanation. :)
     
  40. Thorsun

    Thorsun

    Joined:
    Jan 6, 2014
    Posts:
    5
    Got it working again. I deleted the package in the AppData/Roaming/Unity/Asset Store location and then downloaded it again and imported.
     
  41. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    I checked rotation map, it's not working anymore in the current version as I changed something in rotations along the updates. I'm fixing it now for the next update.

    The way it works it that it will rotate clock wise on pixel color:
    Red 90 -> 90 degrees right
    Blue 45 -> 45 degrees right (to get total of 360 as max 255 per channel, so 2 channels are needed for complete rotation).
    Green 45 -> 35/255 = 0.137 degrees to the right.

    Unless you have blocks of same rotated buildings, it would be faster to spamn them without rotation, and rotate them by hand...

    Nathaniel
     
  42. Thorsun

    Thorsun

    Joined:
    Jan 6, 2014
    Posts:
    5
    Just wanted you (and others) to know that I had an issue with TC menu again. This time the TC option was still available in the Window menu, but it wouldn't open the TC menu. I used your DestroyImmediate script method and that worked.

    I'm very new to Unity and all its plugins, so I'm doing a lot of trial and error and I wind up deleting everything and starting over. Unity doesn't appear to like that very much.

    Anyway, got another question. I also installed the RTP3 stuff and was following along with one of the tutorials (which is really difficult to do with my slow internet connection. All the YouTube videos are in very low resolution which makes it impossible to see and read all the settings that are being changed in the tutorials.) I added the 4 terrain textures (grassy first and then up to snowy at the bottom for the top of the mountains), but they did not get applied as expected - by height. I had mostly grass everywhere with spots of the other textures in random places. It seems to be ignoring the height map info. Any advice on how to fix this? Thanks!
     
  43. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello Thorsun.

    It's really a Unity 4.3 bug as it never happened before in other versions. If you have TerrainComposer not displaying anymore in the Unity Menu. You have some errors in your console that need to be fixed. This can be from other packages or scripts.

    If you can't follow the video material, I recommend you read the documentation that comes with RTP. If you can get TerrainComposer to texture the terrain right without RTP in the project, and with RTP you can't get it to look the same, then you properbly need to setup RTP Lod manager in the hierarchy, how to do this is descriped in the RTP documentation. Or sometimes in Terrain Inspector in RTP script -> Settings -> Main -> Refresh All does the trick.

    Nathaniel
     
  44. celaeno

    celaeno

    Joined:
    Jan 31, 2013
    Posts:
    54
    Hello, where can I download the island and examples so I have the right textures for the prefab landscapes?

    Thanks
     
  45. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello,

    Click the help button in the top right of the TerrainComposer window...You will get the start screen with the download option ;).

    Nathaniel
     
  46. uds

    uds

    Joined:
    Jan 7, 2014
    Posts:
    5
    Hello,

    I'm trying to use TC with the Unity 4.3.2f1 (free).
    After a while I've remarked the the CombineChildren prefab in TC has its script missing.
    I'm assuming that the missing script is the CombineChildren.cs. Is it correct?
    But the strange thing is that this script is nowhere to be found in the standard packages of my Unity installation.
    Is it pro vs. free thing or the script has been deprecated? Or am I missing something?

    thanks
     
  47. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello,

    The combine script was part of the Unity included scripts, but since Unity 4.3 they removed it. I actually don't know why since combining static objects does help.

    Here's the original script from Unity:
    View attachment $MeshCombine.unitypackage

    Nathaniel
     
  48. uds

    uds

    Joined:
    Jan 7, 2014
    Posts:
    5
    Thanks for the prompt help, Nathaniel.
    Option to combine object meshes does work for me now.
     
  49. kerryenfinger

    kerryenfinger

    Joined:
    Jan 22, 2013
    Posts:
    14
    Nathaniel,

    I love Terrain Composer! It has really helped me to create a realistic large terrain. I have a question about the Slice Tool. I want to slice the terrain in my scene which is already populated with trees and foliage. I am not understanding the steps given in the manual about using the Slice Tool. I just want to split my current finished terrain into 9 sections. Can you make a video tutorial of using the Slice Tool or give a detailed explanation here on how I split my current terrain without starting from scratch?

    Thank you for the great tool!
     
  50. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,650
    Hello,

    The slice tool in TC can only slice heightmaps at the moment. I have a slice tool in TC2 that can slice every terrain into 4 terrains, and all those terrains into 4 again, etc. Splitting all the data into 4: heightmap,splatmap,trees and grass. I will get the slice tool in the next version of TerrainComposer, as I will get all TC2 code into the latest 1.x, as I improved 1.x a lot and actually easier to get TC2 into 1.x then vice versa. And it would need no explanation. As you just shift click <Slice> then, and it will be done automatically. There would appear 4 terrains in TC Terrain List. If you click it again, there will appear 16 terrains, etc.

    Nathaniel
     
unityunity