User Tag List

Page 1 of 4 123 ... LastLast
Results 1 to 40 of 148

Thread: The Eden Project

  1. #1
    5

    The Eden Project - Procedural planets in UE4

    I've been playing around with some ideas I've had (for a very long time) about generating planet sized terrains for an open universe sci fi game.

    I've managed to get a couple of very basic things going, so I thought I'd start a thread here and show everyone what I've got and see what you think.

    Here's a screenshot of my random planet generation code in action (previewed as simple textures at the moment):

    Name:  20150920_181013_post.jpg
Views: 10023
Size:  583.9 KB

    The first two examples above are the same settings, just with different random seeds. The third example is different settings to show how the random variations don't have to all have the same style.

    I'm using a library called Voro++ to generate a (3D) voronoi sphere as a base, simplex noise in a bunch of combinations to let me generate a nice variety of patterns, and Cairo to rasterize the end result (this let's me zoom in indefinitely on the pattern). I've been taking inspiration from the work of other people online such as [ this person ] and [ this person ]. As you can see from their examples, there are lots of cool ways to add all sorts of interesting details to worlds when you use voronoi spheres, such as mapping out a range of different biomes, river networks and even weather.

    For ground level details, I've been learning how to use the procedural mesh components in UE4, here is a screenshot of a custom terrain mesh using some random noise to set it's elevation:

    Name:  20150920_183412_post.jpg
Views: 9740
Size:  434.0 KB

    At the moment it's just one octave of simplex noise - hence the very basic pattern - but the same techniques that I'm using to make the planet level patterns more interesting are just as effective at this level too.

    At the end of the day I'd like ideally to be able to do something like [ this ] only in realtime inside UE4.

    Obviously though there are an ocean of challenges to swim across when trying to do something like this, so I'm just going to keep poking away and try and add a little bit extra each week and see where it ends up
    Last edited by ioFlow Studios; 03-30-2016 at 11:42 PM.

  2. #2
    0
    Managed (after much blood, sweat and tears) to swap out the Cairo Graphics library for a much faster one called Anti-Grain Geometry.

    Now everything runs fast enough that I can preview the effect of all the different settings in realtime:



    For this test I'm just doing a very basic earth like planet, but of course I'd like to be able to do all sorts of planetary bodies, from ones like this to moons, to gaseous planets to suns etc etc.

    The idea is to use the settings to dial up a bunch of different designs, then to be able to scatter an infinite number of random variations of those designs around a virtual galaxy.

  3. #3
    0
    This looks awesome! Can't wait to see more.
    2B || (!2B)

  4. #4
    0
    Small update - implemented "Lloyds algorithm" to smooth the spacing and size of the voronoi cells:



    The voronoi style is quite cool, but I am going for a more realistic look so the next step is to tessellate all the edges with a mid point displacement algorithm. Once I've got that going I'll migrate my old spherical LOD code into UE4 and start projecting these textures onto that instead of the boring plane above.
    Last edited by ioFlow Studios; 11-09-2015 at 10:29 AM.

  5. #5
    0
    Keep it up!
    Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

  6. #6
    0
    Finally managed to get the next bit going (took ages):

    Name:  20151215_234900_mpdsWorking.jpg
Views: 9326
Size:  71.5 KB

    So I can now subdivide and displace the voronoi cell edges to get that fractal coastline look.

    More importantly, I can specify a focal point and a falloff range and as edges get further away from it they subdivide less.

    That means I can pile on the detail near the player without having to worry about that being replicated across the entire planet surface and basically instantiating a black hole in UE4s memory usage.

  7. #7
    0
    Wow! This is awesome, keep up the work! I would love to see the out come of this.

  8. #8
    0
    So had a hard drive die on my first day back at work at the start of January, lost all of the fractal stuff above :/

    Took me the whole month to redo it...

    Name:  20160130_211400.jpg
Views: 8934
Size:  148.8 KB

    Yay computers.

    (All backed up with perforce now).

  9. #9
    0
    FINALLY got base mesh going... screenshots soon...

  10. #10
    0
    Sort of a fwiw screenie:

    Name:  20160322_221800.jpg
Views: 8543
Size:  101.5 KB

    Obviously will be a bit more interesting when I get the dynamic sub division going...

  11. #11
    0
    I'd buy it if it was complete and in the marketplace.

  12. #12
    0
    What a great long weekend Got heaps of coding done!

    First of all I realised (belatedly) that everytime I used an FVector it was "floatifying" my beautiful doubles, so I spent a whole day fixing that.

    Then I modified the topology of the mesh to reduce the pinching at the quadratic poles in the mesh.

    Then today I got the octaves working:

    Name:  20160328_212700.JPG
Views: 8393
Size:  85.6 KB

    I almost got them repositioning around a designated point but it got all stroppy and my brain doesn't do the clever after 10pm anymore so will have to keep hammering away this week.

  13. #13
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,630
    This looks really awesome!

    Cannot wait to See it finished with full scale procedural planets.

    - HeadClot

  14. #14
    0
    Edging... closer... to... working... lod...

    Name:  20160331_131100.JPG
