# WIP planet generation & procedural flora

**URL:** <https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [August 16, 2016, 12:20am UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596 "2016-08-16T00:20:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeroicVillain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HeroicVillain](https://forums.unrealengine.com/u/HeroicVillain)\
**Post date:** [August 16, 2016, 12:20am UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/1 "2016-08-16T00:20:58Z")

</div>

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.](https://github.com/HeroicVillain/PlanetGeneration))  
Right now it’s the very basics, turning a cube into a sphere, applying noise(thanks [DevDad](https://forums.unrealengine.com/showthread.php?94847-Plugin-Simplex-Noise-1D-2D-3D-4D-Fast-Perlin-Noise-Version)), and spawning some trees/bushes/grass  
(using some of [Nobiax’s](http://nobiax.deviantart.com/) resources, and a tree I got from no clue where, I think it was from [Shoiko’s terrain texturer](https://forums.unrealengine.com/showthread.php?89191-Auto-Terrain-Texturer-Version-2-Release)) down.  
Also a huge thanks to [this unity thread](http://forum.unity3d.com/threads/procedural-terrain-on-a-planet.127292/) 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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/2/3a274f69c75abc1f7fca3a1f64e240e8082271d4.png)

 ![2f7e5109b68e6d6f877339cc9b8ac231.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/1/11397702e6f8e37390e007cf7a9170b18e8e17e8.png)  
 ![68c5ca2b506bead8045170cd38b62382.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/c/9c4db4f37b51fd34e5488a891d8c56b0b0838ad4.png)

---

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [August 16, 2016, 5:42am UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/2 "2016-08-16T05:42:51Z")

</div>

Ok this is really cool!

Going to keep an eye on this 🙂

---

<div class="post-metadata">

**Author:** ![hippowombat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hippowombat/32/906590_2.png) [@hippowombat](https://forums.unrealengine.com/u/hippowombat)\
**Post date:** [August 16, 2016, 9:29pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/3 "2016-08-16T21:29:43Z")

</div>

This is amazing!!!

---

<div class="post-metadata">

**Author:** ![HeroicVillain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HeroicVillain](https://forums.unrealengine.com/u/HeroicVillain)\
**Post date:** [August 21, 2016, 3:15am UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/4 "2016-08-21T03:15:01Z")

</div>

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.

 ![35473a82287b6a5492ac03d55d170abf.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/9/b92d2ed630135490d016a7f93bcfd6e380fddc77.png)

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 😛

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.

---

<div class="post-metadata">

**Author:** ![Ostheim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ostheim](https://forums.unrealengine.com/u/Ostheim)\
**Post date:** [August 21, 2016, 7:09am UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/5 "2016-08-21T07:09:28Z")

</div>

Wow this is awesome!

---

<div class="post-metadata">

**Author:** ![Masakralny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Masakralny](https://forums.unrealengine.com/u/Masakralny)\
**Post date:** [July 20, 2018, 2:23pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/6 "2018-07-20T14:23:10Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Masakralny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Masakralny](https://forums.unrealengine.com/u/Masakralny)\
**Post date:** [July 21, 2018, 11:35pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/7 "2018-07-21T23:35:02Z")

</div>

I need to work with 4.12 then ?

---

<div class="post-metadata">

**Author:** ![MaximeDupart](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maximedupart/32/1194606_2.png) [@MaximeDupart](https://forums.unrealengine.com/u/MaximeDupart)\
**Post date:** [July 22, 2018, 5:02pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/8 "2018-07-22T17:02:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Masakralny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Masakralny](https://forums.unrealengine.com/u/Masakralny)\
**Post date:** [July 24, 2018, 12:58pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/9 "2018-07-24T12:58:23Z")

</div>

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](https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1374849-c-transition-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

> **[Having issues converting code projects from 4.18.3 to 4.19](https://forums.unrealengine.com/questions/771273/having-issues-converting-code-projects-from-4183-t.html)**
>
> When attempting to convert code projects from 4.18.3 to 4.19 I get this error: Project files could not be generated. Log output: Running C:/Unreal Engine/UE\_4.19/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles...

In **PlanetGeneration.Build.cs**

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

---

<div class="post-metadata">

**Author:** ![Masakralny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Masakralny](https://forums.unrealengine.com/u/Masakralny)\
**Post date:** [July 24, 2018, 1:54pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/10 "2018-07-24T13:54:16Z")

</div>

sorry for my inconvience i was very impatient

---

<div class="post-metadata">

**Author:** ![Masakralny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Masakralny](https://forums.unrealengine.com/u/Masakralny)\
**Post date:** [August 8, 2018, 1:32pm UTC](https://forums.unrealengine.com/t/wip-planet-generation-procedural-flora/71596/11 "2018-08-08T13:32:01Z")

</div>

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…
