# Map Generator 3.0 - Please Critique!

**URL:** <https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [October 22, 2014, 7:54am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745 "2014-10-22T07:54:00Z")\
**Posts on this page:** 20\
**Page:** 10

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 31, 2015, 10:23am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/181 "2015-03-31T10:23:01Z")

</div>

Or multiple moons 🙂 On to a procedural solar system!

It’s awesome to see the world generator with improved meshes and textures. J.J. Franzen has done a great job. I’m sure seeing thisis a very rewarding experience after working on the underlying system for so long. I know it was in my case when I first used imported assets. How do you think you would have reacted if you could show yourself from a year ago this screenshot?

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [March 31, 2015, 11:26am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/182 "2015-03-31T11:26:16Z")

</div>

> [@;261084](#):
>
> Or multiple moons 🙂 On to a procedural solar system!

Definitely! Who needs to fight over Alpha Centauri when the planets of the solar system are so much closer? 🙂

> [@;261084](#):
>
> It’s awesome to see the world generator with improved meshes and textures. J.J. Franzen has done a great job. I’m sure seeing thisis a very rewarding experience after working on the underlying system for so long. I know it was in my case when I first used imported assets.

J.J. has definitely done some great work! Making some things happen that I had written off for many months down the road.

> [@;261084](#):
>
> How do you think you would have reacted if you could show yourself from a year ago this screenshot?

Heh, I don’t even know. A year ago I only had the vaguest idea that I wanted tectonics and climate systems in the generator without having a clue as to how they would even happen, especially before I figured out Voronoi. Projection, well that wasn’t even in the realm of possibility back then.

Now you got me wishing I had a hundred time traveling clones of myself to come back here and help knock the rest of this game out. lol

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 31, 2015, 6:15pm UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/183 "2015-03-31T18:15:05Z")

</div>

> [@;261120](#):
>
> Now you got me wishing I had a hundred time traveling clones of myself to come back here and help knock the rest of this game out. lol

It’s 2015. We should have those by now! Though in my case I’m actually getting some of the same benefits by putting my toolkit on the marketplace (I know you aren’t going to). That way I have lots of people developing my blueprints in all different directions, and if I wonder how they did something they’re usually willing to share it with me 🙂 Still, I’ve probably spent 10x as much time giving technical support so far as I’ve saved time this way… It’s all good, though. Let’s me identify the less intuitive parts.

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [April 1, 2015, 7:24am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/184 "2015-04-01T07:24:18Z")

</div>

Yeah, even if I did want to sell the generator on the marketplace, the amount of tech support I would have to provide for this beast would more than I could bear. 😛

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [April 18, 2015, 2:00am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/185 "2015-04-18T02:00:59Z")

</div>

Using Rama’s new Pixel Data from Texture nodes:

[![](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/EarthMap.png) ](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/EarthMap.png)

[![](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/EarthMapGlobe.png) ](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/EarthMapGlobe.png)

Source File:

[![](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/Tex_Earth_Black_White.png) ](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/Tex_Earth_Black_White.png)

I have only added in land/water data using the image. I could do the same thing for with topology, precipitation, etc. Nice to see that my weather system put deserts and jungles on the earth map where they belong though! 🙂

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [April 18, 2015, 2:37am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/186 "2015-04-18T02:37:29Z")

</div>

That your weather system managed to recreate something fairly close to the real thing is actually extremely impressive. Shows you really did your research when you designed it. Are you planning to include this as a feature players may use? Importing their own maps, I mean.

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [April 18, 2015, 3:20am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/187 "2015-04-18T03:20:00Z")

</div>

> [@;274190](#):
>
> That your weather system managed to recreate something fairly close to the real thing is actually extremely impressive. Shows you really did your research when you designed it.

Yeah, and Australia would probably also be arid if I had used a map that included Antarctica. It would have put Australia at the correct latitude for desert creation.

Also, with the mountains not lining up correctly with the landmasses, the rain shadow is out of whack, so applying another image for topology should go even further.

The only major missing piece to the weather system is situations like the Indian Ocean and the Middle East. My system will drench land west of the indian ocean, whereas that doesn’t happen in reality. May or may not address those edge cases in the future, as I am pretty happy with the current state. 🙂

> [@;274190](#):
>
> Are you planning to include this as a feature players may use? Importing their own maps, I mean.

For sure! 🙂 They can upload better and/or altered earth maps, Azeroth, their face, or whatever map they want to play on. Should add quite a bit of replayability, and definitely aid in scenario creation.

---

<div class="post-metadata">

**Author:** ![dons90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dons90](https://forums.unrealengine.com/u/dons90)\
**Post date:** [April 22, 2015, 5:17pm UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/188 "2015-04-22T17:17:14Z")

</div>

Holy \*\*\*\*. How does one even create something on this scale? My god.

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [April 23, 2015, 8:25am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/189 "2015-04-23T08:25:57Z")

</div>

> [@dons90;277166](#):
>
> Holy \*\*\*\*. How does one even create something on this scale? My god.

Hehe, the only way one can, brick by brick. 🙂

---

<div class="post-metadata">

**Author:** ![JmDevTx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JmDevTx](https://forums.unrealengine.com/u/JmDevTx)\
**Post date:** [April 29, 2015, 7:48am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/190 "2015-04-29T07:48:44Z")

</div>

> [@dons90;277166](#):
>
> Holy \*\*\*\*. How does one even create something on this scale? My god.

Well, that’s what I said about Minecraft. But now I am making a minecraft-like game in 2D (really the same difficulty, algorithms would just need some copy pasting for 3D).

---

<div class="post-metadata">

**Author:** ![Luftbauch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Luftbauch](https://forums.unrealengine.com/u/Luftbauch)\
**Post date:** [May 13, 2015, 6:01am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/191 "2015-05-13T06:01:18Z")

</div>

Wow, these blueprints let my head explode.

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [May 13, 2015, 8:28am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/192 "2015-05-13T08:28:22Z")

</div>

> [@Luftbauch;290820](#):
>
> Wow, these blueprints let my head explode.

Yeah, it can even be hard for me to go back into some of these systems without having touched them for a few months. I recently split the generator into a number of blueprints for each function, and now I am going through refactoring, combining variables into structs, etc. Hopefully making everything faster, more flexible, and more readable as I go.

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [May 14, 2015, 7:44pm UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/193 "2015-05-14T19:44:15Z")

</div>

@, mind elaborating on how you fixed the sphere warping (conversion from xyz to polar)? Definitely curious to hear what the problem was with your earlier screenshotted BP doing the conversion.

Looks awesome 🙂

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [May 15, 2015, 6:46am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/194 "2015-05-15T06:46:46Z")

</div>

> [@n00854180t;291948](#):
>
> @, mind elaborating on how you fixed the sphere warping (conversion from xyz to polar)? Definitely curious to hear what the problem was with your earlier screenshotted BP doing the conversion.
> 
> Looks awesome 🙂

I would love to explain that, if it had happened… 😛

Right now it is fairly accurate, but not perfect. I basically eyeballed the difference between the projected vector and the expected vector and found that I could add the player’s location(which also matches the center of the sphere projection) to the hit vector and divide by 2 to get pretty close to the correct flat vector.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/6/2e6a751e35d5f258a37fedad13f2f000fdc34dec.png)  
I have a couple ideas about what might be causing the remaining inaccuracy(need to flatten the player location before adding, need to ensure the Z is correctly zeroized, need to make sure the already high poly sphere is high poly enough for a smooth collision sphere surface, etc), but it was close enough for the time being. Needed a rest from that problem.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_06012f21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_06012f21](https://forums.unrealengine.com/u/anonymous_user_06012f21)\
**Post date:** [June 10, 2015, 4:26am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/195 "2015-06-10T04:26:58Z")

</div>

Great work!

Your system is amazing, . I’m astounded that you have done all of this in blueprint. I’ve just started using the Unreal Engine these past two weeks and am working on a hex based game. The information in your threads is invaluable. Thank you for all your hard work.

I have a few questions. I’m sorry if they are silly or if I have missed things that should be obvious; I’m still really new and a little overwhelmed at times with all the information I’ve been cramming in my head.

I am curious about how you are handling changes to underlying terrain. You say that you have been deleting each other instance and then respawning them.

> [@;167537](#):
>
> [http://img.photobucket.com/albums/v129/Decimatus/Answerhub/Map%20Generator%20V3/TileInstances.png](http://img.photobucket.com/albums/v129/Decimatus/Answerhub/Map%20Generator%20V3/TileInstances.png)
> 
> **Anytime I change an instance, such as cutting down a forest, each other instance in the map is deleted and respawned. This has been seamless even with tens of thousands of instances on the map.**
> 
> As you can see in the second of those 2 images, I use Enums to drive what tile is spawned at any given location. Each tile has information about sea level, precipitation, temperature, etc etc. Depending on the combination of that information, different tile types will spawn. For instance, a tile that is Land, Plains, Tropical, Wet, and a Lowland will spawn a Jungle over a Marsh. A tile that is Land, Hill, Tundra, Moderate, and Lowland will spawn a Boreal Forest on a Hill. When spawning the instances, it merely goes through a series of switches until it gets to the correct Add Instance node.

Is there a reason for deleting all of the other instances, or has this changed with the updates to the engine? From what I understand the ability to delete individual instances didn’t exist in older versions. I’m trying to make a map with destructible terrain and I’ll need to be able to change meshes on portions of my (hopefully large)map almost every turn if my ideas work.

I’m still thinking of ways to handle my data. I was thinking of creating a struct to handle all of the data for an individual hex then using a two dimensional array of said structs for axial coordinates. I’m not sure if that is going to be really inefficient compared to your method of using multiple arrays but I want my maps to have a variably sized hexagonal shape overall and don’t think I could implement your method of handling locations of hexes. I’ll post up a thread on my progress when I have something to show. Again, thank you for sharing what you’ve done, it has really helped me get a clearer direction on where I need to go.

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [June 10, 2015, 11:31am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/196 "2015-06-10T11:31:46Z")

</div>

> [@Dracomada;307604](#):
>
> Your system is amazing, . I’m astounded that you have done all of this in blueprint. I’ve just started using the Unreal Engine these past two weeks and am working on a hex based game. The information in your threads is invaluable. Thank you for all your hard work.

Thanks. 🙂

> [@Dracomada;307604](#):
>
> I have a few questions. I’m sorry if they are silly or if I have missed things that should be obvious; I’m still really new and a little overwhelmed at times with all the information I’ve been cramming in my head.
> 
> I am curious about how you are handling changes to underlying terrain. You say that you have been deleting each other instance and then respawning them. Is there a reason for deleting all of the other instances, or has this changed with the updates to the engine? From what I understand the ability to delete individual instances didn’t exist in older versions. I’m trying to make a map with destructible terrain and I’ll need to be able to change meshes on portions of my (hopefully large)map almost every turn if my ideas work.

Yeah when I first implemented the instancing the easiest method at the time was to just clear each instance reference and respawn everything. It was basically instantaneous, so it was good enough at the time.

I haven’t actually moved to a single instance update system, but it is on the near term to-do list. I recently compiled key tile information into a struct that holds the tile transform, the reference mesh, and the instance # among other useful tidbits. So, when it comes time to update, I will be able to make a single array call, get all the needed info, and update as necessary.

> [@Dracomada;307604](#):
>
> I’m still thinking of ways to handle my data. I was thinking of creating a struct to handle all of the data for an individual hex then using a two dimensional array of said structs for axial coordinates. I’m not sure if that is going to be really inefficient compared to your method of using multiple arrays but I want my maps to have a variably sized hexagonal shape overall and don’t think I could implement your method of handling locations of hexes. I’ll post up a thread on my progress when I have something to show. Again, thank you for sharing what you’ve done, it has really helped me get a clearer direction on where I need to go.

Using a single struct array is the way to go. When I started you couldn’t create structs in blueprint, and then when they implemented them, I wasn’t at a point where I wanted to go back and rewire everything.

Lately I have been going back struct-ifying things, but I am still hesitant to compile things into a struct early in the process when it isn’t needed. For instance, I don’t necessarily need the struct containing precipitation when I am generating tectonics. So for right now, a lot of things are being left alone in the generation, but then they are being compiled into a big tile info struct at the end.

I still have a lot of work to go through everything and create structs in places where it would save time. For instance, there are areas where 2+ arrays are called, which could otherwise be turned into a single struct array call. In the end, it may end up being best to just compile the struct from the get go.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_68a6f22f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_68a6f22f](https://forums.unrealengine.com/u/anonymous_user_68a6f22f)\
**Post date:** [July 23, 2015, 4:51pm UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/197 "2015-07-23T16:51:05Z")

</div>

Wow, really cool systems!

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [July 24, 2015, 7:49am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/198 "2015-07-24T07:49:00Z")

</div>

> [@BEFaughnan;338757](#):
>
> Wow, really cool systems!

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [September 3, 2015, 8:35pm UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/199 "2015-09-03T20:35:58Z")

</div>

My god. You are doing almost **exactly** what I need to do. Why are you not selling this? I’d give you my credit card in a heartbeat.

I’ll have to go through this with a fine tooth comb this weekend and see if I can learn from it.

---

<div class="post-metadata">

**Author:** ![Zeustiak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zeustiak](https://forums.unrealengine.com/u/Zeustiak)\
**Post date:** [September 4, 2015, 6:38am UTC](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745/200 "2015-09-04T06:38:44Z")

</div>

> [@Vanderbeck;371272](#):
>
> My god. You are doing almost **exactly** what I need to do. Why are you not selling this? I’d give you my credit card in a heartbeat.
> 
> I’ll have to go through this with a fine tooth comb this weekend and see if I can learn from it.

Well I seriously consider this to be a better map generation system that found in any other civ game and that isn’t something I would want to give away for a reasonable price. Besides, the amount of tech support I would have to provide would overwhelm me.

You may want to go through my earlier threads depending on your current level of knowledge. Things get pretty complicated so V3 may not be the best starting point.

I haven’t shown much progress lately(past 4 months) due to work and a near death experience, but in addition to what is shown here I have split the map generator blueprint into sub-blueprints for each function, put the generation on tick so it doesn’t freeze the game when you hit play, added some good UI elements with the help of JJ Franzen, and some other random stuff. Working on redoing the river system with pathfinding which should hopefully roll right into unit pathfinding.

What kind of game are you working on?

[Previous page](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745.md?page=9)

[Next page](https://forums.unrealengine.com/t/map-generator-3-0-please-critique/13745.md?page=11)
