No announcement yet.

The Eden Project

  • Filter
  • Time
  • Show
Clear All
new posts

    The Eden Project

    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):

    Click image for larger version

Name:	20150920_181013_post.jpg
Views:	1
Size:	583.9 KB
ID:	1161627

    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:

    Click image for larger version

Name:	20150920_183412_post.jpg
Views:	1
Size:	434.0 KB
ID:	1161628

    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, 11:42 PM.

    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.


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


        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, 10:29 AM.


          Keep it up!
          Check my working title: The Locked Room here:


            Finally managed to get the next bit going (took ages):

            Click image for larger version

Name:	20151215_234900_mpdsWorking.jpg
Views:	1
Size:	71.5 KB
ID:	1096990

            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.


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


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

                Click image for larger version

Name:	20160130_211400.jpg
Views:	1
Size:	148.8 KB
ID:	1099600

                Yay computers.

                (All backed up with perforce now).


                  FINALLY got base mesh going... screenshots soon...


                    Sort of a fwiw screenie:

                    Click image for larger version

Name:	20160322_221800.jpg
Views:	1
Size:	101.5 KB
ID:	1102926

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


                      I'd buy it if it was complete and in the marketplace.
                      Github - YouTube - Unreal Slackers - KITATUS


                        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:

                        Click image for larger version

Name:	20160328_212700.JPG
Views:	1
Size:	85.6 KB
ID:	1103388

                        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.


                          This looks really awesome!

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

                          - HeadClot


                            Edging... closer... to... working... lod...

                            Click image for larger version

Name:	20160331_131100.JPG
Views:	1
Size:	658.3 KB
ID:	1103553


                            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.


                              Keep the progress coming! Remember sleep is for wimps
                              What are the BEST Unreal Tutorials / Docs? There are none tbh... Here's why
                              Instead its better to just take projects apart (see the free 'creators' listed here)