Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

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

  1. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    I've been trying to get the hang of the runtime package you provide on your web site. In your documentation you say use the database restore option to find the indexes. Can you expand on this more because i'm not sure how to use it to find the indexes of the necessary filters/sub-filters to use in the runtime code?

    So for example, in the code it shows how to randomise trees using this

    item = tc_script.GetFieldValue("subfilter").CallMethod("get_Item",3).GetFieldValue("precurve_list").CallMethod("get_Item",0);
    item.GetType().GetField("offset").SetValue(tc_script.GetFieldValue("subfilter").CallMethod("get_Item",3).GetFieldValue("precurve_list").CallMethod("get_Item",0),newVector2(Random.Range(-2000,2000),Random.Range(-2000,2000)));


    How does the indexes sub-filter (3) pre curve_list (0) associate to the database restore view?
    When i use this nothing happens when i put values in there and click foldout?

    I'm trying to access the tree offsets for the procedural islands settings, how do i find the correct filter/subfilters for this?

    Why have you not used the "filter" property in your example code seems you would have to use filter before access its sub filter?
     
    Last edited: Aug 24, 2014
  2. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    How did you do the tree placement? Manually?
     
  3. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Beautiful. Great work!
     
  4. laurent-clave

    laurent-clave

    Joined:
    Jul 18, 2011
    Posts:
    280
    I use a tree placement of Terrain Composer with differents layers.

    Thank Archania ;)
     
  5. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Thanks, it looks great!
     
  6. eagle555

    eagle555

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

    I've talked with Tom the developer about this, and indeed TC shouldn't change the basemap distance if RTP is in there. I made a fix for this.

    Nathaniel
     

    Attached Files:

  7. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Wow thanks for posting, the terrain looks awesome! :D

    Nathaniel
     
  8. eagle555

    eagle555

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

    The filters and subfilters are stored in a list:
    filter
    subfilter

    so if you enable 'Database restore' you can see which filter/subfilter have which index. So then you can go to the tree layer and see which index the filters and subfilters have.

    I splitted the filter and subfilter classes up, because Unity always to have a hierarchy of classes up to level 7, behond this level Unity won't serialize the data, which means it doesn't get saved.

    If you need more help with it, it's best to chat on skype, my account is Nathaniel.Doldersum

    Nathaniel
     
  9. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Hello,

    My apologies if this question has been asked but I am wondering about Terrain Composer's compatibility with other terrain modification assets specifically Easy Roads 3D. I have a project where I need to run railroad tracks through terrain and view the rail line from various altitudes from ground level to a few thousand feet up. I am defiantly sold on the World/Terrain Composer and RTPv3 combination but I will need to lay in rail lines, roads, bridges, tunnels etc. into it. Any suggestions or comments on this would be greatly appreciated.

    ~V~
     
  10. Jither

    Jither

    Joined:
    Jun 13, 2014
    Posts:
    29
    Nathaniel (or someone else) is probably more qualified to answer this, seeing as I haven't bought Easy Roads yet.

    But I know Becoming and Tomasz (RTP) used the three together to create the RTP3 Island demo (see http://forum.unity3d.com/threads/the-hermits-code-an-adventure-based-on-the-rtp3-demoscene.197628/ ). So I'd think they work together fine, at (the very) least to some extent. :)
     
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes TerrainComposer/WorldComposer/RTP work fine with EasyRoads and Road Architect. And WolrdComposer works with Map-ity where you can create roads and buildings (with BuildR) from real world data.

    Nathaniel
     
  12. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Thank you. Will be purchasing shortly.

    On another note, has anyone used these tools to create railroad systems? I see some basic railroad and track assets but nothing extensive as of yet.
     
  13. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes with EasyRoads you can create railroads...

    Nathaniel
     
  14. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Megashapes will do the trick too!
     
  15. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    I was watching this video and decided to go with Road Architect. Easy Roads and Megashapes are also very good options that I had looked at.

    Thanks everyone for the input. :)
     
  16. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hi Nathaniel

    I wanted a quick bit of advice regarding EasyRoads (v3) and Terrain Composer

    The attached screenshot shows the road after I have attempted to flatten the terrain in ER, however there is still foliage popping out of the road afterwards

    In your experience what is the best way around this?


    thanks

    Nalin

    Screen Shot 2014-08-28 at 18.36.47.png
     
  17. Kivak

    Kivak

    Joined:
    Jul 13, 2013
    Posts:
    140

    EasyRoads has a setting when making the road to alter the terrain, detail meshes, and billboard meshes. It doesn't look like you kept the terrain modifications and just kept the road object. Maybe that's what is going on. :)
     
  18. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Thanks

    I have been in touch with Raoul so I hope to send him a demo project to try and sort this out

    Essentially it flattens trees but not plants, but that was with V3 beta. Now I will try with V2.

    N
     
  19. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    Nathaniel,

    Is there a setting for randomly rotating trees? Setting them further into the ground on slopes would also be useful?

    Thanks.
     
  20. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes this is something EasyRoads needs to handle if you paint with the Unity terrain brush or place roads on generated grass from TC before. I think it is working in V2.

    Nathaniel
     
  21. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You cannot randomily rotate trees, as it is a limitation of the current Unity tree system. But this might be possible in Unity5 with SpeedTree. Yes you can add/subtract height from trees, if you unfold a tree in your tree layer -> Scale -> Added Height...Shift click >Set All to apply the changes to all trees in your layer.

    Nathaniel
     
  22. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    Thanks Nathaniel,

    1 other question. I have the latest 1.470 version, but the measure height tool doesn't seem to be functioning. I have active checked.
    Any tips?

    Thanks.
     
  23. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The height measure tool works by doing raycasting. It might be that you are too far away from the terrain, you can set the range with 'Measure Range' in the measure tool. Can you show a screenshot of your terrain with the measure tool window in it, and you measuring it?

    Nathaniel
     
  24. MahaGaming

    MahaGaming

    Joined:
    Feb 25, 2014
    Posts:
    82
    I want to buy this, but I was told there is problem with putting mesh collider on trees?
     
  25. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    TerrainComposer uses standard Unity terrain and standard Unity tree system. There's no issue with using tree colliders, other then that Unity has a limitation of the amount of colliders you can have in a Scene at once. It's about 63k...

    Nathaniel
     
  26. TDH_DrThirteen

    TDH_DrThirteen

    Joined:
    Jul 3, 2014
    Posts:
    42
    Hey
    I tried to place grass with Terrain Composer on 4 created terrains, but it only applies it to the third terrain.
    Is there something I am missing cause placing trees works on all 4 terrains?
     
  27. MahaGaming

    MahaGaming

    Joined:
    Feb 25, 2014
    Posts:
    82
    Thanks Nathaniel, can't wait to buy this asset on friday and try it myself
     
  28. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    To Eagle or any other experienced user,

    I've got a 1k resolution terrain heightmap from WM. It has lots of jagged edges due to the low resolution. I wish to smooth these out edges whilst keeping the overall shape of the terrain and keeping the vertice count low and to be able to use WM masks with the splats.
    Can I use a smoothing layer that just smooths the jagged edges slightly? if so, how?
     
  29. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    Can you guys share how big your environment can be?

    I'm trying to make a terrain procedurally,

    Resolutions : 2048
    Terrain : 4x4 (16 terrains of width 1000)

    But I crashes 8 times today.

    Actually, I never being able to generate more than 2x2 terrain.

    I use Macbook Pro, 2.3GHz CPU with 10GB of RAM.

    I think it's because of Unity editor being 32bit, but... How come others can overcome this while I can't?
     
  30. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    I played around with 4 terrains and resolution of 2048. After adding plants, textures, rocks etc, unity was pushed to its memory limit. It often quit at about 2.8GB. Thats on a 12GB memory, I7 cpu desktop.
     
  31. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    I always open the Activity Monitor (Task Manager in Windows) and see that after generating the 16 terrains tile (empty and flat) I straight away got Unity used up to 2.86GB.

    Then it will slowly generating the height maps, etc.
    And occasionally it will ask us to save.
    This is where it always crashes, but if we don't press "save" Terrain composer won't continue generating the terrain.
     
  32. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    It should work on all 4 terrains. You have to make sure your grass textures are applied to all terrains. You can do this by shift click <Set All> in the 'Grass' tab in TC's terrain list. It can also be that the rules you used in the layer is excluding from the other terrains. If you can't get it to work can you show a screenshot of your settings in TerrainComposer?

    Nathaniel
     
  33. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    TerrainComposer has a smooth tool build-in in Quick Tools. You can click the smooth button multiple times.

    Nathaniel
     
  34. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    This all has to do with the resolutions you choose. Keep in mind that the settings you set in resolution is for each terrain tile so 2x2048 is a total of 4k heightmap. Depending on the other resolutions you set memory add up quickly. As explained many times TerrainComposer uses standard Unity terrain, and it would use the same memory if you would create the terrains manually, so this has nothing to do with TerrainComposer. So a basic understanding about resolutions vs memory and perfomance is needed. So if you use a 4096x4096 total heightmap resolution, the vertex count will be 4096x4096 = 16 million verts, Unity's terrain lod system wil reduce that a lot. But still that's already a lot of vertices...

    In Unity 5 there's not a memory limitation of the current 3 GB, because Unity 5 is 64 bit. However you still have to keep performance in mind, that you cannot create extreme resolutions as it would render too slow...

    Nathaniel
     
  35. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    So what is your best advice for making the largest optimum terrain?

    2x2 at 1024 resolution?

    This is for third person RPG style game.
     
  36. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes a 1k or 2k total resolution, it's displayed in TC with the (...) behind the resolutions. I wouldn't go higher then that, as you want as much people be able to play it, also with medium and low end hardware...

    Nathaniel
     
    makoto_snkw likes this.
  37. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hi Nathaniel

    I have TC and WC, and I am currently trying to get the terrains to use Skyshop shaders as per this video tutorial:

    -

    ...as it shows that Skyshop can use materials that have a normal map and a colour map which are then applied to the terrain.

    I watched your tutorial about exporting Normal maps for RTP (which I do not have), thinking it might help me along the way.



    However I am still a bit confused as to what to do, so I could do with some guidance as I want to use SS for the terrain and for the trees.

    Any help / advice would be much appreciated :)


    regards,

    Nalin
     
  38. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    It should be in the skyshop documentation how to setup their terrain shader. These shaders work mostly by assigning a script to each terrain (can multiselect and assign them at once) and then assign the slots in the scripts...TerrainComposer uses standard Unity terrain, so there's nothing that is different when making the terrains without TerrainComposer in Unity.

    Nathaniel
     
  39. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    It should be in the skyshop documentation how to setup their terrain shader.

    I need help with how to set up the Skyshop Terrain Material which requires a Base Diffuse map and a Base Normal Map for the overall. I am not sure but I think that TC needs to create these for the generated terrain? So can you point me to how to do this, as it is not clear to me at present? (sorry if this is a noob question)

    I also don't quite understand the way TC sets its materials because for the Base Terrain the material is set to None? ...and I can't seem to locate the materials TC sets up?

    Presumably this whole process is automated with RTP?


    thanks

    Nalin
     
  40. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53
    Hi there people.
    I have been attempting to use Terrain Composer for the past few weeks now and gradually making progress through trial and error and discovering information on the forum.

    I am however, stuck on using 'multiple' Splat maps. Thus far I have been able to create a single Splat map that works perfectly. However, when I try to assign a second Splatmap onto my terrain to apply additional textures nothing appears to change. Below is an example of what im trying to achieve


    Thanks
     
  41. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53
  42. kidnamedant

    kidnamedant

    Joined:
    Sep 5, 2014
    Posts:
    5
    Hey Undiscovered. I am also having similar difficulties regarding multiple splat maps. have you managed to fix your problems yet?

    Any help would be hugely appreciated, guys! :)
     
  43. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    Instead of using 2 splatmaps with red/green/blue/black, I have been using 1 splatmap with more colors. For example, I have 9 colors in my splatmap when using TC.
     
  44. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53
    Oh wow 9 colours, could please provide more information on how this is achieved? I really appreciate it

    Thanks
     
  45. kidnamedant

    kidnamedant

    Joined:
    Sep 5, 2014
    Posts:
    5

    Could you elaborate a little bit more on how you go about doing this? There is very little information about it anyway online.

    Thanks!
     
  46. eagle555

    eagle555

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

    Yes with TC you can create a colormap and normalmap. For the normalmap you can look in my video tutorials:
    http://www.terraincomposer.com/tutorials/
    The video on the bottom of the page -> Help Video Making normal maps with TerrainComposer

    And for making colormaps I made a video with one of the first version of TerrainComposer:
    http://www.terraincomposer.com/videos/
    Also on the bottom of the page.
    The difference with the current version is that colormaps are directly saved to an image.

    A material is not automatically assigned to a terrain. You can do this yourself by creating a material in your project, and for the shader choose the skyshop terrain shader. Then you can either assign this material to a Unity terrain directly in the terrain script in the settings or in TerrainComposer -> TC Terrain list -> Splat textures (it's the same).

    Nathaniel
     
  47. eagle555

    eagle555

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

    As mk1978 descriped it's easiest to use 1 painted splatmap with more colors, you can however also do 2 or more. So for example if you want to use it with 8 splat textures, you can create an image where you use 8 solid colors. With solid I mean they should have fixed values, and not like a brush were they fade out, as that would result into many colors. So the complete steps:
    1. Activate splat output
    2. Add a splat layer, and add all your splat textures to the layer.
    3. In filter set input to 'Image' (don't enable splatmap, as that is for a RGBA splatmap and not a manual painted one).
    4. Drag and drop your splatmap painted textre in the image slot (make sure import settings are on true color, as compression will lead to faded edges and then the colors are not solid anymore).
    5. In the filter in Color Range shift click <Detect>, the colors will be automatically detected in the image and added to the color range.
    6. Change mode from 'Free' to 'Select', with select you can choose each splat texture for each color. The number is displayed before the splat textures in the layer.
    7. With 'Edge Blur' in the filter you can fade the edges of the splat textures, with 'Edge Blur Radius' you can set the fade radius.

    Nathaniel

    splatmask1.jpg
    splatmask2.jpg
    splatmask.png
    splatmask3.jpg
     
  48. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53

    Thank you for your detailed response.

    I have just tried to use the Splatmap that you attached into my scene and unfortunately I receive an error. Can you please assist.

    Many thanks

     
  49. Undiscovered

    Undiscovered

    Joined:
    Apr 5, 2014
    Posts:
    53
    Ok, so i have managed to fix the previous issue.

    However now I am having a few problems with using "fixed values" for my Splatmap.Thus far I have been using the fill tool in Photoshop to paint red, green, blue channels. When I do this and the click "<Detect>" I get a variety of colours (The majority of them useless)

    I am guessing this issue is connected to using fixed values. I am unbelievably confused with this so if someone could offer some assistance that would be great.

    Thanks...again.
     
  50. eagle555

    eagle555

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

    Think you issue was that you only had 3 splat textures in your layer instead of 8.

    Yes there are 2 options. One option is to use fixed(solid) colors, with this you can paint as many colors for as many splat textures in your image as you want. However there's no control over the blending between the colors, other then the global 'Edge Blur'. So for this mode as descriped in my post <Detect> needs fixed colors, as it detects all tints in your image.

    The other option is to use RGBA splatmaps like you had(the way WorldMachine and other terrain software exports them). So the channels are used for 4 splat textures. With each channel you can paint the opacity of 1 splat texture. So if R is 0, splat texture 0 won't be painted, if R is 255 (1) splat texture 0 will be fully painted. TerrainComposer automatically normalizes RGBA values as on Unity terrain the sum of the channels should be always 255 (1).

    So if you want to use the RGBA splatmaps:
    1. Activate splat output.
    2. Add a splat layer.
    3. In filter set 'Input' to 'Image'.
    4. Enable 'Splatmap' toggle.
    5. Drag and drop your image in the image slot, image import settings to true color.
    6. Make sure you have 4 splat textures in your layer.

    If you want to paint another splatmap for splat texture 4-8:
    1. Duplicate you splatmap layer (shift click '+').
    2. Select splat texture 4-8 in the layer.
    3. Drag and drop your second splat texture in the image slot.

    Nathaniel

    splatmap1.jpg splatmap2.jpg