Search Unity

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

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

?

Would you pay an upgrade fee for Gaia 2 so that we can hire to accelerate its development?

Poll closed Sep 3, 2018.
  1. Yeah super cool - I would pay a $15 upgrade fee to get it faster!

    83 vote(s)
    80.6%
  2. No way - you promised free and i am happy to wait!

    20 vote(s)
    19.4%
  1. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    361
    I have a question related to Gaia workflow. From my understanding at some point I need to stop using gaia spawners. Or at least stop using them for whole terrain. Cause when I'm at the point when I need to make manual changes to terrain texturing or tree\grass positions, it's the point when when using gaia spawners will "destroy" my changes.

    So is this the approach everyone is using? I mean.
    - Do as much as possible using gaia spawners.
    - At some point stop using gaia spawners and do all changes related to terrain textureing, tree\grass positions manually.
     
  2. Pequisto

    Pequisto

    Joined:
    Apr 21, 2015
    Posts:
    66
    I've considered TMS / uNature although I was under the impression it required a networking asset like Forge or uNet.

    And, yes, I was looking for an opinion or some suggestion on how to increase performance. :D
     
    Shawn67 likes this.
  3. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    679
    I was just about to suggest that, but you beat me to it. It lets you only generate tree colliders within a certain distance of the player, and also supports multi-threading, to reduce the impact of all those trees. The news about uNature is also good, since having lots of grass is also a performance killer. I'm not sure how Unity 5.4 improvements will compare, but between them you should see a big improvement.;)

    @Pequisto No, you don't need Bolt or Forge networking to use TMS. It just supports them, the same as Gaia supports things like Aquas water for instance.
     
    Pequisto and Shawn67 like this.
  4. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    The approach you have listed at the end of your post is the approach I use. Basically use Gaia for all the spawner "heavy lifting" so to speak. Let Gaia do the bulk of the work and then go tweak the spawns to fit your needs or to adjust them for the way you want your scene to look.

    Depending on which spawners you are running, most will just add additional spawns into your scene if you run them multiple times. Texture spawners are the only ones that I think aren't really additive.. But generally running tree spawners a second time will spawn more trees, GameObject spawners will spawn more game objects. Etc. But yeah, painting ground textures and then running the texture spawner will definitely lose any painting you did.

    You briefly touched on another option which Adam has referred to as biomes. You can spawn areas within a terrain by decreasing the size of the spawner area to fit the area you want to spawn. That is another option if you want to go back and spawn later having the spawners only effect that smaller area. This is useful if you want to add a swampy area or an old decrepit cemetery where all of the stuff you are spawning is vastly different. It won't effect any hand painting of textures you have done outside that area, but any within it would be replaced when you run a texture spawner for the area.

    In general, I think any roads, paths, detailed ground texturing you would want to do in a Gaia workflow would definitely be saved to the very end.

    Hope that helps. :)
     
    turboscalpeur, S4G4N and Gua like this.
  5. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    361
    Thanks! I also remembered about masks. But while custom masks and texture masks is an option, I really want to know the approach that most people are using when working with real game levels.
     
    turboscalpeur, S4G4N and Shawn67 like this.
  6. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,649
    #tip Not really sure that making performance assessments on beta software is useful. It's a moving target, and I am pretty sure that there are still things they haven't introduced yet - for example gpu instancing on speedtrees.

    What you are trying to do is balance your available CPU and GPU resources against what you are throwing at them. The more you throw at it, then the harder it has to work, and the less performance you get. So less really is more - from a performance perspective.

    There are many potential causes of performance issues and many ways to mitigate them. You should profile your game and work out where the bottleneck are.

    Here are a couple of things to consider:

    * Camera far clipping plane - the further you view - the more work the system has to do

    * Terrain triangle. Explore pixel error. Also run a smooth on it before doing anything - this will often significantly reduce polys - which all adds up.

    * Too many SpeedTrees:
    - Experiment with LOD's
    - Remove colliders - Elroy's system ensures that only the closest trees have colliders
    - or be more creative with your level design and introduce terrain features that occlude trees.

    * Too many terrain textures
    - A standard terrain 'pass' can paint 4 textures. Every addition 4 textures in your terrain means another terrain pass is required to render them. This means more work for the system to do and less performance. Some non standard terrain shaders get more textures per pass. I can't comment about performance differences though as I have focussed on supporting what unity gives you to work with.

    * Too much grass
    - Less grass textures - same as previous point on terrain textures - more grass textures = more work for Unity to render it
    - Less detail density - less work
    - Less detail distance - less work

    * Post FX and other non standard shaders
    - Turn them all off, re introduce with the profiler to asses impact. Tweak settings. I have liked what I have seen of the new Cinema FX so far despite it being in beta still.

    * Unity water
    - Don't use it. There are several 3rd party water systems that have much better performance. The issue here is reflections - reflecting lots of vegetation is expensive. There is a trick you can use to only reflect terrain but it is messy to set up.

    * Lod BIAS
    - In quality settings experiment with your LOD bias

    Use the profiler - what is actually causing the issues? Turn on deep profiling to get more information. What about texture sizes etc. Also, pay attention to what people are saying about batch count's and setpass calls. Is your game exceeding these.

    I am also exploring performance in Unity. My approach is to look at one thing, profile it, experiment to optimise, and then add on the next etc. For example by doing this I noticed in the profiler that running several smooths on a terrain reduced the number of triangles that needed to be rendered - and I was happy that the smoothed terrain still looked nice.
     
    Last edited: May 2, 2016
  7. Tovrin

    Tovrin

    Joined:
    Jul 15, 2015
    Posts:
    68
    Thanks. I missed that.
     
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,649
    #tip Environmental lighting performance... I found the following snippet here.

    Fast Environment Lighting
    The realtime GI system is capable of using a skybox directly to drive the environment lighting inputs. However, using this feature requires downloading the skybox textures from the GPU in order to update the CPU based realtime GI system. This is not ideal when the environment lighting changes every frame as it does in this demo when the time-of-day simulation is running. Instead, the environment lighting is derived from the current time and converted to a lighting gradient and ambient intensity that is used to drive the realtime GI system. These are the settings in the Lighting panel that are used to drive the gradient based ambient inputs:



    A gradient ambient source can be handled entirely on the CPU. This is very performant and gives a result that is nearly indistinguishable from using the full skybox.

    There is also as simple time of day script there that provides a simple time of day system.
     
    TeagansDad, montyfi, julianr and 4 others like this.
  9. Phesant33

    Phesant33

    Joined:
    Nov 13, 2015
    Posts:
    34
    Thanks heaps for this Adam!
     
  10. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    442
    I've purchased gaia, how can I create a terrain 4096x4096 for example?
    thanks!
     
  11. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    679
    #tip You can set the size, along with a few other things like terrain height, resolution, and sea level, in the GaiaDefaults file, located in the Gaia/Data folder. But if you just got it, you should spend some time reading the manual, located in Gaia/Documentation, or at least check out some of Adam's introductory videos, found here, before going much further. Gaia may be fairly simple to use, but you still need to be aware of a few key concepts, and the documentation and tutorials are a great place to start. ;)
     
    AdamGoodrich likes this.
  12. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    442
    thanks!
    i've read but not found the gaiadefaults :)
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,757
    I don't know if this has been mentioned before, but I saw this asset on the store today that could certainly be beneficial to anyone concerned with terrains. The tool allows you to change your terrain resolution settings without losing data. It even works with multiple terrain tiles. I haven't tried it myself, but it looks fantastic. I certainly plan to add it to my bag of tricks.

    https://www.assetstore.unity3d.com/en/#!/content/28949
     
  14. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    I've had it on my wishlist for a while. If anyone has tried it, I would love to hear how it worked out for you. :) I agree, IF it works it would be a must have in everyone's terrain toolbox.
     
  15. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    If you've followed the directions in the tutorials, GaiaDefaults file you are using is defined in Gaia Manager. If you simply click on it there, it will highlight the correct GaiaDefaults file in your Project view.
     
  16. ramsicle

    ramsicle

    Joined:
    Sep 16, 2013
    Posts:
    6
    I've tried Unity 4.6, 5.1, 5.3, and I keep getting the import error "Failed to import package with error: Couldn't decompress package UnityEditor.Web.JSProxyMgr:DoTasks()...
    This is the only asset I have this issue with, so I'm hoping it can be fixed at your end or by Unity... any suggestions will be grateful...
     
  17. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,649
    I have no control over this - its a Unity thing.

    Most likely the disk where the package is downloaded by unity is full. Delete some space and try again.

    Alternatively perhaps the package was corrupted on download. Delete the version of Gaia that was downloaded from your download cache and download it again. The folder you are looking for is the asset store download location.
     
  18. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    Apologies if ive missed anything on this topic in the 113 pages :) but I was wondering if anyone had a setup for VR development? Certain things likes trees etc do not work well in VR, the frame rate just drops crazy. With the new sessions system, I was wondering if anyone had any experience with this and was able to supply a sample session for getting started in VR dev. Right now im using quite a basic terrain with just a few spawned game objects and textured grounds. The biggest issue is that the lighting is not great and flickers all around the scene.

    I know some of this is probably off topic here, but any guidance is greatly appreciated!
     
    dmelt253 and pixelsteam like this.
  19. Vedrit

    Vedrit

    Joined:
    Feb 8, 2013
    Posts:
    505
    This may have been asked, but is it possible to remove trees/grass/other Gaia-placed objects during runtime via scripting?
     
  20. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,649
    No.

    #tip I have been exploring VR and mobile development. Gaia has a mesh export feature that exports highly compressed meshes. You can also swap the sample assets for low poly assets.

    The workflow is something like:

    Create terrain as usual with Gaia - make smaller terrains or use tools like world streamer to cut up.
    Spawn your textures.
    Set up and spawn low poly assets into scene with Gaia.
    Export splat maps and terrain mesh - choose the smallest setting on mesh export.
    Remove terrain and replace with exporter
    Use distingo or spat2terrain and apply terrain textures to your mesh with the exported splatmaps.

    As with any mobile / vr development. Drop texture sizes down, and bake everything.
     
    Goodgulf and S4G4N like this.
  21. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    Superb, thank you for the tip! This is going to be a great help going forward! Now to dive into Gaia a bit more I think :)
     
    Goodgulf and S4G4N like this.
  22. SureSight

    SureSight

    Joined:
    Aug 2, 2013
    Posts:
    61
    Have you considered crowd funding like Kick Starter or a Patreon to do Gaia fulltime?
    We'd contribute a generous amount to something like that.

    Just a suggestion.
     
    jimmikaelkael, S4G4N and Goodgulf like this.
  23. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    Time for more sneak peeks:









     
    SureSight, Goodgulf, Crembo and 13 others like this.
  24. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Really nice! I like the graphic style and the hue you've chosen there. Just goes to show you can get really nice scenes without using SpeedTrees.
     
  25. turboscalpeur

    turboscalpeur

    Joined:
    Nov 29, 2015
    Posts:
    286
    Great done! i feel some hard works behind those screens and mostly, i love where you have gone within' to get that kind of realism :)
     
    docsavage likes this.
  26. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    @Xenonus,

    Those are great shots. Any chance of sharing what assets you used? In particular the lighting.

    Thanks
     
  27. karmik

    karmik

    Joined:
    Oct 8, 2014
    Posts:
    124
    Hi there i am planing GAIA for mobile terrains
    Just wanted to check What would i need to do to get the GAIA terrains with good performance.
     
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,757
    The thing to know first off is that Gaia is simply a tool to help you generate your terrains and fill them with trees, grass, rocks, and other props. At the core, it isn't anything but a tool to interface to the existing Unity terrain system. So, performance optimization begins and ends with what you can do to optimize the Unity terrain system.

    The biggest things to consider are terrain size, terrain heightmap resolution, texture resolution, detail resolution, and the kinds of trees and other assets you are placing on the terrain itself. Shadowing is also a big deal and should be reduced in quality as well as distance. I'd go as low as 129 on heightmap resolution for starters. You can still get nice terrain and it'll take a lot less memory or cpu. There are other posts in this thread that talk about other things you can do.
     
  29. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    In addition to what magique said also make sure you turn Global illumination off realtime and also consider using more basic shaders.
     
  30. dtran123

    dtran123

    Joined:
    Mar 29, 2016
    Posts:
    2
    I have been messing around with Gaia. Though it's an awesome tool, my question is: Would it be possible to create a planet using this tool? Perhaps maybe I can use this tool on a sphere instead of a plane? Or would it be possible to make the plane terrain I create into a sphere?
     
  31. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    Hi dtran,

    Don't know if anyone has managed to use gaia on anything other than a standard terrain but don't expect them to have. I'd ask what do you plan to do. If you have a flight/space sim and are just passing over vast areas quickly then I wouldn't use gaia or any other similar solution. If you want a planet made up of detailed landscapes that you will be exploring at ground level then that sounds unfeasible for anything less than a massive dev team. And even then it would probably use every trick known to man to produce. Sounds fun till you embark on making it. It would be fun to play though:)
     
    TeagansDad and Shawn67 like this.
  32. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    Simple hq skybox was used with a bit tweaked directional light and global fog. The open sourced volumetric light asset gives a much better result, but the unity trees and speedtrees are broken in deferred... And indeed unity trees are less performance consuming and can have a really nice look.
    Furthermore Scion gives the instant pretty alongside RTP and AFS.
    And of course Turbo's vol 1 grasses were used.
     
    turboscalpeur likes this.
  33. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    522
  34. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    2,653
  35. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
    New demo 209 MB, for some reason 'global fog' on the camera strips off all my trees' leaves, didn't add much
    fps so I removed it. Switched to 'forward' rendering from 'deferred' because window/lighting 'check fog' was only
    fogging the trees.
    https://sites.google.com/site/terrymorgan1213/tutorials/bogwood_may_2016
     
  36. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    Thanks for the reply. Sounds like skill on your part as well as you have got them working well together. A lot of people seem to like Scion. I don't have it but haven't seen a bad word about it..
     
  37. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    Really nice pics. There's a lot of foliage there. I may be wrong but I reckon it won't be too long before hardware is up to spec to throw scenes like that around. Out of interest did you test out framerate?

    If you haven't already tried it I recommend Tree manager system. Elroy the dev must be a time traveling space programmer as I have know idea how he manages to get another 100 fps out of systems.
     
  38. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    522
    Well, it's not as bad as I tought it could be... However my GPU is not bad (MSI GTX 760 Twin Frozr OC 2GB).



    The scene isn't optimized at all, the trees are all "Hero" SpeeTrees (hence the high polycount) and I've just baked Occlusion Culling, GI is purely realtime. The grass is quite dense and its distance is at 250.

    With Elroy's uNature should be great! :)
     
    docsavage, turboscalpeur and S4G4N like this.
  39. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997

    Really good stats. Nicely surprised. Occlusion culling is something rarely mentioned. Will have to look into it. Very nice :)
     
    S4G4N likes this.
  40. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    Just made a quick gaia landscape and without occlusion culling it was approx 10 fps faster!? Mind bending.

    Same scenes and everything.
     
  41. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,037
    That's curious. I wonder what's behind that?
     
    docsavage likes this.
  42. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    522
    10 fps means nothing without a clear comparison. I have to admit I haven't tested the perfs without it however it is expected that Umbra will take some CPU time, 10 fps on how much max fps ?
     
    docsavage likes this.
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,757
    Occlusion culling is not suitable for big outdoor environments. It takes longer to calculate what needs to be occluded than to just render it. You need to use other techniques to gain performance such as viewing distance, LOD, streaming, etc.
     
    TeagansDad, Shawn67 and hopeful like this.
  44. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997
    Thanks everyone for the replies. It was a surprise. I bought Sectr about 2 years ago on great sale so I will be looking at that when I do my next game.

    @magique, interesting to know. Thanks.
     
  45. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    442
    hi all!
    I have a question about the terrain/gaia..
    I'm making a rally simulator and in my mind I wish use gaia to build the terrains where, in a second time I build the road... I made some tests and it works fine, but now my problem is the size of the terrain...
    with 2048 everything is fine and fast, but is too small for my needs...
    so I've tried to build a terrain 8192, but is too much expensive and the spawn etc makes too much time..
    did you have some ideas?
    I think a thing that the terrain is 8192 and more, but the part spawned by trees etc is only a small part... it's possible?
    thanks in advance
     
  46. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    997

    One thing that crossed my mind today for better performance is you could make sure that all the assets close to the player are best quality and the rest lower quality as they will never get near it. Like an extreme LOD. You could also use natural features as walls and have tracks that double back a lot giving a long circuit but only covering a smaller footprint so you can reduce the map size.
     
    Last edited: May 9, 2016
  47. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    522
    As suggested by @magique a few posts above, for such a terrain size it's better to stream it.
     
  48. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    339
    Hi, I saw on the website it's written there is a work around for multi terrain. What is it, can you explain?
     
  49. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,302
    About mobile optimisations:

    one very simple and easy optimisation for mobile:
    Code (CSharp):
    1.  
    2. public int m_CloseObjectCulDistance = 85; //use this layer on small rocks/bushes/etc
    3. public int m_FarObjectCulDistance = 300; //use this on props that are >2 metter high
    4.  
    5.     void SetCameraCulling()
    6.     {
    7.         var distances = new float[32];
    8.         distances[29] = m_CloseObjectCulDistance;
    9.         distances[28] = m_FarObjectCulDistance;
    10.         Camera.main.layerCullDistances = distances;
    11.     }
    I also use Sectr on my scene and i use a different workflow than Shawn. it still very early WIP, but the result are very good on when i deploy on my ipad
    to me splitting the terrain is not simple to work on it with gaia for later. So I make 1024x1024 terrains tiles and connect them using some passages/tunnel/any way to make occluded small corridors. Each terrain become one large streamed sector, without resource overhead when player loader is far.

    Transition to the next zone:

    so i can texture and spawn grass/trees on the whole terrain tile and keep very good performances as unity terrain do a lot of optimisation on this side.
    then for all the rocks bushes house and other props i'm using nested sector of different sizes, when i want to spawn object in one sector:
    • i set the gaia spawner range to be same size as my sector
    • spawn the objects
    • drag the objects from the spawner and reparent them in my sector

    Sectors layout:


    i also created some group of object with a LODgroup on the root, i set them as small cluster, lod 0 display vegetation,lod 1 bigger props. so in general my scene have 10~20 LOD group depending on amount of sectr loaded, this save some performance too.

    LOD setup on a cluster of object:

    then i'm switching terrain shader to legacy diffuse, set pixel error from 1 to 14 after baking textures and spawning grass.
    the game stats are from 10k to 40k poly and around 15 drawcalls
     
    Last edited: May 9, 2016
  50. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,649
    Awesome post!! :)

    I really don't understand your comment. Time compared to what? Doing an 8km x 8km terrain by hand to the level of detail that Gaia does it is weeks or even months of work for an environmental artist / level designer - at a cost of ?$ per hour. Even if you have to wait for an hour - which you don't - that's a drop in the ocean comparatively.
     
unityunity