Procedural Planets!

So, 2 days ago I started my project of Procedural Planets on Roblox. The first result was a very blocky planet - voxel styled. (Which don’t looked very cool.)

image

Then… @XBLAX Came and helped me porting it to use Triangles! (WedgeParts).
Which resulted on this:

image

A lot better right?! After applying a subdivision algorithm (Which XBLAX also helped me with.) I ended up with this:

Amazing. But not as amazing as my final result. After a long time trying to get Noise work I ended up with this:

Eh… Not very cool. Then I came with a big brain idea. Use @Diegnified’s PerlinNoise module. Which resulted on this:

A lot better. After a lot of time polishing it up I ended up with this.

Day 4 Final Result:

Amazing! I have a lot more images but, I don’t wan’t spam this with tons of images lol. The final result has: Atmosphere, Better noise implementation, Size of 1000 Studs. The fun part here is that the Size is not that expensive, but the Resolution of the sphere is. (Using 4 at moment).

Special thanks to: @XBLAX For helping me with this, without him it woulden’t be possible, @Diegnified Awesome perlin noise module, Hidden Developers community for helping me out and to all my friends that helped me! Without them this woulden’t be possible.

File: Universe.rbxl (34,0,KB)

39 Likes

This is pretty hot ngl. I hope someone makes a low poly space game with this! :stuck_out_tongue:

6 Likes

Thanks! It means a lot for me.

3 Likes

Wow :star_struck:
I really like the earth

2 Likes

This would be an amazing plugin that I’m sure many people would get if you turned it into that. One thing I thought lowered the quality of this planet is the fact that you can see the different triangles overlaying each other, which kind of messes with the shadows a little. Otherwise, this is amazing.

2 Likes

I am amazed. And I have a lot to ask you.

How long did this take?

Isn’t there a point on the globe where the two sides of the noise meet (and make an obvious line)?

Do I see water coloured depending on height?!

  1. You should consider raising the level for land to be formed. Using this module’s octaves should make for more realism (but it looks like you’ve used that already?).

  2. Okay…

1 Like

It took me 3 days. (Counting today.) The hardest part probally was getting the noise and the sphere generation working.

The way I implemented noise here don’t let that happen.

YES! This makes it look so much better. It’s very easy to do though.

--| Height is already multiplied by * 20.
Color = Color3.fromRGB(0, 166, 255):Lerp(Color3.fromRGB(0, 146, 214), Height / 10);

I took this method from @boatbomber’s grid module example though. :sweat_smile:

I want do a better implementation of Noise on the sphere, since right now I’m not using Noise at it’s full potential. This is how I’m doing right now. (Any tips are welcome btw!)

for Index, Triangle in pairs(Planet:GetChildren()) do
    local Height = (ThreeDNoise.new({Index / 9}, math.random(1, 3), math.random(1, 8), Random.new():NextNumber(0.3, 0.5)) +1) * 20;

                                 --| 27
    if (math.floor(Height) >= MinimumHeight) then
        SetProperties(Triangle, {
            Color = Color3.fromRGB(0, 255, 0):Lerp(Color3.fromRGB(0, 207, 0), Height / 10);
            Size = Triangle.Size * math.floor(Height / 10);
        });
    else
        SetProperties(Triangle, {
            Color = Color3.fromRGB(0, 166, 255):Lerp(Color3.fromRGB(0, 146, 214), Height / 10);
        });
    end;

    SetProperties(Triangle, {
        Material = Enum.Material.SmoothPlastic;
        CastShadow = false;
        Name = Height;
    })
end;

It means a lot for me that people like my work! And I’d probally open source this when I get it finished.

3 Likes

Hmm, the game looks great hope you can make a full space game with it!

1 Like

Thanks! Right now I don’t have any plans to make a full space game, since this operation is very expensive and laggy. I could probally optimize it though but I don’t expect it to be fully playable. (Each planet with 4 of resolution has about 16k Wedge parts!) Which really annoys me though is that rotating the Planet makes my framerate drop to 10. :pensive:

1 Like

Oh, yeah sounds really annoying to turn 16k Wedge Parts Imao. Well, good luck with your game! I do understand that it may not be fully playable.

1 Like

Looks really cool. Amazing job! :slight_smile:

1 Like

Day four of Procedural Planets on Roblox! I implemented: Better Noise Implementation, Very Basic Orbital Force (Meaning I can now play on my Planet!), Beaches, Mountains.

Before:

Now:

RobloxStudioBeta_G2U0CUJXUv

Really hope you guys like it. Heres a video of my walking around it:

(I still have to make the Orbital Gravity better lol.)

6 Likes

Interesting. Can you give anymore detail?

1 Like

I will tell you the new implementation, since it’s better. :sweat_smile:

it’s a mix of Noise with Icospheres, I use noise to change the vertices of the icosphere deforming it (After the subdivision). After the icosphere generation happens I loop on all wedge parts (triangles) and change their color based on their (position - centre).Magnitude.

1 Like

You should make a showcase instead!

2 Likes

Damn, that’s amazing! Very happy you used my module for your project :smiley:

2 Likes

this is cool, u can probaby use egomoos’s gravity script thingy to make u walk around the thing. i really like huge openworld games where u can go and explore on ur own accord hopping planet to planet like no mans sky

1 Like