WIP planet generation & procedural flora

So the past roughly 2 weeks I’ve been working on generating planets, done entirely in blueprint(I’m rusty at c++)

I’d like to give back to the community and hopefully get help to further this project, so I’ve set up a git (GitHub - HeroicVillain/PlanetGeneration: Planet Generation project using quadspheres and simplex noise.)
Right now it’s the very basics, turning a cube into a sphere, applying noise(thanks DevDad), and spawning some trees/bushes/grass
(using some of Nobiax’s resources, and a tree I got from no clue where, I think it was from Shoiko’s terrain texturer) down.
Also a huge thanks to this unity thread which helped me with the cube-sphere.

I’m starting a job soon, which is the main reason I’ve opened a git, as I won’t have as much time to work on it as I have. There’s also tons of clever people in the community who might want to help implement some of these tougher features I’m having trouble grasping such as quadtree LODs.

Future plans:
Improving noise
Throwing together a horrible looking material.
Add arbitrary gravity
Atmosphere
Quadtrees
Optimizing

Current features:
Planetary seeds, seed defines noise generated and foliage placement.
change size of quads
change amount of quads
define radius
Noise settings (honestly don’t know if I’m doing noise correctly, it doesn’t look horrible though.)

Without further ado here’s some pictures.
f7ccf6125315a116af1809abdc71b568.png


Ok this is really cool!

Going to keep an eye on this :slight_smile:

This is amazing!!!

Added a really simple atmosphere for now, used a tutorial by TheJamsh and tried to change it a bit to use camera vector instead of object position. Also moved the procedural hemispheres into a new bp.
Made the sun rotate now to test the atmosphere updating.

Probably last update for a week or 2, if anyone else wants to improve atmospheres/tell me what I can do to improve them I’ll try to update them.
Quadtrees are pushed back a little as I have no clue how to go about doing it in blueprints, I think there was an unreal example that used one I’ll look into it when I have time… so not for a week or two :stuck_out_tongue:

As for the noise being jagged, I’ve tried to fix it and think it’s a limitation on how large the quads are atm. It’ll probably smooth a bit when quadtrees are made.

Wow this is awesome!

How to get to work this plugin with 4.19.2 Unreal Engine vesion ? I’m getting errors when i’m generating project files with VS 2017:

Running E:/Epic Games/UE_4.19/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“E:/Epic Games/Unreal Projects/PlanetGeneration/PlanetGeneration.uproject” -game -rocket -progress
Discovering modules, targets and source code for project…
While compiling E:\Epic Games\Unreal Projects\PlanetGeneration\Intermediate\Build\BuildRules\PlanetGenerationModuleRules.dll:
ERROR: e:\Epic Games\Unreal Projects\PlanetGeneration\Source\PlanetGeneration.Target.cs(19,12) : error CS0122: Element "UnrealBuildTool.UEBuildBinaryConfiguration"is unavailable due to its level of protection.
ERROR: e:\Epic Games\Unreal Projects\PlanetGeneration\Source\PlanetGeneration.Target.cs(17,23) : error CS0051: Inconsistency of availability: parameter type "ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>"is less available than the method “PlanetGenerationTarget.SetupBinaries(UnrealBuildTool.TargetInfo, ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>, ref System.Collections.Generic.List<string>)”.
ERROR: e:\Epic Games\Unreal Projects\PlanetGeneration\Source\PlanetGenerationEditor.Target.cs(19,12) : error CS0122: Element “UnrealBuildTool.UEBuildBinaryConfiguration” is unavailable due to its level of protection.
ERROR: e:\Epic Games\Unreal Projects\PlanetGeneration\Source\PlanetGenerationEditor.Target.cs(17,23) : error CS0051: Inconsistency of availability: parameter type “ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>” is less available than the method “PlanetGenerationEditorTarget.SetupBinaries(UnrealBuildTool.TargetInfo, ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>, ref System.Collections.Generic.List<string>)”.
ERROR: UnrealBuildTool Exception: Unable to compile source files.

Please help or tell me what should I do, i need this plugin with 4.19 or even newer 4.20 . I know that i need to recompile project but as i say previously i can’t generate VS project files from Source

Anybody can tell me what to do with those errors ?

I need to work with 4.12 then ?

Incredibly cool to share this with the community. Thanks @HeroicVillain !

I got to work Runtime Mesh Component Plugin and Simple Noise Plugin but have problems with yours one , please what to do with those errors in 4.19.2

PlanetGeneration.Target.cs(19,12) : error CS0122: Element "UnrealBuildTool.UEBuildBinaryConfiguration"is unavailable due to its level of protection.

PlanetGeneration.Target.cs(17,23) : error CS0051: Inconsistency of availability: parameter type "ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>"is less available than the method “PlanetGenerationTarget.SetupBinaries(UnrealBuildTool.TargetInfo, ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>, ref System.Collections.Generic.List<string>)”.

PlanetGenerationEditor.Target.cs(19,12) : error CS0122: Element “UnrealBuildTool.UEBuildBinaryConfiguration” is unavailable due to its level of protection.

PlanetGenerationEditor.Target.cs(17,23) : error CS0051: Inconsistency of availability: parameter type “ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>” is less available than the method “PlanetGenerationEditorTarget.SetupBinaries(UnrealBuildTool.TargetInfo, ref System.Collections.Generic.List<UnrealBuildTool.UEBuildBinaryConfiguration>, ref System.Collections.Generic.List<string>)”.

EDIT: I found out how to update code from4.12 to at least 4.18 which is definetly closer to 4.19 than 4.12 there
https://forums.unrealengine.com/deve…guide-for-4-18
and now it should looks like this :

for** PlanetGeneration.Target.cs**

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class PlanetGenerationTarget : TargetRules
{
public PlanetGenerationTarget(TargetInfo Target)
: base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.Add(“PlanetGeneration”);
}

}

and for PlanetGenerationEditor.Target.cs

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class PlanetGenerationEditorTarget : TargetRules
{
public PlanetGenerationEditorTarget(TargetInfo Target)
: base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.Add(“PlanetGeneration”);
}

}

Now i need find fix for PlanetGeneration.Build.cs
Now I have one error…

Running E:/Epic Games/UE_4.19/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“E:/Epic Games/Unreal Projects/Test/PlanetGeneration.uproject” -game -rocket -progress
Discovering modules, targets and source code for project…
While compiling E:\Epic Games\Unreal Projects\Test\Intermediate\Build\BuildRules\PlanetGenerationModuleRules.dll:
ERROR: e:\Epic Games\Unreal Projects\Test\Source\PlanetGeneration\PlanetGeneration.Build.cs(7,9) : error CS1729: Element UnrealBuildTool.ModuleRules
does not contain a constructor that would accept such a number of arguments: 0.
ERROR: UnrealBuildTool Exception: Unable to compile source files.

EDIT 2 : And there I found solution for last error

In PlanetGeneration.Build.cs

I just changed this
public PlanetGeneration(TargetInfo Target)
to this
public PlanetGeneration(ReadOnlyTargetRules Target) : base(Target)

sorry for my inconvience i was very impatient

Everything is working ,but why I have only 15 fps…maybe that’s my laptop (Lenovo y50) ?
When i deleted planet atmosphree i have about 30-45 fps…What is wrong with if …I don’t even need it
Also when I select planet or I will go further from it my fps drops to 5-10…