Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

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

  1. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    Hello. I just started really messing around with Terrain Composer and I noticed that Auto-Generate doesn't work. Is there something I need to do in order to get the function working?
     
  2. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Triax Game Studios,

    It will be a stream Lod solution as well as whole level load on demand sulotion. So massive terrains with lower Level of Detail far away and highly detailed terrain up close. Also loading objects based on camera position.

    As for the size, this would be unlimited. I already have a streamer but run into issues that would need a special programmed design for it and self made file structure/solution like Amplify Texture. The issue is that putting terrains and objects in the resource folder (this is then included in the build by Unity) is crashing Unity on compiling the build, because Unity loads all items from the resource folder into memory, causing out of memory 3gb limitation...Then another solution using an AssetBundle (only possible in Unity Pro) is not working either as the whole AssetBundle is loaded into memory as well...

    So the solution I'm working on is something totally new, and also works in Unity Free, and if able to get it to work would be something very unique and powerful for streaming massive enviroments.

    Nathaniel
     
    Last edited: Dec 10, 2013
  3. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You proberly click on the 'Auto' button which is not auto generate, but auto speed. If enabled it won't drop under the selected framerate in the Unity Editor. So this is for being able to continue to work in the Editor while generating, it's also a feature that can be used in runtime.

    To enable/disable auto generate. Shift click generate...

    Nathaniel
     
  4. JesseJoudrey

    JesseJoudrey

    Joined:
    Jan 11, 2013
    Posts:
    4
    Howdy

    I'm a big fan of terrain composer. I used it (and am still using it) for an Oculus Rift Skiing game.

    For another project, I just picked up WorldComposer. I hope it will be as helpful. I think it will.

    However, I'm having an issue with it. I can't seem to download any of the data required as seen in this screen capture...

    $Unauthorized.png

    Does anyone have any thoughts on why this might be?

    Cheers
    Jesse
     
  5. eagle555

    eagle555

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

    Read the first page of the WorldComposer manual ;), you have to create a free Bing key first.

    Nathaniel
     
  6. JesseJoudrey

    JesseJoudrey

    Joined:
    Jan 11, 2013
    Posts:
    4
    Nevermind, it was clearly explained in the docs. RTFM right?

    It would have been handy for a clear error message that sent me to the docs since I hadn't supplied any "Bing Key" it should be easy to detect when someone is having this problem.

    That's enough of that. Creation awaits!

    Jesse
     
  7. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes you are right. I will add the message to read the manual inside WC if there's no key in the next update.

    Nathaniel
     
  8. mngmhds

    mngmhds

    Joined:
    Feb 2, 2013
    Posts:
    21
    You sure do! I found them a few hours after I posted here, matter of fact, and the end result looks fantastic. I did have a few issues with keeping tree's off of steep slopes while maintaining the density I wanted; I'm still learning how to manipulate the curves and what effect it'll have, but I'm sure I'll get it right eventually.

    I also noticed that in 1.23 the runtime settings for the terrains is ignored when the game is built or is played. I haven't updated to 1.24, but I'm hoping this will be fixed; it would also help to gain a significant fps increase. Thanks for the quick reply!

    Edit: Just upgraded to 1.24 and the runtime settings now affect everything properly. Went from 40 fps to 110 fps (averaged) in the editor, but for some reason build's are choking at 15-20 fps.
     
    Last edited: Dec 10, 2013
  9. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you show a screenshot of your results? The runtime settings work fine here. TC attaches a script to every terrain. And upon the Start() function each terrain setting is applied.

    $RuntimeSettings.jpg
     
  10. mngmhds

    mngmhds

    Joined:
    Feb 2, 2013
    Posts:
    21
    After I updated to 1.24 it seems to be working just fine. I added an edit to my last post. I do get a warning message when I build the scene:

    Script attached to 'CombineChildren' in scene '' is missing or no valid script is attached.
    UnityEditor.HostView:OnGUI()

    I also get error messages when adjusting curve values in the TerrainComposer window:

    Style.Draw may not be called with GUIContent that is null.
    UnityEditor.HostView:OnGUI()
     
    Last edited: Dec 10, 2013
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    As for CombineChildren you need to go to Unity Menu -> Assets -> Import Package -> Scripts. This should import the meshcombine script.
    The draw error message in a curve window is an Unity 4.x bug and is in the CurveField component. There's nothing I can do about it. I will notify Unity about it and you also can make a bug report to Unity about it.

    Nathaniel
     
  12. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    Thanks for the information.

    I have one more question.

    I'm trying to make a place that has smooth rolling hills and I have something that's basically it. However, the textures are just blobs. It's not tiled at all, and I'm wondering how I can fix it. Any ideas? The titling is at 10, so I don't understand why they're not showing properly.

    Thanks in advance.
     
  13. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you show a screenshot?

    Nathaniel
     
  14. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    As for more tree density. You can use a higher tree resolution. To do this go to TC Terrain List -> Local Area -> Enable Tree Resolution toggle. Having it on 512, gives you max 512x512 = 262.144 trees for each terrain tile. Then shift click <Set All> to apply to all terrains.

    $tree_resolution.jpg
     
  15. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    $Terrain Screen.png

    Here you go.

    Maybe you can figure out where I went wrong.
     

    Attached Files:

    Last edited: Dec 11, 2013
  16. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    That has to do with basemap distance. Is it still blob at very close up? Do you use an additional terrain shader? Do you have a Michael O package in your project?

    Nathaniel
     
  17. Hilxs

    Hilxs

    Joined:
    Oct 16, 2013
    Posts:
    32
    Last edited: Dec 11, 2013
  18. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    TC uses Unity standard Terrain. Many developers use EasyRoads and TC on standard terrain without issues. I'm not sure why this happens, but it's best to contact the EasyRoad developer about this.

    Nathaniel
     
  19. Hilxs

    Hilxs

    Joined:
    Oct 16, 2013
    Posts:
    32
    Yep i will do this
     
  20. mngmhds

    mngmhds

    Joined:
    Feb 2, 2013
    Posts:
    21
    Thanks for the explanations, Nathaniel. I figured the second issue (Draw errors) was inconsequential as everything seemed to be working just fine. As for the first, I haven't had a chance to import the scripts yet, but I'll definitely take your word for it.

    PS. Thanks for the in-depth guide on setting tree resolutions. I had to make due with setting the total strength of the layer before I saw that.
     
  21. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    What is best practise for synching up TerrainComposer and WorldMachine?
    Let's say I've got a 3x3 kilometers terrain with maximum height of 600 meters sculpted in Unity.
    How do I synchronize the exported raw data inside WM in such a way that the heights match those I get in Unity?
    I've done WM -> Unity before but this time I want to recreate the scale as closely as possible.
    Setting the world project parameters to 3x3 kilometers and the altitude scaling of the file node to specific: 0 - 600 meters [both in WM] does NOT return a terrain that looks identical to the one in Unity. It is much steeper.

    Since we bought TC I'd like to hear what's your best practise with these kind of setups. :)
     
  22. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    It still looks like a blob up close. No shaders on the terrain as I started this scene from scratch with only a terrain (no lights or other objects in the scene). I do have two Michael O packages in my project, but I don't see how that would matter considering my scene isn't using anything from him. The ground textures I'm using are from the standard Unity texture packs.
     
  23. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The problem is that some Michael O packages contain additional terrain shaders. This overwrites the standard Unity terrain shader. Such shader has to be setup with a script, otherwise it will give a crappy looking terrain. You have to search for the shader inside the package content, terrain*.shader and delete it...

    I already contacted Michael serveral times to ask if he can remove them as it is very confusing. And many have the issue. He's planning to remove them from the packages.

    Nathaniel
     
    Last edited: Dec 11, 2013
  24. eagle555

    eagle555

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

    That's a good question. Unity works with normalized heightmap data between 0..1, then the terrain height is set in the terrain settings. If you export from WorldComposer you need to keep the heightmap at 9000, because then you get the true scale.

    If you import then into WM to add erosion, I found out it's a little better to import it a little more steep. Then when you later import it back into Unity again. You can change the steepness with filter strength or with the curve and make it matching to the old heightmap with TerrainComposer.

    for importing heightmaps again you can see how to do this in the tutorial videos:
    www.terraincomposer.com/tutorials

    I hope that helps :)

    Nathaniel
     
  25. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Some good points you made there.

    Well, normalize heightmap data means 0 - 1 as you said. Great. So shouldn't something like this work:
    1) tell WM's file node to handle the incoming data as normalized data by specifying a range of 0 to 1
    2) multiply the heightmap output of that node by 600 (or any other value one has chosen inside Unity)
    ???

    Questions are: if the file node is not capable of doing so - what node does? What node setup do I use to multiply height values - WM seems to handle everything in meters? Meters x meters won't work, I guess. I couldn't find a scalar arithmetic function that deals with these kind of things.
     
  26. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Hey Marco, i am not sure if i understand correctly what the problem is as i never had any problem with getting the height right, though i have a suspicion that when you sculpted the terrain in unity(i assume as a guide heightmap for further use in WM) you maybe didn't use the full range and therefor don't have a heightmap that goes from black to white but instead goes ftom black to grey(or even just from dark grey to a brighter gray). In that case i would suggest that you apply levels in photoshop to the heightmap so it uses the full brightness range(aka from pitch black to bright white). Compare the result in unity against the original terrain so you know how to set the terrain height in unity, when you have that right you can just set the terrain height in WM just the same and there would not be a problem with matching heights.

    Hope that helps,
    Peter
     
  27. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    I did a search for terrain*.shader in my project and there was nothing there. So there must be something else causing the problem.
     
  28. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    That's exactly what I had trouble with.
    Thanks to Remnant (Stephen, author of WM) I was able to fix the issue. You can set a maximum height inside World Machine's "Project World Parameters" on the second tab. WM itself treats the heightmap data no other than Unity does - initially it is just normalized height between 0 to 1. Only later will the software interpret these values as meters and scale them accordingly. According to Remnant.
    The Photoshop levels approach came to my mind earlier, too. But that seemed to be way more trouble than it really should be.
     
  29. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    If you have 2 Michael O packages, it's almost certain there's a terrain shader in there. I can help you find it with a skype screenshare my account is Nathaniel.Doldersum

    I had contact with Michael O and he will remove the terrain shader from his packages...
     
  30. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hallo Marco,

    I'm glad to issue is solved, as it seems to be in WM that setting had to be changed. Bing returns elevation in meters, what I do in WC is normalize it by deviding it by 9000. This is because the highest point on earth is not higher then 9000M. Otherwise you could get a ceiling in the heightmap...

    Nathaniel
     
  31. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    Nathaniel, can you please explain how you convert from mercator to meters, which is your exact conversion code? Thanks!
     
  32. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    Hmmm...is there another way to solve this? I'm just not comfortable with doing screen share stuff. If you have an idea of what this file is, I can try to remove it. Or, I can delete his packages and see if that does anything, but I'm still not sure how this affects my terrain since there aren't any shaders on the terrain itself.

    Anyway, hope we can get this worked out.
     
  33. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You can ask Michael O in what folder the shaders are installed if you can't find it. You could also try a new empty project. The folder is something called with shader and terrain. So if you find the folder with the terrain shader inside, you can delete the whole folder. The reason why it affects the terrain is that they overwrite the Unity standard terrain shader...
     
  34. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes all the conversion functions are in global_settings_tc script.

    function latlong_to_pixel2(latlong: latlong_class,zoom: double): map_pixel_class

    function pixel_to_latlong2(map_pixel: map_pixel_class,zoom: double): latlong_class

    Where variables are declared in latlong_class and map_pixel_class
    latlong_class.longitude
    latlong_class.latittude

    map_pixel_class.x
    map_pixel_class.y

    You have to use zoom 17, which is 1 meter per pixel. So then you can calculate latlong to pixel and vice versa.

    Nathaniel
     
  35. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    Thanks for the information. I was able to find it and everything showed up once I deleted them. I'll have to look into this in my other projects as well.

    *Edit:* Rather than make a new post, I'm just gonna post this here. So what is the best way to do rolling hills? I'd like to do a plains type area, but I don't know the best way to go about it with Terrain Composer. Any ideas?
     
    Last edited: Dec 14, 2013
  36. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You can make this with a perlin curve in a heightmap layer:
    http://www.youtube.com/watch?v=8ZiT0GBjXXE

    The tutorial videos can be found at:
    www.terraincomposer.com/tutorials

    If you need more help with it let me know ;).

    Nathaniel
     
  37. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Hello there and thank you for this plugin,
    I have purchased it and have watched several tutorials regarding it's usage, but i can't seem to get a few basic things done regarding splat textures.
    After assigning 4 splat textures to the terrain, i want to distribute these textures according to height, but I want to split the distribution so that 2 textures will be used below a certain height and the other 2 texture will be used above a certain height.
    Any help on how to achieve this will be appreciated.
     
  38. eagle555

    eagle555

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

    Do the following steps:
    - Enable Splat Output button in the top.
    - Add a Splat Layer.
    - Default are 3 splat textures in there, add your 4th one.
    - The filter default input is on height.
    - You can use the sliders next to the splat textures (in the splat layer) to choose height for each (Can use auto generate if you use a low splat resolution, enable/disable by shift clicking 'Generate' button).

    If you need more help let me know ;)

    Nathaniel
     
  39. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    Thanks Nathaniel...i managed to figure that out after reading the documentation - where it says filters are used for defining the splat texture chosen and subfilter for defining the alpha of that splat texture... - I hope I understood that correctly.

    Which brings me to my second question..creating masks based on height (or other parameters). Is there away to do this in TC alone..or would i actually need to create gray scale height map and manipulate it in gimp/photoshop to create it? Edit - Well I just found out from the video tutorials i can achieve this by setting the beginning and end values for this in the subfilter....
     
    Last edited: Dec 15, 2013
  40. eagle555

    eagle555

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

    Yes subfilters works as a mask. You can choose height, steepness, image, 16 bit raw image, etc.

    Nathaniel
     
  41. Nims

    Nims

    Joined:
    Nov 11, 2013
    Posts:
    86
    I seem to have found a consistent reproducible bug:
    After assigning grass (billboard textures in this case) to the terrain and defining a grass layer.
    If you generate the grass and then either deactivate/remove one of the grasses from the layer - then trying to generate the grass again will result in a loop error - until you return the grass you removed.
     
  42. eagle555

    eagle555

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

    Thank you for the bug report. I tested it here and I don't get an error. I would like to see in a skype screenshare how you get the error...My skype account is Nathaniel.Doldersum

    Nathaniel
     
  43. mngmhds

    mngmhds

    Joined:
    Feb 2, 2013
    Posts:
    21
    Nathaniel,

    I'm having a lot of issues adding detail/grass to very small terrains (50x50) that will act as menu scenes for my game (static camera). At first the grass was only rendering in thick parallel lines, but after dropping the strength to almost 0 for the filter and layer and after changing it to random I was able to get it to generate all over the terrain, but it was still far too thick.

    I could hand-paint the detail and use TC for everything else, but that sort of defeats the purpose of having a tool like TC to begin with. Any help would be greatly appreciated.

    I've added capsule colliders to my trees and generated them using TC. Suffice it to say that the capsule colliders didn't carry over. Is there any way to add collision to trees that are generated using TC?
     
    Last edited: Dec 17, 2013
  44. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You mean the terrain size is 50x50 or do you use 50x50 terrain tiles? Yes you will have to reduce the layer strength to get less grass density and also get rid of the vertical lines. The vertical lines is something the Unity terrain engine is doing to the grass if the detail value is too high. If it is still too thick you can use a lower detail resolution in TC Terrain List -> Resolutions -> Detail Resolution. The lower detail resolution you use the higher performance you will get.

    As for the trees, if you add the tree collider to your tree prefab in TC, and make sure your project prefab is updated to include the collider, it should work fine.

    If you can't get it to work we can do a screenshare with you on skype. My account is Nathaniel.Doldersum
     
  45. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Tommorow the 20th there will be a 24 hour deal for TerrainComposer! 50% off $45

    Nathaniel
     
  46. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    I have another question....

    I originally setup a terrain using the Unity terrain tools and I liked the way it looked, however the mountains needed a bit of love. So I decided to export the heightmap and create a new terrain using the heightmap and Terrain Composer. However, the terrain doesn't look anything like it did when I exported it. Is there something going on with Terrain Composer, or is it not really good to use if I need a very specific look? Trying to create fine details using Terrain Composer seems to be outside of the scope of the software, but I wanted to find out if there was anything I could do in this instance that would help. I really want to use the texture and tree setting options of Terrain Composer, but this might be something I can't really do.

    Anyway, how can I get the heightmap to look the same as it did on the Unity terrain?
     
  47. cj31387

    cj31387

    Joined:
    May 23, 2012
    Posts:
    143
    This is on sale right now. Seriously considering buying it. But I have a question. Is there any way to mask a certain area to effect that area somehow? Like Say I have a bunch of mountains, but around the center I want some hills or way flatter land so I can place a town. Can I draw onto the terrain somehow to make that area more flat? It seems 100% procedural. I'd also like to manually draw some river beds too. Can this be done?
     
  48. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Yes :)
     
  49. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    TerrainComposer is very versatile and you can blend and mix any thing you want. As for masking this can be done with images and 16 bit raw heightmaps you can watch the tutorials here.
    www.terraincomposer.com/tutorials

    TerrainComposer can do unlimited masking and blending, etc.

    Nathaniel
     
  50. EDarkness

    EDarkness

    Joined:
    Feb 1, 2013
    Posts:
    506
    I've been trying to figure it out myself. There really isn't a whole lot of guidance on how to do very specific things. All the tutorials seem to be all about random places, but what about a place that you have some idea of what it's like? I added some kind of mask to my terrain because I wanted a river to flow through the middle, but the sides of the walls are all messed up and "carved" out looking. I don't know how to fix it through Terrain Composer and I'm not sure if I should just break out the Unity smoothing tool and try to fix it.

    What if I want the coast of an island with some small hills or perhaps even a mountain? I tried importing my own heightmap and it didn't look anything like it was supposed to look once I got into Terrain Composer. I just kind of wish there was some kind of terrain editor that worked better than the Unity one, but was easy to understand.

    My feeling about this asset is that it works best when you don't care about what the world looks like. I made a terrain like that and it works great.

    As a side note, my wife rages at this piece of software something fierce. It's kinda funny.
     
    Last edited: Dec 20, 2013