Search Unity

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

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

  1. Pequisto

    Pequisto

    Joined:
    Apr 21, 2015
    Posts:
    66
    I have a fairly recent AMD hexcore which usually does the job well. :) After some testing, it almost seems as though all of my selected details (grasses, bushes, rocks, etc.) have the Virgin Terrain option checked in the Resource file. Is this automatic?
     
  2. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    For them yes - virgin terrain means only place them in locations that don't already have content. You can easily change these.
     
    Pequisto likes this.
  3. Porto881

    Porto881

    Joined:
    Jul 11, 2013
    Posts:
    74
    Hi Adam and thanks for an AWESOME asset!

    I have run in to a problem, the shadow on my terrains, the backside of a mountain for example "flicker" when i move the mousecursor. Hard to explain how it looks :/
     
    Last edited: Nov 11, 2015
  4. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep i have seen this - its a Unity thing rather than a Gaia thing. You need to set up your lighting and camera correctly.

    I typically run lighting in linear / deferred, and set the camera in the scene to HDR enabled.

    Have a search on google and have a look around - you will find a lot of articles on this issue - this article seems to be useful:

    http://forum.unity3d.com/threads/terrain-flickering-really-annoying-please-help.164936/
     
  5. Pequisto

    Pequisto

    Joined:
    Apr 21, 2015
    Posts:
    66
    While trying to spawn my terrain details, I receive this error:

    Detail index out of bounds in DetailDatabase.SetLayers
    UnityEngine.TerrainData:SetDetailLayer(Int32, Int32, Int32, Int32[,])
    Gaia.SpawnRule:Spawn(SpawnInfo&) (at Assets/Gaia/Scripts/SpawningSystem/SpawnRule.cs:334)
    Gaia.Spawner:TryExecuteRule(SpawnRule&, SpawnInfo&) (at Assets/Gaia/Scripts/SpawningSystem/Spawner.cs:1547)
    Gaia.<RunAreaSpawnerIteration>c__Iterator1:MoveNext() (at Assets/Gaia/Scripts/SpawningSystem/Spawner.cs:904)
    Gaia.Spawner:EditorUpdate() (at Assets/Gaia/Scripts/SpawningSystem/Spawner.cs:347)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    Where have gone wrong? :confused:
     
  6. closetgeekshow

    closetgeekshow

    Joined:
    Jun 6, 2014
    Posts:
    125
    I've had this problem before (I think) and I solved it by making the Near Clipping Plane on my camera slightly higher.
     
    AdamGoodrich likes this.
  7. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    That's an interesting statement. Imagine a world with a procedural change in seasons, where the trees lose their leaves in Winter. sprout them again in Spring, have them all Summer then they turn Autumnal in Autumn and an adjustable clock could be used to alter the length of the seasons.
     
  8. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Well, TimeOfDay has a date component so I suppose you could leverage that if you could find a way to transition the leaf colours and make them fall off the tree before winter sets in
     
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    This happens when you change whats in the terrain and don't also reflect this back in your resources and your spawners, or vice versa.

    Either you have not selected a resource file, or your resource file is not in sync with your terrain, or your spawner is out of sync with your resources file.

    Go to your resource file and select 'Get From Terrain'. This will make sure your resources are in alignment with your terrain.

    Then go to your spawner and make sure that the resources file has been selected.

    While you are there make sure that the rules in your spawner are correct i.e. the refer to valid resources in your resources file.

    I have put a bunch of code into the next release to detect and 'autofix' this as far as possible, or at worst case warn you that your settings are out of sync.
     
    Pequisto likes this.
  10. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I have been asked to write a script that allows you to swap resources - you could for example have a summer resources file and a winter resources file and swap the textures, details and trees accordingly. Wont be in the next release - as that will be focused on usability and bug fixes, but maybe the one after that.
     
  11. Pequisto

    Pequisto

    Joined:
    Apr 21, 2015
    Posts:
    66
    Thank you, Adam. :)

     
  12. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    I added a remember settings feature - very handy and stops inadvertent errors - will be in next release.
     
    ZenMicro and BackwoodsGaming like this.
  13. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Interesting idea - in next release I have a lot more code devoted fixing or alerting to what to what are essentially self inflicted configuration issues. The usability / way Gaia handles this is poor so I am improving it. I found a couple of bugs along the way as well.
     
    Last edited: Nov 11, 2015
    ZenMicro and BackwoodsGaming like this.
  14. FyreDogStudios

    FyreDogStudios

    Joined:
    Aug 23, 2015
    Posts:
    97
    I have a bit of a problem I have groups of trees in different colours but if I put them all into the spawner then they will all spawn randomly. This is a problem because it doesn't show any cohesiveness when placing the trees. The art style in my game has quite extravagant colours for the trees and it looks quite odd if the trees a place together. Is there a faster way to make sure these trees are grouped in such a way?
     
  15. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Create a different spawner for each tree colour group, and add / activate just the trees you want in it. I do this all the time as a technique for both trees and grasses. Clustered spawners work well. You may need to hit spawn it several times to get the coverage you want.
     
  16. FyreDogStudios

    FyreDogStudios

    Joined:
    Aug 23, 2015
    Posts:
    97
    Yes that makes sense it seems quite obvious now that I think about it thanks Adam
     
  17. teknic

    teknic

    Joined:
    Oct 18, 2012
    Posts:
    32
    Just started using Gaia. Very nice tool set :)

    I would like to create some tiling versions of the stamps, but the preview images are compressed 8 bit JPGs full of compression noise. Are the 16 bit source stamps available anywhere?
     
  18. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
  19. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Nope. You could stamp the stamp the full size of a terrain and then export the terrain as a raw file - that would get you the full resolution source. Alternatively you could look at the code that reads the terrain files and then extend and export in whatever format you want.
     
  20. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Thought i would post some demo shots made during the Gaia beta - been too busy to do much demo work for awhile :)

    Grab 2015-08-10 200457 1847x1069.jpg

    Grab 2015-08-19 150725 1744x998.jpg
    Grab 2015-08-10 200447 1847x1069.jpg
    Grab 2015-08-11 153219 1848x1064.jpg
     

    Attached Files:

    Rick-, Mr-Logan, S4G4N and 2 others like this.
  21. Tovrin

    Tovrin

    Joined:
    Jul 15, 2015
    Posts:
    70
    Two questions (sorry if they've already been covered).
    • When will tiling placement be implemented into GAIA? I'm using World Machine to build all my terrain and everything is done in tiles. I'd like to be able to import and place them automatically and seamlessly if possible.
    • Do you plan any integration with RTP3. I guess this is kind of related to tiling as RTP3 works well with a single terrain tile, but then gets a bit more laborious when you're using multiple tiles.
     
  22. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Next week will have the first update - main focus is fixing some usability issues and a couple of bugs - plus adding Turboscalpeur's grasses. Will start working on multi tile after that - btw there is a workaround for that right now.

    Gaia works fine with RTP right now, am using it in another project. When i add multi tile will also look at rtp multitile - no promises on that though as have never attempted it.
     
  23. Tovrin

    Tovrin

    Joined:
    Jul 15, 2015
    Posts:
    70
    Cool. Thanks.
     
  24. teknic

    teknic

    Joined:
    Oct 18, 2012
    Posts:
    32
    As you describe, I was able to export a raw file from the terrain and tile in Photoshop. But, the terrains don't tile perfectly, looks like this will help: http://www.starscenesoftware.com/stitchscape.html
     
  25. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I bought that over a year ago and still haven't had the need to use it yet. Would love to hear if it works as advertised.. :)
     
  26. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Hi Adam,

    Good to hear about the ID10T-Proofing work you're doing for the next release haha - Will help many i think as Terrain is a harsh mistress it would seem!

    Is there any possibility of having stamps that have transparency element to them so for example you have a Well or Pit and it doesn't have a square base - so you can easily stamp a small area without effecting the surrounds? - i'm going to take a guess it is far more difficult than it seems to incorporate.. since when has a height map used transparency? not yet that i know of. But since your Stamps are I think a custom object i think.. maybe is a possibility (essentially a mask included in the image or when 'scanned' a flag to say BLACK OR WHITE = invisible) would make editing a terrain so much more free form.. like dropping an object on it only its an arbitrary mesh of sorts.

    EDIT: Come to think of it if you had the stamp raised a bit and not touching anything at it's square base (inverted) that would basically work as is. hmm

    EDIT2: Found this interesting article on code generated craters on gamedev.net.. makes me think of a time in the far distant future where Gaia has a toolbar with feature stamps/algorithms to add features like this.
    http://www.gamedev.net/blog/33/entry-1368187-heightmap-editor-scripting-for-noobs-part-1/


    What is the Shader you are using in the attached picture at the bottom of this post? is it AFS? - Looks immense! i mean this one btw : Grab 2015-08-12 101646 1873x1069.jpg
     
    Last edited: Nov 12, 2015
  27. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    This sounds a lot easier than it is. From my understanding, I don't think you can put a hole in Unity terrain. Things like RTP and Terrain Hole System do this using shaders. Unfortunately with the past couple of Unity updates, there have been changes to shaders which have left THS broke. Not sure of its current state but last post I read in his support thread was someone saying it wasn't working again. I haven't been following Tom's RTP thread. So not sure the state of doing holes with RTP. I think in order for Gaia to do holes, Adam would have to make shaders and I don't think he wants to get into shader development. Correct me if I'm wrong, Adam.

    THS operates exactly how you described though. When it works. You paint a black texture which uses a transparency shader and you also attach a script to your character controller (as well as any other animal/npc controller that should be able to enter and exit the hole. When the character collides with that shader, it is able to pass through.

    I do think I recall him mentioning something about having some ideas during beta, but not sure what they were and holes weren't a primary part of getting Gaia released. Maybe he can figure out an alternative at some point along the roadmap. Since my game plans is about 50/50 between above/below ground, I would love to see a good solution for cutting cave entrances as well. A year ago we probably never dreamed creating terrains would be this easy and he pulled that off. Maybe figuring out how to better cut holes in terrain will be his next miracle! lol
     
  28. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    You can do this with a distance based mask.

    There is a crater stamp supplied - i will do a bunch more as well :)
     
  29. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Turn this into a stamp, make the base level to 1, uncheck Ground Base set the height to the depth of your well and keep the very top of the stamp hovering above your existing terrain so the white square won't effect your surrounding area, set the Operation Type in the stamper to Lower Height.

    Did a couple tests, see what you think.




    of course setting the white part into the terrain would give a nice square base for a square well, or building.
     
    Last edited: Nov 12, 2015
    ZenMicro and AdamGoodrich like this.
  30. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Nice :)

    Some other fun things - scan a 3d object like one of the 3D Forge buildings and then stamp them - you get Pompei :)
     
    S4G4N and kurotatsu like this.
  31. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    @AdamGoodrich

    Will you give me the short and sweet steps for taking an existing terrain in a level, and making it your gaia target to be affected via the stampers and especially the spawners.

    I have a level laid out before I bought gaia that I want to just update.

    You just gave me an Idea, I'll test and post of it works.
     
  32. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Create a new resources file
    Load your scene - and then select the resources file and 'Get from Terrain' - this will load your terrain resources file
    -> then tweak your settings / use visualiser etc
    Make sure that the layer the terrain is on is also the layer selected by the visualiser and spawners
    Move your terrain so that zero is at the centre - so for example a 2048 x 2048 terrain would move to -1024, -1024
    Use stampers and spawners as usual.
    NOTE : I have not tested with this much - but it should work. In the next release I will have a bunch of better auto config stuff to make this a little easier - and will also have extensively tested this mode of operation.
     
    FargleBargle and kurotatsu like this.
  33. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    I wasn't referring to actual holes in the terrain like RTP can do, I was thinking exactly like what @kurotatsu has since posted! at first i was thinking how the square part ruins things but you just have to have it out of the terrain enough to not intersect.. still the thought was that the flat square part of a stamp might be able to be removed so stamps can be used in the full spectrum grays cale minus one extreme black or white and a toolbar with these kind of shapes.

    One thing you mention THS is that Adam's work or some other asset? i only know of RTP.

    Exactly!.. this was exactly what came to mind after I realized how it would have to be done.. still i picture the square part being ignored so one any stamp you can work without being concerned about stamping the base square. Cheers for the demo :) That would have to be the 'Well or Pit Tool' from the GAIA Artistic Toolbar Add-On ;P
     
    BackwoodsGaming and kurotatsu like this.
  34. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    I'm using Gaia and RTP3 with a lot of flat areas in my new game, but having a great looking terrain between building areas is really inspiring me to crack on with coding! Using the old Unity terrain was so drab and dull, thanks to both Gaia and RTP3 for bringing things to life in the easiest way possible :)

    P.S. my health is so low as I fell from a high block while building!

     

    Attached Files:

    Last edited: Nov 12, 2015
    Mr-Logan and AdamGoodrich like this.
  35. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
  36. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    I do like the idea of using interlaced png's for stamps and having the clear/transparent portions ignored, as that would open many other doors.
     
  37. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    I'm using a triplanar shader (UV-Free's to be precise :) )
     
    tapticc likes this.
  38. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    THS = Terrain Hole System

    It is a shader based asset that has been around for a while to make holes in terrain.
     
  39. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Rick- and Mr-Logan like this.
  40. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Thanks a lot, Paul! Like I needed anything else on my ever-growing wish list... heheh

    Some nice rock formations they created there.

    On a side note, I've been playing with Super Terrain Collection, converting their island terrains to stamps. Have to scan the terrains to PNG and then create stamps from the scanned heightmaps, but they are making for a nice collection of island stamps to start off as a base. Not sure I would make use of all of the terrains in the pack, but so far really liking the dozenish islands. A steal for $5. In my quick testing, I've been able to scan to PNG, create stamp, drop sky and ocean into scen, stamp the island, spawn the island, and drop fps controller into scene in about 15 minutes total. When I go back in later to actually create scenes to use in game, it will take longer as I'll create custom biomes for different islands, stamp more details on the island and stamp out my ocean floors, but still.. Very happy with the $5 spent a couple months back. heheh

    EDIT: Quick screenie taken from terrain 104 from pack after being stamped, spawned, and scene stuff added.
    Island_ST_104-Night.jpg

    EDIT2: A day shot of island stamped from terrain 107. Everything seen was a quick and dirty spawn. I haven't gone in and tweaked anything that was spawned... 100% done by Gaia.
    Island_ST_107-Day.jpg

    LAST EDIT: lol... Toolbox for these was Gaia, Suimono, Scion, SSAO Pro, and I'm testing and considering switching to Time of Day. Grasses are from the HQ vol 1 grass pack by Turboscapeur. Textures and trees are the free Unity ones. Oh and islands are from stamps made with the pack I talked about above..
     
    Last edited: Nov 12, 2015
  41. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Quick (silly?) question. I see lots of talk about supporting multi-tile terrains and that support will come in the future. Is this going to enable the ability to produce say 4 terrains that all seamlessly join with each other? If not, what is the best way to go about this? Say we wanted to create a huge environment how do we get them all to line up along the seams?

    Sorry, new to terrain creation but its been on my list of "to-do's" for a while now!
     
  42. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Sorry.









    (not) :p lol
     
  43. closetgeekshow

    closetgeekshow

    Joined:
    Jun 6, 2014
    Posts:
    125
    Rethinking my approach to my race track idea, I'm going to try to have the track part elevated, but that will require so sort of fence and colliders on the edges of the elevated part. Can someone suggest a way that I could do this with Gaia? I was thinking that I could use a mask somehow, maybe use my track image i made in Photoshop and add border on edges of the track in a different colour.

    What I'm not sure of is how I can do that and also tell Gaia how to lay down the fences and colliders without them bunching up together.

    I'm thinking maybe that's done with spawning GameObjects using Bounded Area Check or the Bounds Radius or both. Is this the right track (yay race puns)? I haven't tried it out yet figured I'd ask first.
     
  44. closetgeekshow

    closetgeekshow

    Joined:
    Jun 6, 2014
    Posts:
    125
    One more thing: can we add new folders in Stamps without worry or does that break something? I've been too scared to try it.
     
  45. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    As someone who used to use a shader based hole system, I got tired of being at the mercy of Unity, or any of these other third party solutions. First I exported my terrain to mesh. Then I edited the original terrain, dropping the affected areas below where the caves/tunnels were, and carved the tunnels into sections of the exported terrain mesh, which I then brought back into the scene to cover the lowered areas. No need for triggers, and no worries about it not working after an update.

    What would make this method easier would be better terrain/mesh blending solutions, and the ability to plant dynamic trees and details on these mesh sections, using similar methods as used on terrains. There are already a few products, including RTP, claiming to do some of this, but I'm not sure how complete or effective any of them are. If Adam or any of the rest of you have any thoughts about this, I'd love to hear them.
     
    Last edited: Nov 12, 2015
    S4G4N, hopeful, Teila and 1 other person like this.
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    @FargleBargle,

    Very cool solution. I would love to see a screenshot of how this looks in-game. Just reading your post cause my brain to spin with some ideas on what I could do with this.
     
    S4G4N likes this.
  47. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    I was thinking of trying the export function tonight, and test a couple things with cave creation in blender.
     
  48. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Yep :)
     
  49. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Hmm... i have seen some very creative uses of multiple terrains working together - cant see why you couldnt also do something like this - i will have a think about how I might support this with Gaia.
     
    hopeful and BackwoodsGaming like this.
  50. Thorning

    Thorning

    Joined:
    Mar 17, 2015
    Posts:
    2
    Hey

    first off, i LOVE Gaia, so many options/variations from few bits. anyway i really want to know if its possible now or in future to mask of certain parts of map for texture/obj's spawning. fx. cornfields,, or a 3 point cap the flæag with random layouts for each match.

    hope questions makes sense.

    Best Regards and keep up the great work.
     
    AdamGoodrich likes this.