# Cashgen - (kinda) Infinite Procedural World Generator

**URL:** <https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [May 6, 2016, 4:37pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131 "2016-05-06T16:37:03Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![anonymous\_user\_f125a5ee1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f125a5ee1](https://forums.unrealengine.com/u/anonymous_user_f125a5ee1)\
**Post date:** [July 4, 2016, 4:57am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/42 "2016-07-04T04:57:21Z")

</div>

> [@Comniverse\_01;558278](#):
>
> First off, wow awesome work. This is way beyond anything that I could do. I’ll have to subscribe or follow, whichever.
> 
> I had a few questions about integration with other editor features.
> 
> 1. Will this work with the existing Landscape tools already in the editor once you have completed the project. I’m interested in making a game world where the player start area will be a pre-generated map that is the same no matter what server you play on. This will be a large extinct caldera, containing some large forests, a town village, abandoned castle, etc. Once you get outside the caldera however, I would like to have the world randomly generate from there. This will continue until the world size reaches a data size limit, and then the world will try to loop so that you get a simile of a planet where you can walk all the way around.  
> So could you feasible have the pre-generated caldera and then stitch it into the random map?
> 
> 2. Are you planning on extending the biome generation function any farther than trees and plants, or is that as far as it will go? I could see this as a open world game generator package, where a designer could input a bunch of parameters, add some characters, NPCs, and quests, and have themselves a simple game in a massive world.
> 
> 3. Will the world support terrain _editing_ at runtime, such that you can dig holes like in Minecraft? ( I know, I used the M word. It’s really the only game I know of where you can do that.)
> 
> 4. Is the water swim-able, or could it be implemented, such that the program generates a physics volume underneath the water as well as a post process volume to simulate water ?
> 
> 5. How big can this world conceivably be, and can it be saved, so that a player could explore a large map and then return to a previous area and have it the same as the last time he was there?
> 
> I know it’s a lot of work, I just wanted to know if you have any plans for implementing this kind of stuff or not.
> 
> Thanks and keep up the great work.

To answer 3 and 4.

3: This isn’t a voxel world that i know of.

4: Go look at [https://forums.unrealengine.com/showthread.php?42092-Community-Project-WIP-Weather-amp-Ocean-Water-Shader](https://forums.unrealengine.com/showthread.php?42092-Community-Project-WIP-Weather-amp-Ocean-Water-Shader) this will tell you how the water works.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [July 4, 2016, 8:38am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/43 "2016-07-04T08:38:30Z")

</div>

> [@Comniverse\_01;558278](#):
>
> First off, wow awesome work. This is way beyond anything that I could do. I’ll have to subscribe or follow, whichever.
> 
> I had a few questions about integration with other editor features.
> 
> 1. Will this work with the existing Landscape tools already in the editor once you have completed the project. I’m interested in making a game world where the player start area will be a pre-generated map that is the same no matter what server you play on. This will be a large extinct caldera, containing some large forests, a town village, abandoned castle, etc. Once you get outside the caldera however, I would like to have the world randomly generate from there. This will continue until the world size reaches a data size limit, and then the world will try to loop so that you get a simile of a planet where you can walk all the way around.  
> So could you feasible have the pre-generated caldera and then stitch it into the random map?
> 
> 2. Are you planning on extending the biome generation function any farther than trees and plants, or is that as far as it will go? I could see this as a open world game generator package, where a designer could input a bunch of parameters, add some characters, NPCs, and quests, and have themselves a simple game in a massive world.
> 
> 3. Will the world support terrain _editing_ at runtime, such that you can dig holes like in Minecraft? ( I know, I used the M word. It’s really the only game I know of where you can do that.)
> 
> 4. Is the water swim-able, or could it be implemented, such that the program generates a physics volume underneath the water as well as a post process volume to simulate water ?
> 
> 5. How big can this world conceivably be, and can it be saved, so that a player could explore a large map and then return to a previous area and have it the same as the last time he was there?
> 
> I know it’s a lot of work, I just wanted to know if you have any plans for implementing this kind of stuff or not.
> 
> Thanks and keep up the great work.

1. Nope. The Landscape tools are designed for editor use, I’ve not looked into it much but I read enough to know that using Landscape features at runtime was not going to be fun.

2. Easy enough to add another weightmap for actors, in addition to the instanced mesh spawning!

3. It’s heightmap based, so no overhangs or caves. There’s no reason why you couldn’t deform the underlying heightmap and refresh the mesh in realtime but it’s not really set up for that, would need quite a bit of refactoring and optimisation to make it work well.

4. I think OceanPlugin has various tools for this, I’m already using the Ocean actor so imagine it would be pretty easy to make it swimmable.

5. It’s currently restricted to the 20kmx20km UE level limit…but as soon as I get the world origin rebasing in, it’s theoretically infinite. The terrain is deterministic so it will always be the same whenever the player goes back to it, but anything the player interacts with? You’d need to take care of persisting those changes out somewhere.

I’m mega busy and juggling a few other projects at the moment so unlikely to be working on this in the next few weeks. If anyone wants to have a crack at world origin rebasing, go fork it on github 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f288c400](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f288c400](https://forums.unrealengine.com/u/anonymous_user_f288c400)\
**Post date:** [July 7, 2016, 3:49am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/44 "2016-07-07T03:49:32Z")

</div>

Hello…I cloned the project to mac and tried to compile it…then it returned " could not be compiled, try rebuilding from source manually ". Can you please tell me how to solve it? Thanks a lot:)

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [July 7, 2016, 8:29am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/45 "2016-07-07T08:29:15Z")

</div>

> [@davidg0;560404](#):
>
> Hello…I cloned the project to mac and tried to compile it…then it returned " could not be compiled, try rebuilding from source manually ". Can you please tell me how to solve it? Thanks a lot:)

Hmm, I don’t have a mac to test on. Try removing all the intermediate/binary folders and rebuilding.

---

<div class="post-metadata">

**Author:** ![Raptor\_X\_23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raptor\_X\_23](https://forums.unrealengine.com/u/Raptor_X_23)\
**Post date:** [July 10, 2016, 5:54pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/46 "2016-07-10T17:54:39Z")

</div>

Thanks

Thanks mid\_gen for the quick reply and answers to my questions. Great work again, but it sounds like it is not quite what i need. Keep up the good work, as I’m sure many others will be able to use it, and I might at a later date. Good to know there are people interested in providing great stuff like this to the community for little or no cost. Hopefully I’ll be able to contribute myself once I learn how to use the engine well.

Thanks again

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [August 30, 2016, 7:24pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/47 "2016-08-30T19:24:46Z")

</div>

Started working on this again, getting some nicer noise and foliage spawning. Here’s a _very_ rough video…all sorts of silly settings on, probably hundreds of thousands of meshes on the go…

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/8/808f68a33335e9f10e12a1a563f4ef173e75ffaf.jpeg "Procedural Generate WIP Update - More Foliage") ](https://www.youtube.com/watch?v=G84M1NJiERE)

---

<div class="post-metadata">

**Author:** ![Senitelty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Senitelty](https://forums.unrealengine.com/u/Senitelty)\
**Post date:** [September 1, 2016, 7:25am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/48 "2016-09-01T07:25:41Z")

</div>

I haven’t looked at this plugin but it looks amazing! how do you think would it be possible to generate a heightmap texture and update it so that the ocean plugin would soften the shores?

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 1, 2016, 8:10am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/49 "2016-09-01T08:10:45Z")

</div>

I haven’t looked into how Oceanplugin handles shorelines yet, I’ll add it to the list. I’ve got the heightmap stored per zone, so I’d have to stitch it together and make the texture, but certainly do-able. Or just crank it out directly from the noise module…depends what resolution it needs.

Took a bit of time to make a nicer video with the excellent grass from @AaronWith2As - [[FREE] Advanced Cinematic Grass Blueprint with 3D Imposter Sprite foliage - World Creation - Epic Developer Community Forums](https://forums.unrealengine.com/showthread.php?97253-FREE-Advanced-Cinematic-Grass-Blueprint-with-3D-Imposter-Sprite-foliage/page2) . I’m hoping he’s open to letting me include the grass in this project so I can get the complete setup out there 🙂

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/0/0508987aac3defd0112d0533c585f32176d0bad4.jpeg "WIP Procedural Generation - 2016-09-01") ](https://www.youtube.com/watch?v=o1bVq9lqui0)

---

<div class="post-metadata">

**Author:** ![woppin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@woppin](https://forums.unrealengine.com/u/woppin)\
**Post date:** [September 2, 2016, 4:12pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/50 "2016-09-02T16:12:45Z")

</div>

It didn’t compile on mac for me initially because ‘Point’ is already defined in MacTypes.h. I refactored it to be CPoint and then everything worked.

---

<div class="post-metadata">

**Author:** ![Derjyn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/derjyn/32/931618_2.png) [@Derjyn](https://forums.unrealengine.com/u/Derjyn)\
**Post date:** [September 3, 2016, 1:25am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/51 "2016-09-03T01:25:03Z")

</div>

This is pretty awesome, to say the least. One request though, if it hadn’t already been brought up: add material instance selection in the ZoneConfig. Also, I get random crashes depending on any given configuration for noise. It seems if I start play, and don’t look down towards the terrain that’s generating, it plays nice, but chaotically things will crash if I look at the generating tiles. Very weird! I tried tweaking render tokens and threads to see if that made a difference, but it seems to come down to the complexity of noise…

Anyhow, great work and thanks a ton for sharing such a cool resource.

[edit]  
I changed the regular material input to a material instance in the source, which works fine. Just don’t want to modify and fight against your updates 😛  
[/edit]

---

<div class="post-metadata">

**Author:** ![Aaron-Neal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aaron-Neal](https://forums.unrealengine.com/u/Aaron-Neal)\
**Post date:** [September 3, 2016, 8:10am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/52 "2016-09-03T08:10:55Z")

</div>

Yep go right ahead mid\_gen :). Can’t wait to see your project finished, looks awesome already.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 3, 2016, 8:46am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/53 "2016-09-03T08:46:55Z")

</div>

Awesome @AaronWith2As, thanks 🙂

> [@](#):
>
> This is pretty awesome, to say the least. One request though, if it hadn’t already been brought up: add material instance selection in the ZoneConfig. Also, I get random crashes depending on any given configuration for noise. It seems if I start play, and don’t look down towards the terrain that’s generating, it plays nice, but chaotically things will crash if I look at the generating tiles. Very weird! I tried tweaking render tokens and threads to see if that made a difference, but it seems to come down to the complexity of noise…

This is probably the noiseGenerator being garbage collected. Holding a UPROPERTY pointer to it in a USTRUCT doesn’t appear to contribute to reference count so it gets zapped with the first GC sweep. Just add a UFNNoiseGenerator reference to the world BP and set it, should solve that one.

I’ve got an afternoon to work on this today so I’m doing a big refactor and tidy up, will have an update later today that will include the swish grass 🙂

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 3, 2016, 1:02pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/54 "2016-09-03T13:02:44Z")

</div>

Pushed a fairly big update.

\*Added @AaronWith2As lovely grass and included in the demo scene  
\*Removed debug text  
\*Fixed GC of noise generator  
\*Fixed struct name collision with Mac build  
\*Partial implementation of minimap (not finished)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/1/a014a26e0d0bc130b47f9aa614a658534046cba8.jpeg "WIP Procedural Generation - 2016-09-03") ](https://www.youtube.com/watch?v=KyDR3Nim4cQ)

---

<div class="post-metadata">

**Author:** ![Blood-PawWerewolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blood-PawWerewolf](https://forums.unrealengine.com/u/Blood-PawWerewolf)\
**Post date:** [September 3, 2016, 2:45pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/55 "2016-09-03T14:45:52Z")

</div>

![2016-09-03.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/f/2f0d7f900552f41228053ef56655e4d6600aa5e0.png)

![2016-09-03 (1).png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/e/3ef6cff7324ed16ec6c592a84fe17baf034f4488.png)

i can’t get it to launch on UE 4.12.5

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 3, 2016, 3:35pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/56 "2016-09-03T15:35:57Z")

</div>

Can you build the project in VS?

---

<div class="post-metadata">

**Author:** ![Blood-PawWerewolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blood-PawWerewolf](https://forums.unrealengine.com/u/Blood-PawWerewolf)\
**Post date:** [September 3, 2016, 4:11pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/57 "2016-09-03T16:11:36Z")

</div>

i can’t even generate VS project files:

“Running E:/Program Files/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“E:/Users/Bobby/Documents/Unreal Projects/cashgenUE-/cashgenUE.uproject” -game -rocket -progress  
Discovering modules, targets and source code for project…  
Messages while compiling E:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\BuildRules\UE4Rules.dll:  
e:\Program Files\Epic Games\4.12\Engine\Plugins\Runtime\RuntimeMeshComponent\Source\RuntimeMeshComponent.Build.cs(5,14) : error CS0101: The namespace ‘\<global namespace\>’ already contains a definition for ‘RuntimeMeshComponent’  
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files”

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 3, 2016, 4:26pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/58 "2016-09-03T16:26:30Z")

</div>

Hmm, do you have the runtime mesh component installed as an engine plug-in already? It’s included in the project…

I’ll have to look at it in the morning…

---

<div class="post-metadata">

**Author:** ![Blood-PawWerewolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Blood-PawWerewolf](https://forums.unrealengine.com/u/Blood-PawWerewolf)\
**Post date:** [September 3, 2016, 4:32pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/59 "2016-09-03T16:32:29Z")

</div>

yes, i have the runtime mesh component plugin from the UE4 Marketplace installed

EDIT: that was the. it launches now, but all i have now is just a huge ocean, no land or any vegetation.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 4, 2016, 8:29am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/60 "2016-09-04T08:29:18Z")

</div>

Ok I might remove the RTMC from the project then and just add the marketplace version as a pre-requisite.

You sure it’s empty? On play it takes a few seconds for the terrain to initially load in. If you’re using the demo scene you should see land on one side.

It’s quite easy to use noise generator parameters that don’t generate visible terrain. As I get the minimap preview done I’ll make a demo room where you can preview the heightmap before launching the terrain build.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 4, 2016, 9:49am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/61 "2016-09-04T09:49:14Z")

</div>

Updated - Removed RuntimeMeshComponent from project plugins

\*\*You will now need to install RuntimeMeshComponent to your engine version to run the project.  
\*\*

> **[Runtime Mesh Lite in Code Plugins - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/product/runtime-mesh-component)**
>
> Component for rendering procedurally generated meshes!

[Previous page](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131.md?page=2)

[Next page](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131.md?page=4)
