# 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:** 16

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [July 31, 2017, 12:22am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/309 "2017-07-31T00:22:29Z")

</div>

> [@mid\_gen;743525](#):
>
> CGTerrainManager fires a delegate whenever a tile is updated with new data from the worker thread. OnTileMeshUpdated.  
> It also calls OnInitialTileDrawComplete blueprintimplementable event the first time all the work queues are empty (so the first time the full terrain is generated).
> 
> CGWorld calls OnDrawComplete blueprintimplementable event when it’s completed drawing.

Perfect ! Good job ! 😃

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [July 31, 2017, 2:50am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/310 "2017-07-31T02:50:43Z")

</div>

I have a strange problem with your material of your demo content 😃

[https://img4.hostingpics.net/thumbs/mini\_654042Sanstitre.png](https://www.hostingpics.net/viewer.php?id=654042Sanstitre.png)

---

<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 31, 2017, 4:27pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/311 "2017-07-31T16:27:56Z")

</div>

> [@OmniMachina;743559](#):
>
> is there a way to completely disable LODs?  
> my map is really small and i need to render the complete terrain for my project  
> i tried to set the LODs range over 500000 - doesn’t work

What do you mean disable LODs? You need a LOD0 or nothing will be rendered 🙂

---

<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 31, 2017, 4:30pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/312 "2017-07-31T16:30:01Z")

</div>

> [@AinSophAur;743635](#):
>
> For the CGWorld. Is there a way for me, with the plugins current state, to use Vertex Color like you do in the tutorial video?

You’d need to make code changes to start putting information into the vertex colour channels.

---

<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 31, 2017, 4:31pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/313 "2017-07-31T16:31:26Z")

</div>

> [@Haoris;743675](#):
>
> I have a strange problem with your material of your demo content 😃
> 
> [https://img4.hostingpics.net/thumbs/mini\_654042Sanstitre.png](https://www.hostingpics.net/viewer.php?id=654042Sanstitre.png)

You can’t have material functions in plugin content, so yeah the material is kinda broke at the moment. Best off making your own tbh until I get a to make a new one.

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [July 31, 2017, 4:43pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/314 "2017-07-31T16:43:09Z")

</div>

> [@mid\_gen;743953](#):
>
> You’d need to make code changes to start putting information into the vertex colour channels.

I see. Thanks for the reply.  
I will have a go at it when I got the time. Just to dig around in the code for fun. 😃

---

<div class="post-metadata">

**Author:** ![OmniMachina](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OmniMachina](https://forums.unrealengine.com/u/OmniMachina)\
**Post date:** [July 31, 2017, 6:08pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/315 "2017-07-31T18:08:03Z")

</div>

> [@mid\_gen;743950](#):
>
> What do you mean disable LODs? You need a LOD0 or nothing will be rendered 🙂

haha 😃 sorry, phrasing of my question is kinda strange

fixed it already, all good 🙂  
thanks for your help

---

<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 1, 2017, 9:14am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/316 "2017-08-01T09:14:30Z")

</div>

First time I’ve looked at the multiplayer side of things. Doesn’t look like it’ll be too much work. Hopefully have some time this week to get it finished.

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 1, 2017, 11:35am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/317 "2017-08-01T11:35:37Z")

</div>

> [@mid\_gen;744276](#):
>
> First time I’ve looked at the multiplayer side of things. Doesn’t look like it’ll be too much work. Hopefully have some time this week to get it finished.

Sounds good. Looking forward to poke those options as well. 😃  
I know you said it’s for the CGTerrain, but everything with this plugin is of interest to us. :o

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 5, 2017, 11:27am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/318 "2017-08-05T11:27:00Z")

</div>

I have to ask you something @mid_gen  
When the World part is worked through, will there be LOD settings as well?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_63759055](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_63759055](https://forums.unrealengine.com/u/anonymous_user_63759055)\
**Post date:** [August 5, 2017, 12:58pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/319 "2017-08-05T12:58:41Z")

</div>

Can your plugin be used to enrich existing heightmaps? I was thinking of how to generate real world environments with real height data in UE4. Its possible in a [StreetMap branch](https://github.com/Real-Synth/StreetMap), but the landscape doesn’t look nice yet. Also LODing would be a topic to tackle.

Keep up the great work! 😃

---

<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 6, 2017, 2:52pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/320 "2017-08-06T14:52:00Z")

</div>

> [@AinSophAur;746139](#):
>
> I have to ask you something @mid_gen  
> When the World part is worked through, will there be LOD settings as well?

Will be eventually, the roots of it are already in there with the variable subdivision levels.

---

<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 6, 2017, 2:52pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/321 "2017-08-06T14:52:44Z")

</div>

> [@MaSe87;746156](#):
>
> Can your plugin be used to enrich existing heightmaps? I was thinking of how to generate real world environments with real height data in UE4. Its possible in a [StreetMap branch](https://github.com/Real-Synth/StreetMap), but the landscape doesn’t look nice yet. Also LODing would be a topic to tackle.
> 
> Keep up the great work! 😃

Not at present, although I don’t imagine it being too much work.

---

<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 6, 2017, 2:54pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/322 "2017-08-06T14:54:08Z")

</div>

Got kinda sidetracked whilst making CGTerrain work in multiplayer, I’ve embarked on a complete refactor again. It wasn’t really working just hacking network support to the existing model.

Better to just redo it properly. Nice to have this luxury when working on your own projects :\>

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 6, 2017, 5:26pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/323 "2017-08-06T17:26:08Z")

</div>

> [@mid\_gen;746476](#):
>
> Will be eventually, the roots of it are already in there with the variable subdivision levels.

Sounds great. Then I know that I don’t need to make a serious LOD system, but a temporarily one that could potentially work.  
Glad to see that the plugin is still a fun thing to work on. With mulitiplayer support and all. 😃  
It’s important to have fun with that one works on. Otherwise, it’s hard to get stuff done.

---

<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 7, 2017, 5:11pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/324 "2017-08-07T17:11:30Z")

</div>

Just saw the 4.17 patch notes include async physx collision cooking finally. Assuming koderz can get this functionality hooked into the RMC fairly easily it should really unlock the possibilities of runtime terrain 🙂

Just wish I wasn’t neck deep in this multiplayer refactoring to try it out!

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 7, 2017, 5:25pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/325 "2017-08-07T17:25:33Z")

</div>

> [@mid\_gen;746884](#):
>
> Just saw the 4.17 patch notes include async physx collision cooking finally. Assuming koderz can get this functionality hooked into the RMC fairly easily it should really unlock the possibilities of runtime terrain 🙂
> 
> Just wish I wasn’t neck deep in this multiplayer refactoring to try it out!

A lot of new things are on it’s way then. That’s good news! 😃

And well, multiplayer opens up a lot of options as well.

I have a quick question. Not sure if it’s on the right place tho.  
Is it currently possible to convert a fully built spherical world into a static mesh?

---

<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 7, 2017, 6:31pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/326 "2017-08-07T18:31:21Z")

</div>

Nope, but if I remember right the RMC has functions to let you do that? Would be easy enough to take the code and make something that’ll do it for you.

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 7, 2017, 6:41pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/327 "2017-08-07T18:41:03Z")

</div>

> [@mid\_gen;746917](#):
>
> Nope, but if I remember right the RMC has functions to let you do that? Would be easy enough to take the code and make something that’ll do it for you.

Ah, yeah, that’s right:  
· RMC \<-\> StaticMeshComponent conversions. SMC -\> RMC at runtime or in editor. RMC -\> SMC in editor. (new)

Could be interesting. But only in editor. But the code is there somewhere, so it should be possible.

---

<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 8, 2017, 6:26am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/328 "2017-08-08T06:26:21Z")

</div>

> [@AinSophAur;746922](#):
>
> Ah, yeah, that’s right:  
> · RMC \<-\> StaticMeshComponent conversions. SMC -\> RMC at runtime or in editor. RMC -\> SMC in editor. (new)
> 
> Could be interesting. But only in editor. But the code is there somewhere, so it should be possible.

You should be able to make a decent in-editor world generator that’ll spit out static meshes for you with the click of a button, using the code in the CGWorld class.

Getting there with the refactor…

For anyone interested in what I’m doing…I’m throwing away the old method of having a square grid and flipping rows/columns of tiles across to follow the pawn. It’s simple and crude and works ok for a single player but kinda sucks for multiplayer.

New system has a single Manager that you register a pawn with that you want terrain built around. The manager tracks the pawn and places tiles from the free stack in any sectors with X radius of that pawn. It periodically sweeps that the radius of the pawns and marks each sector as required. If a sector isn’t marked in a timeout period, the tile is hidden and returned to the free stack. Makes replication much easier too :\>

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

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