Views: 8272
Size:  658.3 KB

    Sorry

    It's just so nice to see the base terrain nearly working... another couple of nights and I should be able to move the LOD focal point around at will.

    Once that's going I can start adding in all sorts of different procedural height maps and mix between them with the dynamic texture above.

  15. #15
    0
    Luminary
    Join Date
    Jun 2014
    Posts
    1,853
    Keep the progress coming! Remember sleep is for wimps

  16. #16
    0
    Alrighty then, *finally* get to show a working demo of my spherical terrain code in UE4



    Still need to fix a few glitches that happen if I move the focal point too quickly, and I need to find a way to make the whole thing go faster...

    But still, I'm pretty happy with the progress (even though it's taken AGES to get this far).

  17. #17
    0
    And here it is in game:



    And for the record, I'm working on a five year old laptop so don't be too freaked out by the framerate

  18. #18
    0
    Promoter
    Join Date
    Jun 2015
    Posts
    187
    Is your code working in UE 4.11 as well?

  19. #19
    0
    It certainly is

  20. #20
    0
    Fixed up a glitch that was ripping holes in the mesh if I moved the focal point too quickly (in the editor) which was driving me nuts.

    Thought I'd see what the mesh look like 10,000 times larger with the subdivision levels cranked up from 3 to 8, no discernible impact on the frame rate



    This is just me flying around manually in the editor, in game the lod focal point will follow the camera around and drop detail as your altitude gets higher.

    Also, all the mesh generation settings are adjustable so I'll probably increase the density of all the patches (they're currently only 8 x 8 edges and each lod is made up of 4 x 4 patches).

    The real performance challenge is approaching quickly - dynamic texture generation - each of those levels of detail will be getting their own texture.

  21. #21
    0
    Now that I've got the mesh sort of behaving it's very easy to throw in some basic simplex noise to see what it looks like with some height variation on it:


  22. #22
    0
    Luminary
    Join Date
    Jun 2014
    Posts
    1,853
    Nice...

  23. #23
    0
    Spent most of saturday hunting down an id10t error on the bottom floor of the code that was stopping the terrain from doing more than 13 octaves.

    Now that that's sorted I can crank up the size a bit and see what UE4 can handle.

    So here's one of the content rooms sitting near the surface (manually positioned at the moment) and one of my spaceship models just for a sense of scale:

    Name:  20160410_223300.JPG
Views: 7949
Size:  41.0 KB
    Name:  20160410_223400.JPG
Views: 7923
Size:  199.1 KB

  24. #24
    0
    And here's the same shot from a wee bit further out:

    Name:  20160410_223100.JPG
Views: 7908
Size:  36.3 KB
    Name:  20160410_223200.JPG
Views: 7894
Size:  232.8 KB

  25. #25
    0
    But the really good bit is the lod range of the whole system...

    Here's down on the ground using 14 octaves, terrain quads are 1600 cms across (each extra octaves halves this size again):

    Name:  20160410_222700.JPG
Views: 7886
Size:  99.3 KB

    And here's the whole planet in a side orthographic wireframe view weighing in with a diameter of a little over 400,000,000 cms:

    Name:  20160410_222900.JPG
