Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

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

  1. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    346
    Thanks Nathaniel, I was sure there is something like that, it works perfectly! It seems I skipped it while reading the docs... ;)
     
  2. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    U5. quick concept area. Time spent - about 15 mins messing around.

    5x5 TC generated terrain. minimum effort taken - just mangled up some demo settings + Horiz[on]

    Care taken on lighting - zero - textures effort - near zero

    Fun Gulch :) nice far detail

    DeepRavines.JPG


    Foreground, background, mountains painted on skybox... nice depth.
    (With /any/ love on the lighting that could look good)

    grassLevelDetails.JPG


    Is that a magic castle in the distance?
    HEH. fun stuff.
    distantDetails.JPG

    Thanks for making a nice set of systems people.
    Obligatory Iso
    iso.JPG
    (I'll mesh it all, actually work out a decently quick texture work-flow, and chuck RTS at it next time)

    And one last time -
    Foreground Background Skybox.

    My those hills look so much nicer than even the nicest skybox paintjob.

    foregroundBackgroundSkybox.JPG
     
    Last edited: Mar 27, 2015
    MarcusWatson likes this.
  3. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Looks like you moved the <RTP> button. In your documentation and videos it's in the terrain section with the "Settings" and "Reset" buttons. It moved, now you have to click on "Splat Textures" and it is below.

    (I had to debug your editor code to find it)
     
  4. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    This thread is 46 pages long so I hope I'll be forgiven for not looking through the whole thing to find an answer to my questions. ;)

    I've got World Composer and love it. Really great. I'm considering buying Terrain Composer too. What I'm wondering is if they can work together. How do people normally work with them in combination? Does it "just happen" if you have both installed?

    Maybe when doing a real terrain from World Composer I would just use the height maps, then in lieu of the satellite images I'd use Terrain Composer to pretty it up with nice textures, lay down the trees and beaches and so forth. Is that basically how it'd work? My scenes will be water scenes like this:



    With World Composer this wasn't terribly difficult. I had to dig out the water to have some depth and clean up the shorelines a bit, but it was not a big deal. Adding the trees and houses however is a time consuming process that I'm hoping Terrain Composer might help me with. It's only $45 so I'll probably buy it anyway, but maybe somebody could fill me in on how this all might work together, what my process might be with the two packages together? I'm no artist though so don't want to be fiddling around with GIMP too much, I'm hoping I can do most of the stuff with the filter settings in Terrain Composer, but I don't really know what it does.

    Anyway, now's your chance to sell me. Let's hear it. :)
     
    MarcusWatson likes this.
  5. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    I just bought it but have 170 errors on Unity 5 immediately upon importing. Is there a version for 5 I can download from somewhere?

    EDIT: Nevermind, I deleted/reimported it a couple of times and it's working now with no errors.

    I'm trying to import a heightmap from World Composer now. I found this video, but it's outdated. Some of the buttons are gone (such as the one needed to load a file) or have been moved somewhere I haven't found yet.



    Here's what I get. I don't see a layer button to use to open a raw file like in the video:



    How can I import my raw files in today's version of Terrain Composer? Unless there's some better way, what I wanted to do is import the height maps from World Composer and then texture them and so forth with Terrain Composer.

    EDIT: Nevermind again. :) You just right click the "layer 0 (heightmap)" and go. You might want to put a little popup annotation on that video to save people some time with that one.
     
    Last edited: Mar 27, 2015
  6. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Sorry about all the questions, but this thread is just too big to wade through to find anything and I'm not seeing this in the tutorial videos yet.

    Here's my current problem: At this point I'm trying to load the World Composer heightmaps into Terrain Composer. For whatever reason my folder that keeps the World Composer generated heightmaps is litered with 0 byte sized RAW files. There is one bigger file in there that is not 0 size, so I tried to load that with TC and get this message:

    Code (csharp):
    1.  
    2. The Raw Heightmap file 'H:....../Untitled0.Raw' has a lower resolution than selected. Please check the File size. It should be X*Y*2 = 313*313*2 = 195938 Bytes (313*313 resolution). But the File size is 196608 Bytes (314x314 resolution).
    3. <snip>
    4.  
    So what do I do? Do I have to regenerate the RAW file in World Composer with some option checked so the resolution is not off by one when I try to import it into TC?

    Now that I think about it, I've altered the terrains directly in Unity to clean up the satellite data a bit and add depth to the water which took quite some time to do. I imagine the RAW file won't reflect that unless it was exported from Unity back to the RAW somehow. Is that even possible to do or do I just have to start over on this lake from scratch? Before I tried the RAW imports, I just tried to copy/paste my lake scene terrains and drag them into the terrain slots in TC. That ignored the height data and instead wrote over the terrains. I hope not, it took about a week to do the lake the first time, but at this point I don't see any other way if I'm going to use TC to pretty it up. If it's too much trouble it's not worth doing.

    Maybe the ideal case for me would be to drop the original terrains into those slots, but have it NOT generate a terrain that would overwrite the vertex positions. Really I just want to use TC as a way to autogenerate the textures and add the details meshes and so on, because TC does that really beautifully.

    For future terrain scenes I'd be fine using a totally different approach, but for now I'd just like to try to get my existing lake scene in there and get some pretty TC textures mapped onto it with the nice splat maps and so forth that it generates. Maybe that's not possible and I can only use TC to autogenerate the entire landscape, maybe the splats and so on are created from that?

    If anybody can clear some of this up for me I'd be grateful. Thanks!
     
  7. Deadlyapples

    Deadlyapples

    Joined:
    Dec 30, 2013
    Posts:
    54
    Guyssss! I am making an RPG with very simple graphics, meshes with just colours and low poly count for a simplistic style. The terrain I am looking at making should be simple, rolling hills, harsh cliffs, huge worlds. Is this something TC would be good with? Because I am not sure the default unity terrain tools are cutting it. :)
     
  8. eagle555

    eagle555

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

    It looks very nice :) and yes Horizon[ON] works great with TC/WC. With Horizon you indeed won't need to use a fake terrain skybox anymore. I highly recommend it!

    Nathaniel
     
    twobob likes this.
  9. eagle555

    eagle555

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

    The <RTP> button was always in Splat Textures tab. The other RTP tab you are talking about was actually for saving/loading RTP presets. I removed this in the latest version, because Tom build save/load presets in RTP directly.

    Nathaniel
     
  10. eagle555

    eagle555

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

    Yes TerrainComposer is a great addition to WorldComposer. With TerrainComposer you can splat texture/place vegetation and objects on the terrains created by WorldComposer by using the colors of the satellite image.

    I will add the notation to the video. You can see the changes in improvements in the GUI I made on page 8 of the TerrainComposer manual. Importing a heightmap is simple, just add a layer -> unfold layer -> unfold filter -> Change 'Input' to 'Raw Heightmap'.

    You don't even need to import the heightmap from WorldComposer, as TerrainComposer can import the heightmap automatically from WC if you enable in WC 'Create Terrain' tab -> Export to TerrainComposer.

    Here's a tutorial video how you can use (e.g.) tree placement based on colors.
    Help Video for placement based on image colors (New)

    http://www.terraincomposer.com/tutorials/

    The 24 hour demo we made is a terrain made with WorldComposer and TerrainComposer, so this is a great help for getting the workflow between the 2. (E.g. using satellite image colors to place the splat textures, etc).
    24 Hour Demo Tutorial document

    Nathaniel
     
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes you can use TerrainComposer for this, as resolutions are select able and you can convert terrains to meshes with TC as well (for mobile).

    Nathaniel
     
  12. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    This only works on new terrain exports though. The problem is that I used WorldComposer to create the scene, then modified the terrain directly with Unity's tools. So I can't export that again. I want to use TC on that modified terrain.

    I spent a few hours playing with TC yesterday and must say I'm impressed. Great product. :) Now that I've read more and watched some tutorials I'll see if I can figure out how to link the original terrain (the one I modifed in Unity) into TC. It looks like it should be able to do it. If not, I just need to start over. I accidentally deleted all my trees the other day anyway so have to redo a lot of it anyway. ;)

    One more question for you if I may. I figure this is probably a Unity bug but will ask you just in case: When I create a new terrain in TC and modify it in Unity, the terrain collider does not appear to update. Is this a Unity problem or is TC perhaps forcing it to use the original height maps somehow? If it's indeed a Unity problem that will be fixed some day, is there some way around this for now? Is there something I can do to force Unity to regenerate the terrain collider? Maybe I need to reexport the RAW files after I've modified them? Maybe if I called Terrain.Flush() at the program start once it might update it?
     
    Last edited: Mar 29, 2015
  13. RealSoftGames

    RealSoftGames

    Joined:
    Jun 8, 2014
    Posts:
    220
    hi i got some issues downloading the example files. it gets to about 20% then stops is their another way to download this?
     
  14. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    I've started over with a new terrain and am trying to place trees according to color. I tried this which worked well (nice tutorial, by the way):



    But... My satellite images are all pretty green, about the same color as the trees, so what I'm trying to do instead is make tree maps where red (255,0,0) painted areas are where the trees are placed. I'm having a heck of time figuring this out. I had a working setup following the video and changed things as follows:

    1) mask->input->image changed to my new map with a big red area on it as a test. This is where I want the trees.

    2) In mask->colorRange I clicked the "one" checkbox to have a single color as a mask instead of a range as is done in the video. I set that color to red (255,0,0), the same as the desired tree areas on my new map. When I click "generate" nothing happens though. There are no trees anywhere either inside or outside the red area.

    What's adding to my confusion is the "curves" section. If I set it to flat (1 everywhere) the trees are drawn everywhere regardless if it's red on the map or not. If it's set to any of the other options, there are no trees at all. I'll keep looking through the manual and see if I can find a tutorial somewhere, but at the moment I'm a bit lost.

    EDIT:

    I've figured out somewhat by accident how to make the red areas work. For curves->curve normal I use 0-1 default slope curve. For the color range in the mask I had to use an actual range. Set the minimum to 254,0,0 and the maximum to 255,0,0 and it worked. If somebody might explain how the "one" color option works, that would be lovely. That's intuitively where my brain wanted to go but I had no luck with it. I'm still checking out tutorial vids so maybe it's in one of them somewhere.

    EDIT 2:


    AAAaaand here's the tutorial I needed. Go figure, Nathaniel has thought of everything already. :) I could still use a clarification of the "one" option, but at this point it looks like I need to spend more time watching tutorials and less time frantically posting here. ;)



    Overall I'm very impressed with the software. It definitely was worth the buy already! :)
     
    Last edited: Mar 29, 2015
  15. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Anyone have information on rotation maps? Try as I might I'm coming up empty searching for it. I've got a building map set up now so TC will autoplace buildings and saw a rotation map option there. Is that for rotating them according to some map colors or am I totally off base? I've tried red and green but no rotations happen, so I must have the wrong idea.

    One other thing: Would it be possible to use masks or filters to flatten out areas of the terrain for buildings? It'd be really slick if my building map could also flatten the areas to the average or lowest/highest point in the terrain in the colored area, then plop a building there. If that were combined with a rotation map you could autogenerate all the buildings in the orientation you want. Am I dreaming or is that possible here?

    I'm really impressed with the TC software and have been playing with it all night. It goes great with World Composer, the stuff imports right in.
     
    twobob likes this.
  16. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    Hey Nate, just letting you know I emailed you about something i really need your input on as soon as you get a chance please and thanks.
     
  17. Daniel4

    Daniel4

    Joined:
    Sep 19, 2014
    Posts:
    13
    Hi guys, i have a problem updating the Terraincomposer from 1.5 to 1.7, i get this error when loading the TerrainComposer window in the editor: NullReferenceException: Object reference not set to an instance of an object TerrainComposer.Paint()
    Any idea?

     
    Last edited: Mar 30, 2015
  18. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    One more question: Do color maps work anymore? They don't seem to do anything. Maybe the whole idea of a color map has become obsolete with Unity 5 or something, I don't know. That's fine, I just want to know so I don't waste time trying to do something there that would be better done using splat maps or something else.

    It's more likely I'm just doing it wrong, but I followed a tutorial where a canyon is made with a color map and all I see is black everywhere. The map gets generated but doesn't appear to get used.
     
  19. eagle555

    eagle555

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

    You can use TerrainComposer on existing terrains. You can just drag and drop your terrains in the TC terrain list. Then if you don't want to modify the heightmap, you shouldn't generate on the height output. What you can also do than from TerrainComposer is export the heightmap of your manually modified terrain.

    That the terrain collider doesn't get updated after using the Unity terrain brushes, is indeed a Unity bug. I hope they will fix this soon. The heightmap needs to be reasigned then it works, I will add a button for this in the new TC update I'm making.
    The way around it now, is export the heightmap with TC and then import it again. Terrain.Flush() doesn't work...

    Image import settings 'Format' needs to be set to 'Automatic TrueColor', if any compression is enabled the color red might change from 255 to something else. I tested it here and it works, you have to make sure that your red color value is really 255 and that the blue and green channel are 0. You can shift click <Detect> for TC to automatically detect the colors that are in the image.

    Rotation maps are indeed not working in the latest version. I will fix this in the update I'm working on. Flatten terrain for each placed object is not possible at the moment, but I will try to implement this as well.

    Nathaniel
     
  20. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you show a screenshot of TerrainCompser_Save GameObject from your Hierarchy window, and then with the Inspector visible? To close the TC window you can go to the top right of the Unity window click on layout and choose 'Revert Factory Settings...'. Do you have any errors in your Unity console?

    Nathaniel
     
  21. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes colormaps still work. TerrainComposer export a colormap image, which you can use as a splat texture (shift click <Colormap> in TC terrain list -> Splat Textures tab -> drag and drop your colormap in first slot (I changed this in a later TC version). Or you can use them in an additional terrain shader like RTP or ATS colormap. I will add notification to the video...

    Nathaniel
     
  22. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    Um, You quoted me but didn't address my issue dude. Did you get the email with the details or do you need me to paste them here also?
     
  23. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes I did, I will reply today and make a template for you ;).

    Nathaniel
     
  24. EthanC

    EthanC

    Joined:
    Jul 17, 2011
    Posts:
    52
    Thank you very, very much dude. I've been struggling with it and failing for so long you can't imagine how frustrating it has become lol
     
  25. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Thanks for the helpful reply, Nathaniel.

    Where is this setting? I'm looking in mask->settings under the image and Terrains->Settings, but don't see it anywhere.

    I have been having a lot of problems with the image masking, strange things happening probably for the reasons you described. One day everything was fine and worked as I expected, but the next when I made a new image I actually had to use 254,0,0 because 255,0,0 didn't work. When trying to do it with green color for another map (green for a tree map) I ended up having to add some arbitrary amount of blue to the otherwise pure green (0,255,0) color. This part has been very confusing for me and I feel like it's only working by experiment when I get lucky. I'm using GIMP and am not an artist, so perhaps it's something to do with my image export settings on that side. My object map was red and it worked fine, it was only the new tree map that didn't, but I also noticed I'm not using layers or alpha channels in the object map but did in the treemap. So I perhaps have a couple things to learn on that yet.

    This part has been frustrating either way, I spent probably two hours yesterday just trying to get a new tree map to work. Forget about doing a green or blue map, I just couldn't get that to work at all like in your tutorials. On a positive note, I was just thrilled to have that object map work. I placed 200+ houses with the click of a button just by drawing some little red spots over the satellite image and making that a "building map." Amazing, that took me two days to do by hand last time. Now it's maybe one hour with flattening the terrain and rotating the houses manually! Just wonderful. :)


    If "Automatic TrueColor" ends up fixing my image masking problems, maybe it might be a good idea to have TC use that as the default, at least for masking? But then again, if color information is being lost due to the JPGs I'm using that may not help. Those are probably compressed like you said because the file sizes are much smaller than the PNG exports. I'll just try PNG and see if that does the trick. Thanks for the tip.

    One unrelated suggestion: I know this now, but when first using TC I clicked "color" at the top (color map generation) which sets the "export" button to true. This button doesn't get reset to false when you click splat or the other output options, so I was confused when the "generate" button at the bottom went away and changed to "export" instead. I had no idea how to get it back to "generate", so at that early stage I was frequently starting over with a new TC project because I didn't realize what was happening. For me it would have been helpful if there was another "export" output button down by the "generate" button that simply mirrored the export button at the top. If not that, some sort of help text by the "generate" button telling me how to change it from "generate" to "export" would have been saved me a lot of time. Take it or leave it, it's just an idea to help the noobs. :)
     
  26. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    I always use 1 greyscale image per mask... i find it more intuitive this way and i dont have to copy masks into the colorchannels each time i do some changes. I use this approach for all kinds of distribution mask the like. works perfectly fine for me.
     
  27. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Thanks for the suggestion. I'll look into that. At the moment I'm inclined to want to use colors so I can just have the whole satellite image there with my maps on top of it. This is then shown in Unity too right on the terrain so I can double check things against the sat images and modify the map where needed. How do you handle that with greyscale images? Maybe your way is better than mine.

    On the color masking, in GIMP I just tried "use quality settings from original image" for a JPG version and now both red (255,0,0) instead of (254,0,0) and green (0,255,0) instead of some darker green with blue added to it now work as expected. Also using a PNG worked if I disabled compression. The map files are huge then though of course, 16MB, so if I can get around it with the compression and automatic true color (still can't find the option) maybe that might be best.

    Anyway, thanks. I'll perhaps experiment with greyscale maps and see if that might be a better solution for me too.

    EDIT: Bah, I just tried that again with a JPG and it didn't work. Probably it's compressed and not giving me the option to change it. I'll just stick with giant PNG files then for now, that's working like I'd expect. Next up: Greyscale. Thanks for the tip.
     
    Last edited: Mar 31, 2015
  28. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Found Automatic Truecolor. It's in Unity, not TC. Unfortunately this was already set to that option, so that wouldn't appear to be the problem I was having. More than likely it was just the JPG compression. Odd though, I wouldn't think the colors would get altered on an image with only one color in it. Anyway, I'll just use greyscale or PNG from here on out.
     
  29. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Out of my head as is dont have TC open here but it might also have to do with a curve thats used to remap the image... maybe check if the curves are linear from 0 to 1... i could be wrong on this but still it might be worth to check :)
     
  30. Xtense

    Xtense

    Joined:
    Feb 18, 2015
    Posts:
    34
    Hello,

    I've been slowly working up my workflow with WorldComposer and TerrainComposer - loving both of these plugins so far, great job :) . I need some minor help though - I was wondering if it would be possible to do two things with TerrainComposer:

    1. Use TerrainComposer to plant trees based on the RGB texture of the terrain (as exported from WorldComposer) in batch mode - that is, would it be possible to seed trees according to color ranges based on the currently loaded rgb texture on massive amounts of terrain. The functionality seems present - I can use textures as a basis for tree masks based on color ranges, which are then used to seed trees, but I had to select the correct texture file as a source for the data. The thing I require is being able to do this with tons of terrains at once in batch mode - i have over 3000 tiles of terrain to process like this and doing it manually isn't a viable option :) .
    2. Get seeded trees out into the scene hierarchy as distinct GameObjects as a batch operation - in relation with the above question, I would need to separate terrain trees into the scene as GameObjects in their respective positions. This is due to a need of implementing scripts for trees, mostly Impostors, but maybe some minor physics-related stuff too. I would need to be able to get all trees seeded by TerrainComposer out, or at least their positions as empty gameobjects.
    3.Place cities/towns with TerrainComposer based on satellite photography data from WorldComposer - nothing fancy of course, just placing cubes (scaled in X/Z just to cover the horizontal size) or other placeholders, but position them in place of where buildings are located on satellite imagery from WorldComposer. Depending on how much can be done with TC, this would make it possible to quickly seed certain tiles with default/premade buildings for less important locations or speed up modeling of actual buildings for more important locations. Roads are, as far as I understand how TC works, probably out of the question with regards to this, but that's not a terribly important aspect.

    Best regards,
    Xtense
     
  31. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    @Xtense
    I've only been using TC for a couple of days now, but can maybe help regarding question #1:

    Here's how to use a satellite image to place trees by image color. Once you've set this on one of your terrains it will duplicate the results to all the others, so you only have to set it up for one as long as they're all pretty similar looking:


    If that doesn't get the results you want, this next general help video on tree placement might help too. It covers masks like I'm trying to do where you just put green or red or whatever color in some separate mask image and it populates trees (or any other object) in those areas:



    If you find the second method doesn't generate enough objects or misses too many masked areas, go to Terrains->Local Area and increase the object resolution. I'm using 2000 right now. Start small and be careful when increasing it though. I've accidentally created thousands of houses at once because it put them everywhere instead of in my mask, so make sure the mask is working first before increasing the object resolution. When it puts a lot of objects down, Unity takes awhile to catch up and let you delete them. :D So start small and go from there once the masks are more or less working.

    There are more videos here:
    http://www.terraincomposer.com/tutorials/

    Question #2: All objects created in the TC "Object" area show up in the Unity hierarchy as separate game objects. I haven't tried it, but it looks to me like you might be able to do trees that way if you really wanted to and needed them to show up in the heirarchy as separate objects for some reason. I wouldn't recommend it though, there's such a nice tree thing there already just for that purpose.

    Question #3: Yes, I am placing buildings using a mask too just like for the trees. I just make a mask and start plopping big red dots on top of the buildings in the satellite image. Works great, but you do have to go in manually and level out the terrain at each building individually. They can be oriented using a parent object but I don't know much about that. My scene only has a couple hundred buildings so I can just go in manually and rotate them as a final step. Roads: I don't know. I seem to remember running across a tutorial on roads, but am not sure. Maybe someone else can answer that one.

    If anyone comes in and corrects me, listen to them, not me. I'm very new to TC... :)
     
  32. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Here's what I'm working on right now. I just paint two areas in two masks (shown together here but they are really separate). Red dots are where the houses go, green areas are for trees. You can use satellite image data for trees instead though if you want per the earlier video. I just posted this picture to demonstrate simple masking of trees and objects. This is a HUGE time saver, not having to place everything manually. TC is worth the price for that feature alone.



    housesAndTreesMap.png
     
    Becoming likes this.
  33. Xtense

    Xtense

    Joined:
    Feb 18, 2015
    Posts:
    34
    Thanks for your help Todd!

    1. Ha, missed the splat texture option, that's what's been missing in the equation :D thanks! I'll be able to handle the rest easily :) .
    2. Going to have a ton of trees easily exceeding SpeedTree's capability unfortunately and will ned to make some sacrifices to keep the rendering speed fast, this is part of the solution. Will look into TC Objects, thanks!
    3. Nice! Will need to do some tests for automated workflows since i'm using, well, absurd amounts of terrain for my project ;) , but if there's no other way, manual masking will be a solution for high-priority tiles.

    Thanks for your help! Cheers!
     
  34. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    If you're using SpeedTree like I am, those trees can be optimized a lot. I just ran one of the default "desktop trees package" trees in my lake scene and it was running more than 9000 batches peak with about 5800 trees (mine don't cull at distance so you can see billboards all the way across the lake). That's a killer.

    I can't for the life of me remember what exactly I did, but there was some problem with dithering on the Speedtrees that looked really bad against a blue sky, so with the help of someone else I ended up making my own prefab versions that don't have the problem. At the same time the performance was increased radically. I just ran it now and it's only 1100 batches for the scene now, and about half of that is the terrain and houses and stuff. I really wish I could remember what the heck I did to get that.

    Anyway, the point is that if you mess around with your own prefab versions you can get much more performance out of the SpeedTrees. :rolleyes:
     
  35. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Good to know that more performance can be got out of speedtree.
    If you remember the step required please do post.
    I take it, this will require use of the editor? Have yet to subscribe, so far just using purchased tree packages.
     
  36. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    This did not require the use of the editor. It was a matter of changing some of the settings on the models in Unity through the inspector. If I remember what I did I'll come back and post it. It made a big difference.
     
    John-G likes this.
  37. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    You can adjust performance with SpeedTree gameobjects LODs adjusting. For example culling from bigger percents can help. If You want to have better dynamic batching it's good to play with Fade Transition Width of billboards.
    Just make it narrower. Because now billboards that are faded are not batched.

    And for performance it's good to consider if You need on specific LOD level shadow casting or receiving. If not it will help performance too.

    Nice day
    Peter
     
    John-G and Todd-Wasson like this.
  38. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I just posted my game in the WIP forum that is a large open world mass pvp combat game created with TC. I also use RTP. The starting map is 64 terrains of 1000x1000. I'm no artist and outside of touching up areas around water and painting in some roads, it's all TC. I use a heightmap resolution of 1024. There are around 190,000 trees, close to 50,000 rocks. Terrains are dynamically loaded, if they are all active at once with that many terrain details it doesn't really work well.

    http://forum.unity3d.com/threads/sandbox-mass-pvp-mmo.315349/

    If you just want to zip around and see the world and don't care about the game per say, I added a /speed command to the chat window where you can bump that up, otherwise it takes forever to just walk across.

    For an indie dev, making a large open world game like this without TC would have been impossible.
     
  39. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The image import settings you can change if you click an image in your project (can use multi selection to edit multiple images at the same time). If format is set to true color then one color mode should work fine. You also have to make sure that the program you use to paint the texture does really apply that color value you use. If you use photoshop it's easiest to save the image as a psd.

    About disabling the export button when clicking away from color output is a good idea, I will add that in the next TerrainComposer update.

    Yes probable it's due to JPG compression. Best is to use psd or png.

    Nathaniel
     
  40. eagle555

    eagle555

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

    1). Todd already answered this...

    What I can add more:
    2). TerrainComposer generates standard Unity terrain, so you can do any coding on Terrain and TerrainData class.
    http://docs.unity3d.com/ScriptReference/TerrainData.html
    In Unity5 you can do GetTreeInstance and SetTreeInstance to change TreeInstance one by one, treeInstances holds the complete array.

    3). You can use map-ity for this as it is compatible with WorldComposer:
    https://www.assetstore.unity3d.com/en/#!/content/13261

    Nathaniel
     
  41. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Yes, LOD adjusting was part of that. This can make a huge difference. My lake scenes are big and wide open with things visible pretty far away, so I like to start with LOD3/LOD2 (billboards = LOD3) and get that looking good and performing quickly. Having mostly billboards rendered helps a lot.

    Not performance related: There was some option for controlling the blending between billboards and LOD2 that I can't seem to find now. What I remember doing is getting rid of the dithering by changing that setting between billboarding and culling. The trouble was that it was dithering the trees between billboards and being fully culled, so when trees were far away you'd just see a few dots which looked bad against a blue sky, very pixelated. I left the dithering on for the other LOD's because it looks really good. With good settings it can go all the way from billboarding 2 or 3 km away to you being right against the tree without even seeing it change LOD unless you're really looking for it. Quite amazing, really.

    EDIT: Nevermind this part, I found it and comment on it in the next post:
    You wrote about "Fade Transition Width." Where is that option? On the SpeedTree models I see a "smooth LOD" checkbox and under that, "crossfade width" and "fade out width" which can be set seperately for each LOD level. Is that what you meant or is there something else?


    I wonder if it would help performance much to have custom trees with LOD2 having only one material instead of 3 or 4. Has anyone here tried playing with that? I've got a SpeedTree subscription so am tempted to modify the tree package to reduce some of the detail and/or use less materials. There's quite a performance difference between different trees, I've noticed.
     
    Last edited: Apr 1, 2015
    John-G likes this.
  42. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Aha! I think I found it all and remember now. Here's what I did:

    1) In the SpeedTree desktop package I made my own prefab out of the "AmericanElm" tree. This way I could change the fade mode in the LOD group on the tree. Maybe you can on the original another way, but I couldn't figure it out. My original purpose in doing this was just to change the fade mode to get rid of the dithering between fully culled and billboarded.

    2) On my new prefab (TAmericanElm) I clicked the LOD3 part of the band in the LOD group. That opens up the options for Fade Mode which you can adjust for every LOD separately by clicking on that part of the colored bar. That has the "fade transition width" camel82106 described. I don't remember playing much with that, but will try it. Thanks for the tip.

    3) For LOD3 I changed Fade Mode to "none." This gets rid of the dithering between having a billboard and having it be culled out completely. For my scenes this works a lot better because my cull distance is set so far away that I don't have tree billboards disappearing at all. On a really huge scene like snacktime is doing with almost 200,000 trees this would probably be a very bad idea, but I am only dealing with maybe 2000 or 3000 trees so it seems to work ok. A couple thousand billboards isn't too bad, my particle system is probably in that neighborhood too.

    4) For LOD2 I set Fade Mode to "Cross Fade" with fade transition width of 0.25. Maybe that's the default value? I don't remember playing with those numbers at all.

    5) For LOD1 I set fade mode to "Percentage."

    6) For LOD0 I set fade mode to "Percentage."

    That's how the scenes in my boat videos work anyway. I'm still looking for more performance as always, but this works pretty well. Instead of having 4000 or 8000 batches or something crazy, I'm down to maybe 700 to 1300 depending on the particular trees used. Changing the LOD distances matters a lot too as was previously mentioned. The closer you can have it when it switches all the way out to billboards (LOD3), the better for performance.

    Anyway, I hope Nathaniel doesn't mind us launching into a brief SpeedTree tangent too much. One thing I'm really liking a lot about TC is the ability to simply regenerate the trees at whatever density you want, or to just tweak the tree mask a little bit here and there and regenerate everything. Before TC I manually placed every individual tree in the whole scene which took probably two full days for Lotus Lake. With TC I can swap the tree types, add or remove tree types, change the tree density, and on and on. I'd have paid the $45 sale price (probably even the $90 original price) just for the ability to do that without all the rest of the great stuff TC does. It's really great.
     
    hopeful and John-G like this.
  43. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Yes I have meaned Fade out width. It's settings width of fading off of billboards. So if it's too wide, dynamic batching for this part of billboards could be not used. (at least now). But setting of this is possible only with Crossfade mode. WIth percentage dynamic batching is very low or not used.

    Crossfade width is setting fading of last 3d mesh to billboards. I haven't experimented with this very much.

    Still I'm not loosing too much time with it. I hope that there will be some optimization in SpeedTree workflow. In next 5.x of Unity iterations. At least I believe it from beta forum indices.
     
  44. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    HI Nathaniel, I emailed you regarding the runtime but I thought I would come on here as it might be easier.

    I followed your example and loading the heightmap works fine, but I am finding it hard to workout how i simply overlay a texture on the terrain once the heightmap is loaded and generated?

    Part of the problem is, as both will be loaded at the start (and not using GUI buttons) I cant seem to find a way of loading the heightmap, generating and then once finished move onto to loading and generating splat textures?

    Is there a way of generating, and then getting a callback or something that indicates its finished genertaing?

    Thanks
     
    Last edited: Apr 2, 2015
  45. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Just an update on the above issue, I have so far found no way of apply a splat texture at runtime.

    I am sure I am doing something wrong but there is little documentation regarding the runtime and the script im looking at is from the runtimepackage you have on your website?

    When I click the button that loads an image and then applys it to a splat texture slot, then generate the terrain I can see the image gets loaded into the texture slots, it is in the terraincomposer_save object. But the terrain splat doesnt change, just remains with the one I gave it at edit time.

    What am i doing wrong?

    Code (JavaScript):
    1.  
    2.  
    3. if (GUI.Button(Rect(5,30,150,25),"Generate Splatmap"))
    4.     {
    5.         createClone();
    6.         tc_script.terrains[0].splatPrototypes[0].texture = tex;
    7.         //tc_script2.terrains[0].colormap.texture = tex;
    8.         tc_script.splat_output = true;
    9.         generateStart();
    10.     }
    Thanks
     
  46. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I mailed you back how to assign a colormap using RTP as you mentioned you were using it. Everything needs to be done from RTP if you use it. What you do here in the code is assigning a texture to TerrainComposer's splat texture list of terrain0 (splat textures are close up detail texture like sand/grass/cliff, they are not a colormap). In TC this is a template and is assigned to the actual terrain upon shift clicking <Set All>. You just need to call the method:

    tc_script.set_all_terrain_splat_textures(tc_script.terrains[0],true,false);

    Nathaniel
     
  47. Demonith88

    Demonith88

    Joined:
    Jun 30, 2014
    Posts:
    216
    How i can add more terrains if i allready have some terrains in the scene and can i make the END of terrains to be hills to close my all scene something like that because i dont have the horizont ON
     
  48. PrimeTales

    PrimeTales

    Joined:
    Jan 17, 2015
    Posts:
    9
    Hi guys,

    I get some really weird numbers when i open the TerrainComposer window.



    I also don't see the rtp button (I imported both).

    Hope you can help me

    Thank you
    Mabenan
     
  49. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I don't mind ;). I'm glad you like TerrainComposer :).

    Nathaniel
     
  50. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You can add more terrain tiles in TerrainComposer anytime, you will have to regenerate everything though, so you have to do that before you do any manual changes with the Unity terrain tools:
    Help Creating Terrain

    Yes you can mix unlimited amount of heightmap layers based on masks. So to make hills on the far away terrains, you can make another heightmap layer and put a mask on it.
    TerrainComposer tutorial about filters, masks and curves (New)
    Help Video Heightmap and splat texturing mask (for heightmap best is to use 16 bit raw grey scale image, with filter/mask input to 'Raw Heightmap').

    Nathaniel