Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

World Generator - Small Update

Discussion in 'Made With Unity' started by Daxiongmao87, Oct 9, 2011.

  1. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Hey all I've posted some screenies before about this project, but here's a small updated video of it. Tell me what you think! Right now I have no purpose for it other than experimenting with procedural generation. I'd like to incorporate this into an innovative game idea I've had for a long time now, though.





    UPDATE:



    A few web demos:

    Demo 1 Webplayer (Fly over mars)
    CONTROLS
    W - Move Forward
    S - Move Backward
    A - Turn Left
    D - Turn Right

    Q - Strafe Left
    E - Strafe Right
    SPACE - Lift Up
    L CONTROL - Drop Down

    Demo 2 Webplayer (Walk around a sunny valley)

    Demo 3 Webplayer (Walk around islands with beaches and cliffs)
     
    Last edited: Nov 7, 2011
  2. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    kool consider placement of prefabs such as tree's, rocks, orcs what have you.

    place it on the asset store and i just might make a purchase

    That's my endorsement.
     
  3. Duskling

    Duskling

    Joined:
    Mar 15, 2011
    Posts:
    1,196
    Very nice.
     
  4. enragedmrt

    enragedmrt

    Joined:
    Oct 5, 2009
    Posts:
    95
    I've actually done the exact same thing in a recent experiment. It's quite fun and interesting, good work!
     
  5. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    265
    That's pretty awesome. It's something I'd love to get into but it's difficult to wrap your head around.
     
  6. Knight12ify

    Knight12ify

    Joined:
    May 21, 2010
    Posts:
    520
    Man I'd love to use this in a game? Need help on yours?
     
  7. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    It makes me happy to hear that you guys like it. If I were to make this marketable at all on the Asset Store, what would your suggestions be? Are you looking for a simple world mesh generator? Would you like the inclusion of custom biome creation? I'd love to hear suggestions as this may be something I actually pursue!
     
  8. g00niebird

    g00niebird

    Joined:
    Jul 24, 2010
    Posts:
    281
    I you could turn this into a parameterized repeatable world-generating algorithm I'd be very interested. How high of a resolution does it have?
     
  9. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    The resolution for the "large worlds" are 1024x1024. By repeatable are you referring to a wrappable map, or a seamlessly generated map much like minecraft?
     
  10. g00niebird

    g00niebird

    Joined:
    Jul 24, 2010
    Posts:
    281
    I'm referring to a repeatable map more like Starflight than Minecraft.
     
  11. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    forgive me if this sounds daft are the terrains mesh's with height maps and as for world wrapping as long as you can generate more or less lands

    would love to have that custom biome creation included

    things like town placements should be accessible transforms i might guess use are using arrays or lists presently

    kind of Edge detection to detect water environment

    Guess the question still comes back to this are these 2D or 3D land mass's

    :confused:
     
  12. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    No worries, I've been asked that before. They are actual 3d meshes, not 2d. Though a 2d map can be easily created with the same technique. I don't think adding a function that will allow world-wrapping to be too hard of a task. I currently use arrays.

    Care to elaborate on accessible transforms for town placements? Are you referring to automatically flattening a certain area randomly designated for town generation?

    Also could you elaborate more on water environment? :) Thanks.
     
  13. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    Simply put was thinking that if the transforms where accessible then the A.I. could use them as waypoints or what have you. Floating 3d tags, star pattern gun placements. flattening an area is certainly a great idea around these locations.

    (edge detection) Shooting a ray down to detect the texture water so that AI can either avoid water or remain in water, I would be using the Water4 standard assets or some 3rd party solution. Giving it a moments thought would prefer an textured seabed versus a blue color. But other gamedevs would want the blue.
     
  14. Knight12ify

    Knight12ify

    Joined:
    May 21, 2010
    Posts:
    520
    Biomes are a must dude. Lakes and stuff like that. Explosions would be nice too.

    Price 20 $ - 30 $. Why? When cheaper, you get more money, more motivation and you add updates. Free updates would compel even more people to buy it. Just look at Sleglik, 65 $ free updates and in a week he became a high seller.
     
  15. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Same with this. So far all the program is, is a terrain generator. Adding things like edge detection is something dependent on the type of game you'd like to create.

    If others disagree and would find these as needed core features, please let me know :)



    I'm thinking custom biomes will have to be added. Lakes I will have to come up with an algorithm for, along with rivers too. I know it's been done before so it shouldn't be something out of my reach. I'm still unsure about the prices, I don't see this being an expensive tool. :) Thanks for the feedback guys, the more the merrier. I'll be posting more updates as they come.
     
  16. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    UPDATE:

    I'm working this system into a useable asset for other people to use. Price hasn't been determined yet, but here is an updated screenshot:



    In here you can see that I've incorporated two things: A custom editor to make it as customizable as possible for the user, and a system to generate continental shelves for nice beaches and smooth terrain at lower altitudes, accenting mountains. Tell me what you think!

    Also I would appreciate it if you'd let me know what factor would decide whether or not you would make this purchase. Thanks!
     
  17. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    This is cool. These are the things that would make me interested in buying it:

    1. Price. $50 or less, and I will just buy it without needing it. More than $100 - I won't buy it unless I'm desperate for it.
    2. Fluid erosion, with a flow map. I would like to have a different texture where the water flows down the mountains.
    3. Scaled for first or third person.
    4. All the cool stuff you already have.
    5. Samples.
     
  18. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Update:

    Screenshot of early texture coding, very rough atm. I expect to put quite a few features in this.

     
  19. houndie

    houndie

    Joined:
    Nov 25, 2010
    Posts:
    146
    for $50 I would buy it without thinking either. Above that and I would have to consider it but may still get it, over $100 right now and it would have to be a no.

    But love where you are going with this so far!!!
     
  20. Shardz

    Shardz

    Joined:
    Dec 30, 2010
    Posts:
    42
    This appears to be stacking some interest from the procedural crowd and I guess you can count me in, as well. Does (or will) your generation project be feasible on non-planar surfaces such as spheres? Preferably, really large spheres drifting in space doing planet stuff all day and night long. :D

    What you have shown thus far is really interesting and would serve quite a few well with the right nuances. You did hit on an interesting point when you mentioned that specific games require specific solutions, and not any one game system can cover it all. I'm personally looking for scaling, flexibility (able to generate on spheres, other geometry), quirky/fun/interesting texture options and/or tricks. The ability to also generate a subterranean level below the topographical surface would also be a huge plus, but probably starting to get into big $$ territory (perhaps make an expansion for it later! :).

    But paramount to any of that is just plain stability and efficiency; that rules all. I didn't see any mention of this, but I'm assuming this project is entirely in C#, as well. Like many others here, I'm also strapped and end up coding mostly everything myself in the end anyway, but I could use some help with this sort of thing.
     
    Last edited: Oct 14, 2011
  21. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Thanks for all the feedback and suggestions. I love pretty much all of them. I'm not going to lie, I would have to do some mad research on some of the suggestions (such as fluid dynamics for erosion), but I feel confident that over time I will be able to accomplish most of them. I have some ideas in my head involving forest generation and river generation as well. Nothing is final and a lot of it is still being tossed around in my head.

    Anyway stay tuned, and more feedback is always welcome.
     
  22. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148

    No textures yet, and the system has been tweaked a little since this video, but here's a fly-through of a randomly generated landscape.
     
  23. Alvarus

    Alvarus

    Joined:
    Apr 10, 2009
    Posts:
    203
    Looking good!
     
  24. NinjaSquirrel117

    NinjaSquirrel117

    Joined:
    Dec 28, 2010
    Posts:
    27
    This is very cool, nice work! Definitely asset store worthy IMO.
     
  25. g00niebird

    g00niebird

    Joined:
    Jul 24, 2010
    Posts:
    281
    How are you producing these heightmaps? Most of your examples resemble volcanic islands. Which is ok, but what is I want tectonic-colliding continents? What if I want glacier-carved lakes and fiords?

    Or are these just Perlin noise generated?
     
  26. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Modified diamond square algorithm, as mentioned in the post the system has been a little tweaked since I wasn't totally satisfied with the results. Also the results were influenced by a high roughness parameter. Lowering this would give you smoother terrain. By tectonic-colliding continents I assume you don't actually mean a fully functional tectonic plate system do you? Or more or less just continental land with oceans separating them? This is planned, fjords and glacier-carved lakes are definitely being considered.
     
  27. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    Looks pretty darn good so far. how are you planning on doing the textures? Just wondering. :p Is it just going to be altitude based, or altitude and angle (probably the best one), or what?

    Are you planning on a vegetation system with trees and rocks or not... or is this actually on a terrain object where that can be done using the default system? XD Way to many questions in my head.

    Either way, this looks very promising as opposed to the default terrain system (which has no generation what so ever).
     
  28. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Don't worry I love to answer questions :). Textures will have smooth transitions from one medium to the other. You will be given parameters based on altitude, temperature, humidity, and angle for the system to determine what texture goes where at what ratio.

    I do plan on incorporating a forest generation system, as well as other prefabs! I will be posting another video soon to display some more possibilities. Textures still not done yet!
     
  29. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Here's a playable demo of one of the generated landscapes. Granted there's no texturing in yet, I figured I'd show what you can get out of the generator this far, and much more further down in development.

    Click Me!
    I highly suggest you right click and turn it to fullscreen mode!

    NOTE:
    CONTROLS
    W - Move Forward
    S - Move Backward
    A - Turn Left
    D - Turn Right

    Q - Strafe Left
    E - Strafe Right
    SPACE - Lift Up
    L CONTROL - Drop Down
     
    Last edited: Oct 18, 2011
  30. Shardz

    Shardz

    Joined:
    Dec 30, 2010
    Posts:
    42
    That demo reminds me a bit of a peach flavor of Red Planet...without the irritated little thrashbot, that is. :) I like the overall atmosphere, but it's difficult to see your handiwork amidst all those fog layers. The controller is really quite cool and floaty...is that a custom job or something that is readily available elsewhere? Overall, I'll be keeping an eye out on this project for sure.

    P.S. What is the scalability of your project? Can you create a mild -20 x -20 grid sized layout on top of massive world sizes? I'm just curious cause I'm looking for a procedural solution for a tactical portion of my project and it would be nice to know where resources sit with this badboy running. Great work thus far!
     
  31. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    The fog is a bit high isn't it? :) As for your question, could you elaborate on your 20x20 grid?

    P.S. I whipped up the control scheme myself for the demo
     
    Last edited: Oct 18, 2011
  32. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Demo link not working for me.
     
  33. dilly123

    dilly123

    Joined:
    Nov 1, 2009
    Posts:
    23
    Very nice.
    UP~
     
  34. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Odd, it works for me! hmm, anyone else have issues?
     
  35. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    The link at the beginning of the thread works..
    I like it. The fog's great too, creates an almighty atmosphere. Plenty of plateaus and your algorithm must be something, I cant see any transitions. One thing I notice is the proliferation of pointy peaks, not sure if that is intentional, perhaps looks a little unnatural although also Other Worldly. Yep, this looks great but I would like to wander around on the surface and have a Frame Rate displayed before getting too excited. Nice work.
     
  36. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    It is not, in fact, seamless as you think. The generated terrain is pretty huge, it takes a few good few minutes to get across. This system isn't designed to generate maps as you play, but it is more for those who want a system that will make realistic looking terrain for them to implement into their game, which in cuts time to develop other things.
     
  37. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    I see. Does it utilise Unity's Terrain feature or does it generate a separate mesh? Can Paths be created?
     
  38. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    It utilizes unity's terrain mesh, and I'm certain that the path systems on the asset store will work with it.
     
  39. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Great, that means the Weather systems will probably work too. Will the Terrains have have Normal Maps?
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    the link actually goes to "http://click me" if you click on it. I think you have link markup ordered wrong.
     
  41. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Thanks Jaimi, I didn't realize I did that :p
     
  42. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    XD Link works for me.... just this work pc is crap and it keeps crashing. XD

    I'll check out the demo at home some time. Does look promising so far though.


    If you are procedurally generating the terrain, is it possible to procedurally mix the texture layers? For instance, snow on top of rock. It'd be kind of nice to have it have spots of snow as you go from complete snow to rock, rather then smooth transition and fading.

    Just a suggestion/question.
     
  43. Mark-Davis

    Mark-Davis

    Joined:
    Jun 21, 2011
    Posts:
    156
    Looks nice! :)
     
  44. The Executor

    The Executor

    Joined:
    Oct 29, 2011
    Posts:
    65
    Sadly, I don't have that kind of money to spend. Atleast I can make half decent environments, using the unity editor. Anyway this asset looks COOL!!!!!!!
     
  45. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    Another update from a two week break. I've been refining the texture system and I'm about half way done with it. Upon completion all I will have left is an erosion system, then we shall see about the first release for the asset store. :) Here's a screenshot:

     
  46. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    I've been working on a biome system that will transition nicely from one texture to another. It will look natural.
     
  47. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    I'm ashamed I didn't post a better update, here's a video of the texture system thus far:
     
  48. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Still hard to tell without being on the ground but looks Ok with the fly through.
     
  49. Daxiongmao87

    Daxiongmao87

    Joined:
    Jan 7, 2010
    Posts:
    148
    The terrain texture quality will be up to the user, but here is a quick walking demo you can try. Note: there are plans for a splat generator for trees, prefabs, etc. also what's planned in the near future is erosion.

    http://dl.dropbox.com/u/35397320/WorldGen/WebPlayer/WebPlayer.html
     
    Last edited: Nov 6, 2011
  50. gordonramp

    gordonramp

    Joined:
    Sep 28, 2010
    Posts:
    53
    Well I'm impressed. :-|