Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GAIA - AAA terrain generator, procedural texturing, planting and scene creation

Discussion in 'Assets and Asset Store' started by AdamGoodrich, May 21, 2015.

  1. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Not sure I understand what you are doing. I wouldn't recommending raising terrain after it has been stamped. If you do this, you also will need to change your sea level settings within Gaia. If you uncheck Ground Base on your stamper, you can freely raise/lower stamps there. I always put my sea level at 100. That way I am free to have some room to use subtractive stamps on my terrain "floor" to lower underwater features. I may increase to 200 or 300 before I start doing production terrains though in order to give a lot of depth in surrounding ocean tiles. In my workflow I use the same sea level across the board. Pretty much look at it as a global setting, about the same way we do in real life.

    At any rate, I have no issues at all stamping moutains, mesas, or whatever on my raised terrain. BUT, you really need to figure out your sea level at the start. If you raise your terrain later, you need to adjust sea level in your Gaia files accordingly or your spawners will be screwed up.
     
  2. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Heh, sorry if I was unclear, what I meant was that I had used 1 stamp to just bring the center of the terrain up to a height of around 300-400'ish (I really want the edges to just go deep down), after that I want to use the stamp to add mountains to the island I've now created (the water is up in a height of 350), I did manage to do it though, but it was more luck than anything else, and I won't say I learned much as I'm not entirely sure how stuff worked, but some things did indeed work xD


    I've now started playing around with textures, and I have this oddity
    upload_2015-11-14_17-10-28.png

    the brown lines really just don't look very good, is there a way to force them to perhaps require larger area before they appear or some such?
     
    S4G4N likes this.
  3. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I fixed it by setting the min viable fitness really high on the Grass&Rock texture, though I have a feeling that may be the wrong way of doing it.
     
    S4G4N likes this.
  4. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    I have had similar issues i think, when you change things the spawners do not auto update to reflect these changes so you need to go through them and basically redo all your fitness/min/max heights to reflect the terrain changes, it might be nice to have this auto update, but there may be reasons you would not want this to happen (i just can't think of any right now)

    Maybe if there was an option to Update Spawners and make the heights fit scale and within the min/max of the terrains actually lowest and highest point. Like if you set everything up and your terrain in 300 height but then scale it all to 400 the spawners scale from 0 to 400 and anything in between gets scaled correctly as well. Just a thought for ease of use when you are experimenting/tweaking your terrain.

    It also crossed my mind that when updating the resources file that it takes ALL terrain resources in one go, perhaps if there was one Update Resource File button for each spawner you could Update the resource file component that you are working with only, say textures and not say erase details if you had removed them and couldn't respawn them without the previously mentioned work of updating fitness etc (and you don't have the time or desire to work on that right now) so it's more individual. Essentially you could Get/Set each Spawner component resources individually.

    Hope that makes sense :)
     
  5. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I think it is all a workflow thing. Spawners are based off of your sea level setting. If you manually raise/lower the terrain, adjust your sea level setting by the same amount and you shouldn't have to touch your fitness settings. All of the fitness settings are based off of sea level. If your sea level is at 100 and you have grass starting to spawn at 10. That means the start is 10 above sea level but in terrain "box" units which go from 0 to the height of your terrain, it would be starting at 110. Sea level was put in specifically to solve the whole recalculating every single fitness if you raised or lowered your water level.

    As for the removing resources, I'm not sure why you would remove resources from your configuration files that you are actually using. I've not have any issues with this for a long time either. Having said that, I NEVER touch my terrain data file. I define my textures, trees, and details in my resources file and then click the Apply to Terrains button. I never Get From Terrain because I never edit within the terrain. The ONLY time I, personally, would use the Get From Terrain button is if I was pulling in a terrain that I didn't create in Gaia and wanted to populate a new Gaia Resources object specific to that terrain. I could be wrong, but what I think may be screwing you guys up some is editing resources within the terrain object and going back and forth with the Get/Apply button. That is the only way I could think of that it would wipe things out.

    At any rate, my workflow probably doesn't work for everyone. But seriously... I haven't had the issues I'm seeing a lot of folks describe when I'm using it.
     
  6. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    If i change a texture, do i have to update the Resources file by Get from Terrain? i think so, so if i had cleared my details or whatever updating the resources would remove the details as they are no longer instanced in the terrain to be picked up, so i would be updating the textures correctly but losing my details - at least that is my understanding of it.

    I am not creating a level step by step 1,2,3 and i'm done, i'm messing around with all kinds of things call it experimentation but when i want to try something different or change something I will weather it be a texture a detail or the terrain itself, It's art so there is always going to be changes made to almost everything at some point as you edit a section of the terrain for a river a ramp or waterfall etc - so you need to clear the terrain of details to update... Though i have gotten my spawners in a twist as I no longer know what's in any of my resource files (no way to preview is there? like a resource viewer?)

    That brings me back to the idea that the resource file updates from instanced objects only and not from the spawners, I'd just about suggest that a spawner could be backed up and you could then use that particular spawner at anytime in any terrain you're working on - like a Berry Patch Spawner so just load it up/Import it in a terrain that may not have any other resources in common.

    As for the Sea level i'll take note of that.. so should be able to raise my terrain level along with the sea level giving me more sub sea level room to move and make deeper rivers etc :) - of course as mentioned earlier all objects will be under the ground level and need to be respawned and the manually placed stuff as well will required manually shifting.

    I will likely just start a new scene when the next update comes out (with the resource file being remembered after exit/load) and recreate what i have in order and do the major terrain changes i need to do then before moving on to the spawners etc. I'm sure that will take care of a lot of the issue - one resource file only and i'll be sure to have everything spawned in world space before i update the resource file after changing any resources.

    EDIT: So anyway, I'm juts putting it out there, my opinion (and i may not even be understand how some things work/am using incorrectly) hopefully I've made some valid points for consideration by Adam.
     
  7. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    That was part of the point I was trying to get across. If you are making those changes in the resources file and applying to terrain, you wouldn't need to touch them in the terrain file. Instead use the resources file for a central point to work on all your spawnable stuff. Then you wouldn't be getting from terrain and take a chance of it making changes to things in your resources file which you hadn't pushed to the terrain already. I think working on stuff in both places is what is causing you guys grief. I do all the same types of stuff you describe, but I do it all from resources and only apply changes to terrain.

    You can kind of already do this. You aren't limited to only using one Resources file within a scene. You can have custom resource files for different biomes. For example say your terrain has a small marsh area. Create a resources file that just has your marsh plants, trees, game objects and create a spawn group for that resources file. Instead of covering your entire terrain, you would set your spawner sizes up to just cover your marsh area. You can then save your MarshResources as a prefab and use it within any of your scenes within your project. The catch is, you will again want to ensure that your sea level matches for the terrain you are using with what is set in the resources file.
     
  8. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Sorry bout the formatting not sure how to split quotes up. Here goes...

    If you are making those changes in the resources file and applying to terrain, you wouldn't need to touch them in the terrain file.
    What do you mean, i am changing them in RTP, but i think even so if i wasn't you change them in 'Unity Terrain Texture Selector' and then i have to update the Resources file, What do you mean wouldn't have to touch them in the terrain file?
    What i mean is you don;t change anything in the resources - you don't 'work' in a resources file you either get or set it from or to the world.

    Instead use the resources file for a central point to work on all your spawnable stuff.
    Again not too clear on what you mean here, a texture is spawnable along with everything else...The resources file is the central point or database isn't it? You change some resource in the world and you need to update the resource file - period.

    Then you wouldn't be getting from terrain and take a chance of it making changes to things in your resources file which you hadn't pushed to the terrain already
    That's my point about how it does an everything approach and beats me anymore what's in any resource file now, i'm ready to delete them all and just run with the one that loads when i start Unity. And i am aware to make sure i only backup when i have all spawners spawned or i will lose stuff.

    I think working on stuff in both places is what is causing you guys grief. I do all the same types of stuff you describe, but I do it all from resources and only apply changes to terrain.
    I am really confused, do you simple mean, load all your resources in and don't change it, then you can do what ever you want in the terrain... what do you mean by working in 2 places? i am working in the terrain, but updating the resources when i have made a change to a resource to update it.. as you expect to have to do with anything that needs to be manually saved without prompting or autosaving.

    I think i don't get what you mean at all to be honest... the one thing i understand is if you update the resource file it takes one of each resource from the world. I am updating the Resource file as you would save anything - when you change something.

    I am giving my suggestion for a feature or change to GAIA that is basically that The ALL resources approach is changed to allow for selected spawners be backed up/restored or even saved separately (without me having to make a prefab from the game object that they are).. does that make sense? something like a Resource File Explorer. Sorry for the long posts.

    EDIT: I just rewatched the tutorial videos on resources and now i realize better what you meant.. i didn't pickup on the fact that Adam was working within the project folder/resource files themselves.. i have been working in the spawners instead and then assuming i needed to update the resource file to keep those changes.





    that explains a lot, i have not even been looking at the resource file contents in the inspector, thinking it was a black hole or data.
     
    Last edited: Nov 15, 2015
    S4G4N likes this.
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    @ZenMicro the resources / spawning system works as designed and has done so for some time, so your issue is most likely workflow related.

    While I have made Gaia as simple as I can from a usability perspective, it is still quite a sophisticated system, and if miss-configured or miss-used it will not behave as expected.

    As previously mentioned in the forum I have made some changes since GAIA was released to detect when you have made changes to your terrain or your resources, and then not reflected them in your spawner, and this will be delivered in the next release.

    If you are continuing to have issues then please contact me directly and I will be happy to go through this with you via Skype. This would actually be very useful for me because I will be able to to see and understand what you are doing - and then either correct your workflow, or adapt GAIA to recognise it so that the next person doesn't have the same issue..
     
    BackwoodsGaming and S4G4N like this.
  10. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    OK that would be helpful, I'd like to raise the terrain and sea level so i can carve lower into the riverbed and I'd like to get the resources from another resource file. Let me know when a time suits you, I've already got you added on Skype from last week. Much appreciated. even tomorrow afternoon if that suits better.
     
  11. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    Hi Zen,

    You can save resources in multiple copies of resource files if you like and swap them out when needed. I do that.
    Not everyone will need to nor want to do that, but for those creating multiple terrains / biomes etc, its extremely useful. Or even to just simple group textures and resources together that work well (as I use it) and save them as such. So you can have resource files like "Terrain_Dry_Climate_Beaches", "Terrain_Dry_Climate_Interior", "Terrain_Rainforest_Thick", etc.

    Obviously if you tamper with the textures (resources) on a terrain, then you will likely want to upload those to a Gaia resources file ... but it's designed that way so you don't need to either. ie. You may not want to keep them for any other terrains or runs of spawner - it may be a "once-off" or just a final tweak before release (in fact Gaia may not even be loaded when you do that). So if you want them saved in a resource file, Gaia has a button for that - just needs a click. It's easy to transfer both ways.

    Gaia is designed to easily be "detached" from unity terrain under the KISS principle (Keep-It-Simple, Stupid). But in most cases you probably want to have the changes in resource files.

    So rather than make the changes on the terrain, maybe consider to make them in the resource file as Shawn67 mentioned. Then you spawn them into the terrain, and any other 3rd party tools should just pick them up and use them from the terrain - like I assume RTP would, but I don't use it ... I use the ATS Colormap ULTRA system for by forst which is pretty similar (but only cost $10) - fully Unity 5 compatible, allows 8 textures (well 6 + 2 as terrain decals) in one drawcall, supports GI / parallax/bump, mesh blending, etc.

    So my workflow is ... I use Gaia to spawn textures into my unity terrain from a resource file (I have different ones - so just select the resource file i want to use) - if there are already terrian textures, they get replaced. Then I use the ATS custom editor interface to add the normal maps for the new textures (as it compresses them by combining normals to save resources), then I click the button to regenerate and apply a new custom material to the terrain. Lovely terrain is displayed. Job done. Simple (KISS).

    So the beauty of Gaia is its extremely functionally rich but elegantly separated from Unity terrain for simplicity, and therefore also can't interfere with other 3rd party editors going on. Brilliant design. 5 stars.
    __________________________________
    EDIT: So what I'm saying is ... consider using Gaia resource files as your filing system to group and keep resources together that work together. You can save them with the assets if you group assets in packages etc to import when needed.

    Re-reading our post I think you were just confused about that Gaia resource files are seperate from Unity terrain and need to be managed as such. In my case I never make texture changes manually in Unity terrain - Gaia applies them for me (into the Unity terrain) when I run the texture spawner.
     
    Last edited: Nov 15, 2015
    AdamGoodrich and BackwoodsGaming like this.
  12. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    There are some nice pre-made features in this that can certainly add some points of interest either in the terrain or in the surrounding area :)

    screenshot109.jpg

    screenshot110.jpg

    I think it's going to take some fun experimenting with this when I've got more time :)
     
  13. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Nice! I think I have a couple of packs from them on my wishlist to add down the road when I have money to toss at assets again. :) Definitely adds some nice focal points for you!
     
  14. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Love the land bridge, reminisent of Pike islands from Game of Thrones.
     
  15. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,213
    Cool Screenshots :)
    I see the Fast Travel Portal Kit there as well, let you hop to the other islands ;)

    Cheers
    Cobus
     
    BackwoodsGaming likes this.
  16. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,047
    Hi Adam, I see on your web site you have a video of one of the Gaia worlds. How about hosting a web build of your favorite Gaia build, as you add features to the tool you can showcase them in that world. TC built a sample world and then made a easter egg hunt out if it. Horizon did a balloon popping game to showcase that tool.

    Nuthin like the real thing!
     
    BackwoodsGaming and AdamGoodrich like this.
  17. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    Thats a cracking good idea - will have a think on how to do this :)

    Maybe use some of the real time spawning features...

    Hmm..
     
    ibyte, S4G4N and BackwoodsGaming like this.
  18. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I know it isn't something that a lot of us have played with, but maybe the tree growth script as well. :) Showcase some of the hidden gems. :)
     
    AdamGoodrich, ibyte and S4G4N like this.
  19. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Triplanar is nice and really the only way to get rid of stretching on steep cliffs.

    Good that you found a texture with less tiling. RTP also helps with the tiling issues by allowing you to blend normals. That is possible without RTP but not as easy.

    It is not Textures.com that made this look nice, it is RTP and the way you set it up. :)
     
    ZenMicro and AdamGoodrich like this.
  20. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Hehe. The aim I'm going for is that you'll need to complete various tasks, etc which will each partially activate a second portal which will then allow you to move on to the next island. The one you see in the first pic is the starting point :)
     
  21. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Excellent gameplay mechanic.

    Keep us updated, or start a thread, cause I'd follow it.
     
    Last edited: Nov 16, 2015
  22. Jeryl

    Jeryl

    Joined:
    Sep 18, 2015
    Posts:
    45
    Hello all!
    At first I want to congratulate Adam on a job very well done. My terrains used to be all sorts of terrible, but not anymore (they will become better once I master Gaia).
    I have spent the last week playing with every button and variable to see what happened and while it was fun, I have a game to (start) building! ;)
    I have a request (if you do those of course) : i've read that you'd post a few more stamps when your website is done. When that time comes, could you include one of a river? (I don't care about the riverbed shape). Ideally it's just a very large river with low banks (not much elevation over the sea level) much like the Nile in Egypt with long straight stretches and a few light turns.
    I'm sure a lot of people could use it. If you don't plan to add one, could you explain how to make customized hd stamps?
    Thanks again for Gaia.
     
  23. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Just thought i'd share in case you didn't know but at the moment Mixamo animations are currently FREE! i was looking into how to convert a bip to fbx etc. I nearly bought the same animations in the Asset store version of the Mixamo Store where one minute it was $5 then it must have updated and showed $10 but then went what the? on the Mixamo site it let me download... so go go go grab as many as you can before this offer ends! This post also discusses it a bit. You just need to create an account with an Adobe ID.. maybe i am the last to know, i don't know but here it is! happy days!

    http://forum.unity3d.com/threads/mixamo-access-is-now-free-for-a-limited-time.359426/
     
    kurotatsu likes this.
  24. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    They are free for a couple of months already, but probably you posted it in the wrong thread. Nothing to do with Gaia.
     
  25. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    It's good to hear though, I found out in idle conversation friday. Pass the word around I think.
     
    ZenMicro likes this.
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Some pretty pictures! :)



     
    protopop, Rick-, ibyte and 19 others like this.
  27. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Wow! very nice! ... And natural-looking.
     
    S4G4N and Teila like this.
  28. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks! haven't seen you around for a while! Glad you are back. Or maybe it is me who hasn't been reading the forums as much. :)
     
    wetcircuit and S4G4N like this.
  29. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Those are excellent. How about a list of what assets the scene contains to help spark interest, and maybe sales for some of the authors, as well as help newcomers see where to put their efforts and coin.
     
    Last edited: Nov 16, 2015
  30. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I used all the IE and grass assets recommended by Adam above. The others are all my own original creations or models I have customized myself, some of them edited 3dForge parts.
     
    kurotatsu likes this.
  31. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Hi all. With Object Spawners, is it easy to copy the Tree and Grass spawner settings into an Object Spawner? I'm using Mesh Materializer and I want to convert my Terrain and everything else into the style. But I need to spawn my trees and grass as Objects. I'd like to copy the included set up which applies to the spawn locations of the trees and grass, but have them as objects instead.
     
  32. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Those are really pretty Teila.
    I'd love to see a closeup of the fields btw as I'm going to construct some of my own soonish =)
     
  33. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Just grass/speedtrees, nothing special. :) At least not yet.
     
  34. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    OK, on the image it looked like you'd raised them a bit and put little fences up and stuff, but it's so small that it's hard to tell really =)
     
  35. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Gotta have some family secret recipes, you know. :)
     
    Mr-Logan likes this.
  36. jaimepollard

    jaimepollard

    Joined:
    Apr 30, 2015
    Posts:
    27
    Some new photos, I've been tweaking texture & tree placement. currently running at 83fps @ 2560x1270 On a 2048x2048 Terrain.. more to come :) screen_2560x1270_2015-11-16_20-58-13.jpg screen_2560x1270_2015-11-16_20-58-01.jpg screen_2560x1270_2015-11-16_20-56-40.jpg screen_2560x1270_2015-11-16_20-55-11.jpg screen_2560x1270_2015-11-16_20-57-26.jpg

    Anyone who wants a script for taking HD screenshots in game just need press K ingame to take a snapshot and attach this to the main camera, you might need to edit the resWidth/resHeight to suit you needs:)

    Create a new C script call it HiResScreenShots.cs copy and paste the code below and save. Create a folder in your Assets folder called "screenshots"

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class HiResScreenShots : MonoBehaviour {
    6.     public int resWidth = 2560;
    7.     public int resHeight = 1270;
    8.  
    9.  
    10.     private bool takeHiResShot = false;
    11.     public static string ScreenShotName(int width, int height) {
    12.         return string.Format("{0}/screenshots/screen_{1}x{2}_{3}.jpg",
    13.                             Application.dataPath,
    14.                             width, height,
    15.                             System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));
    16.     }
    17.     public void TakeHiResShot() {
    18.         takeHiResShot = true;
    19.     }
    20.     void LateUpdate() {
    21.         takeHiResShot |= Input.GetKeyDown("k");
    22.         if (takeHiResShot) {
    23.             RenderTexture rt = new RenderTexture(resWidth, resHeight, 24);
    24.             GetComponent<Camera>().targetTexture = rt;
    25.             Texture2D screenShot = new Texture2D(resWidth, resHeight, TextureFormat.RGB24, false);
    26.             GetComponent<Camera>().Render();
    27.             RenderTexture.active = rt;
    28.             screenShot.ReadPixels(new Rect(0, 0, resWidth, resHeight), 0, 0);
    29.             GetComponent<Camera>().targetTexture = null;
    30.             RenderTexture.active = null; // JC: added to avoid errors
    31.             Destroy(rt);
    32.             byte[] bytes = screenShot.EncodeToJPG();
    33.             string filename = ScreenShotName(resWidth, resHeight);
    34.             System.IO.File.WriteAllBytes(filename, bytes);
    35.             Debug.Log(string.Format("Took screenshot to: {0}", filename));
    36.             takeHiResShot = false;
    37.         }
    38.     }
    39. }
     
    Last edited: Jan 12, 2016
    icetec, bartm4n, mwituni and 12 others like this.
  37. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    jaimepollard likes this.
  38. jaimepollard

    jaimepollard

    Joined:
    Apr 30, 2015
    Posts:
    27
    I've used this script before and worked well. Create a new C script call it CustomTreeBrush.cs copy and paste the code below and save. Then Spawn trees or Preexisting ones via Unity/Gaia A new Custom tab will have appeared on the Unity top bar, click it followed by terrain... Add your terrain too the first box, then add all the trees objects that were spawned in the boxes below.. click "convert to objects" then you can press the clear trees button and your left with the models in there place :)

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEditor;
    3. using System.Collections;
    4. using System.Collections.Generic;
    5.  
    6. [ExecuteInEditMode]
    7. public class CustomTreeBrush : EditorWindow
    8. {
    9.  
    10.     Terrain terrain;
    11.  
    12.     GameObject[] trees = new GameObject[4];
    13.  
    14.  
    15.     [MenuItem ("Custom/Terrain")]
    16.     static void Init()
    17.     {
    18.         CustomTreeBrush window = (CustomTreeBrush)GetWindow (typeof(CustomTreeBrush));
    19.     }
    20.  
    21.     void OnGUI()
    22.     {
    23.         terrain = (Terrain)EditorGUILayout.ObjectField (terrain, typeof(Terrain), true);
    24.      
    25.         trees[0] = (GameObject)EditorGUILayout.ObjectField (trees[0], typeof(GameObject), true);
    26.         trees[1] = (GameObject)EditorGUILayout.ObjectField (trees[1], typeof(GameObject), true);
    27.         trees[2] = (GameObject)EditorGUILayout.ObjectField (trees[2], typeof(GameObject), true);
    28.         trees[3] = (GameObject)EditorGUILayout.ObjectField (trees[3], typeof(GameObject), true);
    29.      
    30.         if(GUILayout.Button("Convert to objects"))
    31.         {
    32.             Convert();
    33.         }
    34.         //    if(GUILayout.Button("Debug"))
    35.         //    {
    36.         //    }
    37.     }
    38.  
    39.     public void Convert()
    40.     {
    41.         TerrainData data = terrain.terrainData;
    42.         float width = data.size.x;
    43.         float height = data.size.z;
    44.         float y = data.size.y;
    45.         foreach(TreeInstance tree in data.treeInstances)
    46.         {
    47.             Vector3 position = new Vector3(tree.position.x * width, tree.position.y *y, tree.position.z * height);
    48.             Instantiate(trees[tree.prototypeIndex], position, Quaternion.identity);
    49.         }
    50.     }
    51. }
     
    Last edited: Nov 16, 2015
    Rick-, Hadryel, hopeful and 2 others like this.
  39. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    If you are ok with it - i will add these scripts to gaia so that other people can use them.
     
    Last edited: Nov 16, 2015
    Mr-Logan, Rick-, ZenMicro and 5 others like this.
  40. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    I JUST bought this, I love building environments, and up to now I used the super old Terrain Toolkit, nothing else.
    Loving playing so far, but have one major glitch, please excuse if its been handled before, (I dont want to read 43 pages) but no water?
    I can see a few GOs appearing Water4Advanced(Clone) and Water 4Advanced(Clone)ReflectionSceneCamera but not seeing any water in teh scene.
    Im on Unity 5 but free version... is that it? (Im new to U5 too, so still getting my head around whats included in Ufree)

    scuse nubeness..
    Mark
     
    jaimepollard likes this.
  41. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    You need to include Unity -> Standard Assets -> Environment to include unity water in your project.

    Have a look in the QuickStart guide - if you follow that you should get water. You can work from there as a starting point.
     
  42. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    I read that, but weirdly, Standard Assets are not showing up in that usual menu.
    Instead I went to Asset Store and downloaded it.THEN it still didn't show up, but by using custom package, I found both the characters and the environment packages and imported them.. still no water...
    Maybe this circuitous route needs a restart? Or a specific directory?
     
  43. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    Might have sussed it... I was not in a clean new project, and had "Big Environment" Asset as well, (was hoping to get cracking on using some other textures and rocks than the default) Just noticed that it has its own "Standard Assets" folder.. can this cause a clash? Im tring a new project with ONLY standard assets and Gaia now...
     
  44. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I think Adam meant to put Assets -> Import Package -> Environment

    I always uncheck standard assets if they are included within packages. There is a good chance they can screw you up. Especially if they packaged the asset with an older version of Unity. If it were me, I'd look at the main folders in that folder, take note of them, delete that standard assets folder, and install the new versions using Assets -> Import Package.
     
    Baraff and AdamGoodrich like this.
  45. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    Hey guys - small announcement - you now have a new feature coming hopefully later this week :)

    2015-11-17_13-27-25 - Screenshotter.jpg

    2015-11-17_13-29-07 - ScreenShotter 1.jpg

    I took the bones of the script that @jaimepollard posted earlier, extended, modified and then integrated it. By default its bound to the F12 Key, but you can change that and also change the resolution it renders at.

    GAIA, who can at times be a little vain, can now take screenies :)

    I don't consider this to be a core feature - but its certainly nice to have.
     
    Last edited: Nov 17, 2015
    Mr-Logan, Rick-, montyfi and 5 others like this.
  46. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Awesome thanks. I'm going to have to try it out again as the first time it spawned my trees about 400 x 400 away from the original starting place. Probably just an error on my side
     
  47. jaimepollard

    jaimepollard

    Joined:
    Apr 30, 2015
    Posts:
    27
    screen_2560x1270_2015-11-17_04-06-17.jpg screen_2560x1270_2015-11-17_04-05-16.jpg screen_2560x1270_2015-11-17_04-05-33.jpg screen_2560x1270_2015-11-17_03-54-29.jpg screen_2560x1270_2015-11-17_03-56-02.jpg
    Amazing little tweak :) heres a few more screenies
     
    Rick-, ZenMicro, S4G4N and 3 others like this.
  48. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    jaimepollard and S4G4N like this.
  49. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    jaimepollard and S4G4N like this.
  50. jaimepollard

    jaimepollard

    Joined:
    Apr 30, 2015
    Posts:
    27
    Its an easy fix, just make sure the position on the unity terrain has been reset to 0 in the x,y,z currently Gaia puts the terrain at x= -1024 y= 0 z= -1024