Views: 7865
Size:  38.3 KB

    So, I *think* that can be wound back like so:

    400,000,000 cms = 4,000,000 meters
    4,000,000 meters = 4,000 kms
    4,000 kms =(ish) 1/3 the diameter of the earth

    So for the first pretty big size test, I'm pretty happy with the results.

    Performance is fine, given I'm doing all this on a four year old laptop. Size wise it can probably go quite a bit bigger, but to be honest it's already doing big enough for my purposes. I'll try cranking the octaves up to 16 though just to give me a bit more detail around the player position.

    Obviously all very rough around the edges, will code out the gaps between the octaves next, then tweak the vertex normals to follow the surface properly (they're all 0,1,0 at the moment).

  26. #26
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,630
    First off this is awesome loving it!

    So got a few questions -

    1. In the bottom picture it says 1e+3km. What does the 1e of the equation mean?
    2. Do you plan on making this available to the public? Yes? No? Maybe?
    3. Will this work with EMOS by @DigitalKarnage?
    4. What did you need to change with the default unreal Coordinate system to get this working?

    Cannot wait to see this planet textured.

    Dev grant BTW Apply for it!

  27. #27
    0
    Hey there HeadClot,

    Ok, lemme see:

    1. 1e+3km : No idea
    2. Making this public : Sure! If I can get it stable enough I'll make it a marketplace product, otherwise I might just open source it.
    3. EMOS : Don't know, haven't used EMOS before, had a quick look, seems like it might be doable
    4. Coordinate system : Nothing! At least at this size which was a (nice) surprise. At some point it will freak out though, and when it does I've got a bag of tricks to reign it back in.

    It'll probably be another month or so before I get some basic texturing going, still have quite a bit of mesh work to do.

    Re Dev grant, well that would certainly be nice

    Could get a proper desktop at home, three monitors...

    Sadly, the queue for dev grants is a million people long and no-one from epic has expressed any interest in eden so... *shrugs* who knows, maybe down the track when I've got more going?

  28. #28
    0
    To answer the question of 1e+3km is the plum scale it's roughly 1000 by 3km similar to the power of 10. 1.7e86 would roughly be 17000 with 85 0's. Found that info out on another forum and a lot of google searching. It's basically 1000 by 3km though if I am correct.
    Demented owner and founder of NeoSpawn Games
    Current Project: Project Yami (place holder title) Next-Gen Fighter using UE4
    FanPage: www.facebook.com/NeoSpawnGames
    Official(under construction): www.neospawngames.net
    Personal FB: http://www.facebook.com/Keiyentai
    LinkedIn Profile: http://www.linkedin.com/in/Keiyentai

  29. #29
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,630
    Quote Originally Posted by ioFlow Studios View Post
    Hey there HeadClot,

    Ok, lemme see:

    1. 1e+3km : No idea
    2. Making this public : Sure! If I can get it stable enough I'll make it a marketplace product, otherwise I might just open source it.
    3. EMOS : Don't know, haven't used EMOS before, had a quick look, seems like it might be doable
    4. Coordinate system : Nothing! At least at this size which was a (nice) surprise. At some point it will freak out though, and when it does I've got a bag of tricks to reign it back in.

    It'll probably be another month or so before I get some basic texturing going, still have quite a bit of mesh work to do.

    Re Dev grant, well that would certainly be nice

    Could get a proper desktop at home, three monitors...

    Sadly, the queue for dev grants is a million people long and no-one from epic has expressed any interest in eden so... *shrugs* who knows, maybe down the track when I've got more going?
    If you make a marketplace product - I would be really happy. This makes one of my larger game ideas a very strong reality.

    Let me know if you need people to bang on your planet system. To Improve user friendliness for the overall workflow.

    Quote Originally Posted by Keiyentai View Post
    To answer the question of 1e+3km is the plum scale it's roughly 1000 by 3km similar to the power of 10. 1.7e86 would roughly be 17000 with 85 0's. Found that info out on another forum and a lot of google searching. It's basically 1000 by 3km though if I am correct.
    Hey @Keiyentai - Thanks for the reply. The more you know

    Name:  giphy.gif
Views: 8565
Size:  535.0 KB
    Last edited by HeadClot; 04-11-2016 at 01:04 AM.

  30. #30
    0
    Yay, coded out the gaps between the octaves... now it's nice and smooth to the horizon

    Name:  20160412_000300.JPG
Views: 7707
Size:  29.3 KB

  31. #31
    0
    Working on vertex normals now... switched out the ugly pic with bad normals for this youtube with the normals mostly fixed:

    Last edited by ioFlow Studios; 04-12-2016 at 10:27 AM.

  32. #32
    0
    Also, if anyone could make any suggestions about how to smooth out these faceted shadows that would be awesome:

    Name:  20160413_095000.jpg
Views: 7582
Size:  120.8 KB

    Seems to be more to do with the shadows from the movable directional light than the mesh normals generally.

  33. #33
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,630
    You were featured on the Unreal 4 Livestream today @ioFlow Studios

  34. #34
    0
    Infiltrator
    Join Date
    Jun 2015
    Posts
    21
    You will finish this.

    'Seems to be more to do with the shadows from the movable directional light than the mesh normals generally.'

    Try editing the cascade and pull in draw distance of the shadow.
    Last edited by JRV1; 04-14-2016 at 02:24 PM.

  35. #35
    0
    Quote Originally Posted by HeadClot View Post
    You were featured on the Unreal 4 Livestream today @ioFlow Studios
    Woohoo!

    Lol, saw you in the comments telling alex to scroll down =P

  36. #36
    0
    Luminary
    Join Date
    Mar 2014
    Posts
    1,630
    Quote Originally Posted by ioFlow Studios View Post
    Woohoo!

    Lol, saw you in the comments telling alex to scroll down =P
    Yeah - I wanted him to see the procedural planets in all their glory.

  37. #37
    0
    Luminary
    Join Date
    Jun 2014
    Posts
    1,853
    Glad your hard work is getting attention from Epic.
    Hope you submit and get the dev grant sometime too...
    Then maybe one day your hard work will merge with this....

  38. #38
    0
    Oh, and thanks to Alexander and epic for the mention and the cool badge!

  39. #39
    0
    The Rainbow Warrior



    Join Date
    Mar 2014
    Posts
    2,591
    Quote Originally Posted by ioFlow Studios View Post
    Oh, and thanks to Alexander and epic for the mention and the cool badge!
    Congratulations ioFlow Studios!

    And what you are working on looks really, really neat!

    I can't wait to see where you go with it next!



    Rama
    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

  40. #40
    0
    Wow, looks great! Keep it up!

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •