Grid Creation Systems

Hi, glad to see you again :slight_smile: My question is, can your system be used as a randomizable “city” generator, if i have a collection of static meshes - buildings, or, possibly, actors - buildings. Not sure, maybe your asset is for other situations entirely.

All the grid cells locations are stored in an array. So if you want something that’s completely random, yes it’s simply a matter of getting random elements from said array and placing an actor or mesh component at that location. Here is an example scenario where we have 40 blocks randomly spawned on a 20x20 grid across a 400x400 sq units area:

And here’s another with 100 blocks:

From there you can take it and even randomize the buildings as well from a pool of mesh components or actors.

Thank you for answering! But… To be clear, this part “getting random elements from said array and placing an actor or mesh component at that location” - that is not a part of your plugin, do i understand right?

That’s not, but let me know if you’re interested. I’ll just share the screenshots with you.

For everyone interested - this asset is on -50% sale right now. You’re welcome.

Thanks for the shoutout, Juris. :smiley: Were you able to get the random cell configuration working for your project?

Hello! Currently i have experimental map, based on another grid generator, but - I also bought your asset now, to try, compare, combine, etc. Since now I have it, I would love to see those nodes screens you were using on spawning at random cells, that you mentioned previously. Thanks!
P.S.: on my Yotube couple of latest videos are around grid-generated city.

@Thunder_Owl Sure, you can follow these steps to get it up and running in your project:

  1. Create a child blueprint based on BP_GridCreator_Rectangle.
  2. Open the new blueprint and add the following function to it:


Just make sure to set the value of the Spawn Actor Class variable to the building class that you want to spawn.
  1. Finally, in the Event Begin Play, we’ll just remove the default grid visualization & instead call this new function.

And that’s all there is to it. Just drag the new blueprint into the level, maybe increase its Grid Count, press Play and you should have something similar to what I had shown in the earlier screenshots. You can change the final index of the For Loop to control how many randomized buildings are placed in the level.

I’ve not been active on social media lately, so I missed out on all the updates on Twitter & Youtube. Will check out the video after work.

Thank You for help! :slight_smile:

Happy to help :smiley:

Greetings, this looks rather useful, I was curious if altering the grid can happen in-Game? Also, if theres any retrieval and storage from and to c++?

Greetings to you as well, @Gyawaki . By altering the grid, did you have any example scenario in mind? As in what characteristic of the grid would you like to change?

As for C++, no this is completely powered by blueprints.

Hi there, I’m looking for something similar to the radial Array BP shown in this video: https://youtu.be/s7bJrqeDQCY Where I can set the number of actors, rotate them, etc. Is that something that exist in this product atm? Thank you ))

Oh I had not thought about adding a rotational modifier. That’s actually a pretty neat idea. So I will try it out and let you know.

As for the example, I believe he’s using static mesh components and not actors since we would have to wait till runtime to be able to spawn actors. Regardless, GCS supports spawning of both Instanced Static Mesh component in the editor or Actors at runtime. You can choose which one you want and specify the static mesh used for the former and actor class if its the later.

And yes, the number of entities in a 360 degree circle, number of concentric circles, the radius, etc can be specified directly from the editor as shown below:

Apart from that, if you want to use Actors instead of Instanced Static Meshes, you can find instructions for it here: https://forums.unrealengine.com/unreal-engine/marketplace/1659060-grid-creation-systems?p=1663271#post1663271

Alright, I got the rotation settings working. A new update has been submitted to the Marketplace with the modifications and you should be able for download it over the next few days. Here is a preview of the rotational configuration: https://www.youtube.com/watch?v=MaZ1NU8MQBk

The v1.6 update has gone live on the Marketplace.

New Features:

I. Added a new Hex Grid Generator:

The Grid Generator also comes up with basic utility functions that enable you to retrieve grid points at specified (x,y) indices:

  • GetIndicesOfGridCellsAt(X)
  • GetIndicesOfGridCellsAt(Y)
  • GetIndexOfGridCellAt(X&Y)

The v1.7 update has gone live on the Marketplace.

New Features:

I. Added support for runtime grid customization. Prior to this version, you could customize the grids in the editor, but it wasn’t possible to make any modifications to the grid structure during gameplay.

However, starting with this v1.7 edition, you will be able to customize your grids both in the level editor as well as at runtime. Once you have modified the grid count/size variables as per your requirements, just make sure to call the new “RefreshGrid” function. This will clear all existing grid data and rebuild the grid from the ground up again.

Additional Notes:

I. Search for Version1_7 in the blueprint editor to identify the new changes in this update.

1 Like

I just purchased this but after trying the sphere grid I am having some issues with the objects overlapping at the top.

I was hoping I could make a 100 by 100 grid as a sphere. Could you lead me in the right direction to do this?

Hi there, the sphere grid is based on the latitude/longitude system similar to what we use to define location coordinates for Earth. As a result, the grid points are always going to be more closely spaced as you move away from the equator towards the top or bottom. So I’m afraid if you define a 100x100 configuration with this grid it will always turn up like that.

You might be able to create a different type of grid system that could have even spacing close to the poles (except just one at the north and south pole) as well as the equator but then that won’t be a 100x100 grid. In that scenario, near the poles, you might have say 5 grid points on a plane but at the equator maybe around 100 grid points. If this is what you want, then you should be able to do it by taking the BP_GridCreator_Circle grid configuration and modifying it to create several circles starting from the equator towards the top and bottom but with decreasing radius. In this case, the grid spacing will always be the same. Let me know if you have any doubts regarding that.

Yes I assume creating multiple circles would do the trick… However it would take a lot of work, rather than just generating it and it might not all line up properly. Because the option you have “Mesh Rotation Type” being “Face Grid Origin” with a rotation of 90 degrees I am able to follow the sphere with a plane very nicely.

Essentially the goal is to create a sphere made of hexagons looking much like a soccer ball.