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. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    I checked this on the way in this morning - the trees were growing up as they do in Unity. I suspect where you will get more unusual formations is where you have steep slopes and shallow soil...

    Have lots on over next few days, but I want to set up an environment contains multiple biomes and somehow show it off in a screenshot. The system is now more than capable of doing it :)
     
    S4G4N and BackwoodsGaming like this.
  2. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Yup.. But also depends on what else is around in the terrain and where it would get the most light most of the time.. But most of the time they still eventually end up going mostly straight up even if the stump area is pointed in a different direction. Some of the ones in the ravine out in back of the house here almost go out straight sideways but then the trunk curves and go straight up at a slight angle.. I don't think even speedtree is advanced enough to let us curve the trunks like that.. lol Might be able to create special ones with the old unity tree making system of if you own the speedtree subscription where you can create your own maybe?
     
    S4G4N likes this.
  3. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    ROFL !!! gave a big chuckle :):):)
     
    AdamGoodrich likes this.
  4. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Because you know it is true... lol
     
    S4G4N likes this.
  5. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    NO no, I can just see, from a dev point of view, as you work on things and tie things up and get closer to release,
    you yourself gets so excited, there might be more cool stuff that you have not shown that you know users will like,
    or you excited to see the reaction on the "new" way off doing things that you introducing to the marketplace and all that..

    I know exactly how @AdamGoodrich is feeling now.
    I am excited for him :)

    I have seen "the Method" , and man, I am damn excited, it is not like you going to see it and the effect wear off.
    You going to love working with it because of the way that you do it.
    Where creating it in other ways might have been a pain, this is going to drag a truckload of fun with.
    I know for me at least :):):)

    Damn, there I have gone and done it again :D:D:D
     
  6. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Thanks Cobus. I have an important demo tomoz and while my desktop is windows based, my laptop is a Mac. So it was pleasing to see it all work on Osx...

    And it was even more pleasing to be able to generate a pretty environment, the equal of anything shown here, and all while travelling on a train into the city.

    I am hoping that this will allow people to spend less time wrestling and more time creating and tweaking.
     
    BackwoodsGaming and S4G4N like this.
  7. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I've lost bloody days of dev time focusing in and in on a terrain, only to step back and see a pile o' crap, and throw the whole lot away.

    I'm a coder, damnit, not a designer. I want to spend a couple of hours and end up with a zone I'm proud of.
     
  8. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    @Whippets I trust that your sentiment are that of 99% of devs that constantly are looking for a solution AS, not a fix.
    There is a difference between the two, and I think that Adam's method and obvious excellent results is just that, a solution, not just a quick fix, even though the results can be obtained damn fast :):):) compared to everything else.
     
    Last edited: Jun 11, 2015
    John-G and BackwoodsGaming like this.
  9. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    :) No such thing as a quick fix (unless you'd like to write this assetbundle creator for me lol).
     
    AdamGoodrich and S4G4N like this.
  10. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    If it's something that gives acceptable results without too much tweaking (not counting my adding on my game-specific elements) then I'll be happy :) Unity terrain (even using the Terrain Toolkit code) is still a little cumbersome...
     
    AdamGoodrich likes this.
  11. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    That sounds like a useful bit of code :)
     
    BackwoodsGaming and Whippets like this.
  12. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Lol - these new assetbundles, supposed to make life easier, they're a nightmare of overcomplexity. I just want to put stuff in, and get stuff out
     
    AdamGoodrich likes this.
  13. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Anything new to make us all drool over?
     
  14. Teo

    Teo

    Joined:
    Oct 31, 2009
    Posts:
    564
    I will probable buy this (let's hope is a indie price), subscribing to this thread to get the news about it.
     
    AdamGoodrich likes this.
  15. rebit

    rebit

    Joined:
    Nov 13, 2014
    Posts:
    133
    TheSniperFan and AdamGoodrich like this.
  16. rebit

    rebit

    Joined:
    Nov 13, 2014
    Posts:
    133
  17. rebit

    rebit

    Joined:
    Nov 13, 2014
    Posts:
    133
  18. rebit

    rebit

    Joined:
    Nov 13, 2014
    Posts:
    133
  19. ThatGuyFromTheWeb

    ThatGuyFromTheWeb

    Joined:
    Jan 23, 2014
    Posts:
    29
    I don't think this will help Adam much. To find a water shader for rivers is a much smaller problem, than the creation of the rivers. It's pretty difficult to procedurally generate river beds or to detect potential riverbeds in a random terrain - as scrawk already pointed out in his blog.

    So ... welcome to the abyss of fluid simulations. Should Adam manage to pull this of anytime soon, i'll probably be jealous enough to throw my computer out of the window and search a new job as forest warden or something. :D
     
    rebit likes this.
  20. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Hehe - sorry for the quiet - had a big weekend of development, and am currently away travelling for business for a few days.

    With respect to rivers, I do have something in the works, but I won't delay the first release for this, so it will be a roadmap thing.

    I also won't be trying to do water shader's as I am not a shader guru - i will however do the terraforming to support this.
     
    S4G4N likes this.
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Maybe there's more to it, but I can think of 3 key things that differentiate river water from other waters, and I hope there will be a way to address them ... someday, from someone.

    1) Rivers run downhill, make waterfalls, rapids, and stuff like that. They aren't completely level bodies of water. Probably a raycasting strategy set by hand at a source could find riverbeds and travel along them, leaving behind something like a smart waypoint trail for a water drawing tool to follow.

    2) Rivers have a current that runs faster in the middle and slower toward the sides. The main current varies according to the drop in elevation.

    3) Rivers can join and divide.

    River or no river, I'm watching this thread with interest. :)
     
    AdamGoodrich and S4G4N like this.
  22. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Cool - I have already modelled water flow, so its a matter of putting the pieces together to make this work.

    I will provide terraforming support, but not the meshes and shaders (or at least not initially).

    Will be fun to play with this :)
     
    Whippets, S4G4N and BackwoodsGaming like this.
  23. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    So... Is it done yet? :p
     
    S4G4N likes this.
  24. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    3,215
    WHAHAHAHA ROFL !!!!!!!!!!!!!!!!!!!!!
     
  25. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Seriously though.. The water stuff you are talking about sounds great Adam. That is another area that I struggle with some of the other terrain tools on. I can use the terrain lowering on the terrain game object, but I either end up with a flat bottomed lake or river and the shape is usually nothing that I'd be proud to release in a game. I know you guys were talking about rivers, but I'm hoping to see what you come up with for lakes as well.

    And I know we talked about EasyRoads for rivers before, but it almost sounds like you may have discovered a better way to do it than have us manually placing points. When you say you have already modeled the water flow, does that mean you have come up with a script that will determine the path of least resistance a river would naturally take? Or is my excitement and anticipation reading more into that than what you actually meant? lol
     
  26. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Hmm a nice waterfall from a mountain river going down to the plains that dumps into a lake with another river and having that waterfall be the entrance to a cave system.
    ya that would be so cool.
     
  27. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Get out of my head! lol I'm picturing part of a crater of an inactive volcano that has turned into a lake.. Erosion has allowed a stream to work its way to the edge where it cascades over the side and down into the valley below and then works its way to the coast..

    Of course I guess it would have to be a rain forest in order for the lake to keep feeding the falls and river since it couldn't be spring fed if it is at the top of a volcano... Maybe I need to go back to the drawing board with that though.. Of course it is a fantasy world... lol
     
    John-G likes this.
  28. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Yep :)

    And with the ability to easily create the structure of a waterfall, then you could encourage your river to hit the waterfall you created, and these things become all become possible :)
     
    Teila and SIV like this.
  29. Teo

    Teo

    Joined:
    Oct 31, 2009
    Posts:
    564
    Adam, so when you plan to release this?
     
  30. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    All going well I will release at the end of the month.
     
    BackwoodsGaming and John-G like this.
  31. Teo

    Teo

    Joined:
    Oct 31, 2009
    Posts:
    564
    Excellent news! Thanks!:)
     
  32. ostrich160

    ostrich160

    Joined:
    Feb 28, 2012
    Posts:
    679
    Really looking forward to this!
     
  33. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    That's already a pretty good start. As for the basic outlines of a river placing algorithm, I guess the following would probably make sense (for the sake of simplicity let's look at how it'd work for a single river):

    a) Find a source

    b) Find an end point

    c) Find a path (if not, choose a different end point and/or source)

    d) Find the flow velocity



    For a): Great candidates here would be saddle points (mathematically speaking) or points with a negative gradient in only one direction.
    For b): For a start this should be a point that is a little bit below sea level. Eventually, lakes would work as end points too, those could be generated by finding local minima, then trying to "fill them up" to a certain level (with a minimum height, if it isn't reached the potential lake position will be discarded).
    For c): Well, I don't really know that much about pathfinding algorithms, but I guess a way to go about it would be making it node based: Find the midpoint between the source and the end point, check the terrain height then check if it makes sense physically, i.e. if it is steep enough. The required height difference per distance/steepness should probably also decrease with the distance to the source (unless the source is from a terrain border). This means that close to the source, which is probably in mountaineous parts of the terrain, the height difference needs to be big, whereas close to the sea/in the later stages of the river it can be almost zero.
    Anyway, if it is physically plausible, we accept the midpoint as a node. If not, we move orthogonally to the line connecting the source and end point and check again. We repeat this subdivision and check algorithm until we have reached the desired/specified density of nodes.
    For d): For a start we need to calculate the main velocity. This can be done either per part or analytically when using nodes. The basic idea however is the same: We assume the main velocity depends only on the steepness. If we know the steepness, we will only need a (probably empirical) value to multiply it by to get the velocity.
    The next parts are based on another relatively simple assumption: The flux of water has to be constant in the entire river. The reason for that is that whatever amount of water is coming out of the source has to arrive at the bottom. So, if our river is getting slower, i.e. it's not as steep anymore, the cross section area has to increase. You can see this in real rivers: In their early stages in the mountains where their flow is relatively quick they're not very big, but close to the sea(in flat areas) they are pretty wide.
    To get the area of the cross section of the river, we need its depth and its width. For a start we can assume a constant depth, but eventually it could be based on the materials of the terrain. I don't know enough about rivers to make any educated guesses about how different materials change the depth of a river. Anyway, for the area we can either assume it to be rectangular as a relatively accurate approach, or we could assume the shape of the river bed to be quadratic and caculate the area based on that. Both would be relatively trivial compared to the topographic algorithms needed in steps a and b.
    We can then calculate the velocity along the width of the river based on the depth of the point. As an alternative to that, we can assume a simple linear gradient.

    So, after those steps, we have a source, we have an end point, have a path for the river to flow along and we know its velocity and width. The next steps would be visualisation and when that's done, adding in cool features such as rivers joining and dividing, waterfalls, lakes etc. But, you know, don't go chasing waterfalls.

    So, yeah, I left all the difficult parts (like the topological algorithms) out and it's probably not really understandable. But that's how I'd go about it.

    The other thing with rivers is that the older they are, the bigger their effect on the terrain. Rivers that are millions of years old (and are surrounded by relatively loose soil) can create valleys that are dozens of kilometers wide. But that's pretty difficult to simulate anyway.

    By the way, do you already have "humidity maps"? Especially for arid terrains it'd be cool to have clusters of vegetation along rivers (potentially even along seasonal rivers).
     
    Last edited: Jun 17, 2015
  34. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Heh, I'd be happy just to have water that flows downhill and around curves. :)

    (Hmm. I guess that's a fourth thing: the water has to be able to flow around curves.)
     
  35. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    While the actual flow would be nice, I think that may be beyond the scope of what Adam is doing here.. (Correct me if I'm wrong Adam) From my understanding of what he is looking at doing with the rivers and lakes is the terrain shaping and determining how the water would flow in order to shape the beds into the terrain. I think we will still be going to Suimono or one of the other water systems to actually get the water flow. I haven't played around with Suimono for rivers yet. Maybe @chingwa can pipe in on that. I have also looked at the information on Fluvio as another possible tool there but have yet to talk to anyone that has used it. They have a pretty impressive looking waterfall demo.
     
  36. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    For the actual visual flow, I guess some stretched and animated perlin noise that is being "bent" around the path of the river could work. Of course this doesn't include rocks.

    That's pretty much what that post was about ;)

    Yeah, as for the visualisation, that's true. But in order to figure out where rivers would be, you'll need a river pathfinding algorithm, too. A very simplified version of what I wrote above would work for that too, if it's more about the idea of river erosion, as in you pick a source and an end point, find a few suitable midpoints to have a very rough path and erode it along that path (I'm assuming Adam already has an erosion algorithm?).
     
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I don't think a flowing river shader/animation is going to result from terraforming. Those need to be attached the river mesh. I have yet to find one that works for what I want, maybe Fluvio but I need much more info first.
     
  38. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Yeah, this would be cool and would love to see this part.. Would be great then to hear what tools people are using to actually get the water resource working in the paths.
     
  39. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Shawn, I think a lot of people use flow maps but I have yet to grasp how they are made. I am sure it is simple but one of those things that just make my head hurt. lol
     
  40. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Yeah, my expectation on rivers is low. As far as this plugin goes, it will be nice enough to have terrains that can be generated quickly and with a simplified interface. :)
     
  41. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Oh yeah... I've heard of those... lol I'm so far away from that point in my project's development that I really haven't put any serious time into looking into them. Making a note for future reference... heheh

    Yup.. I think Adam might be able to do some cool stuff with the erosion factor to do some super cool stuff for the river placement since he put them on the road map. So my expectations for the beds at least is high.. (Pressure is on, Adam! lol) It just seemed that you guys were starting to talk about the water itself, which is something I don't think Adam is planning.. (Again Adam, correct me if I'm wrong! lol)
     
    AdamGoodrich likes this.
  42. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Well as far as actual river meshes are concerned (assuming if Adam intends to implement this, and not just river beds?) as long as the river mesh UVs are constructed in a linear fashion there shouldn't be much issue with them flowing around corners. This is how Suimono does it, at least in the basic river example in it's demo scene... the water animation is then done simply by scrolling the water flow in a 90 degree angle, directly in line with the UV setup.

    This gives very easy river flow... around angles and curves with no extra setup required. You can even edit the vertices to fit your scene after-the fact and the water flow should adapt. For me personally I find ProBuilder to be a perfect tool to construct this type of mesh directly in your scene where you need it. Suimono makes this relatively easy, but it can be done just as well with any water shader where you can control the direction of the water flow.

    flowmaps are another issue entirely though, and are best done with an integrated (usually custom-made) tool. For simple streams you probably wouldn't need them but for rivers and larger bodies of water I could see them being very handy. You would need a wate shader which can utilize them though (Suimono doesn't utilize flowmaps currently, but perhaps in the future).
     
    AdamGoodrich and BackwoodsGaming like this.
  43. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    As someone dropped TC recently (not because its not a good tool - it only seems it is not a tool for me) I hope it is released soon in an asset store nearby. Even if there is only terrain, texturing, objectplacement and trees/grass in it - as long as I have control, I'm happy :)
     
    BackwoodsGaming likes this.
  44. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    There is a tool called Flow that looks like it could make flow maps, but its not ready for Unity 5 and the author doesn't seem to be in any hurry to get it there.

    I am not a mesh construction expert, but might look into it as it would be super cool to place the meshes in there along the path of the river.
     
  45. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    We tried that and it sort of worked but as well as expected. :)
     
  46. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Been awhile since a screen shot :)

     
  47. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Looking forward to this asset, nice work
     
    S4G4N and AdamGoodrich like this.
  48. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Thanks. Its making good progress :)
     
    S4G4N likes this.
  49. Iguanapl

    Iguanapl

    Joined:
    Mar 11, 2014
    Posts:
    23
    Looking forward to this asset as well.
    While we are talking water related stuff (rivers etc) right now - it is worth mentioning that some underwater terrain generation tools would be very handy too. Like near-shore underwater terrain, laggon etc :)
     
    AdamGoodrich, S4G4N and hopeful like this.
  50. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    End of which month? ;)

    Been mainly talk about spawning stuff recently ... so if I understood the terrain tools correctly .... one could import a height-map as a starting point, then carve it up like a turkey dinner?

    (And I assume will support decent map resolutions - like 4096/7 etc ? ... not just tiny's)
     
    Last edited: Jun 20, 2015