Procedural Randomization

Hi all,

I am new to BP and I am looking for some advice on how to create some procedural meshes. I have successfully created the first part. I have imported 6 buildings ( as one mesh not 6 individual meshes) and I have created a BP to generate it on the X,Y. As you can see it looks very repetitive.

How would I go about making something that would shuffle the order of the meshes? Is that possible?

Any help would be appreciated.

Thanks
Alex

By far the easiest way is to re-import as separate meshes, then the blueprint is easy…

Yes I have come to the conclusion that’s a better way to approach it. Although I still cant figure out how to do it.

Each mesh as it’s own BP. Procedural Bldg BP would randomly select a bldg bp from a list and spawn it. Use the bounds of the first mesh as a location guide.

A more complex approach would be to have each Bldg BP use an HISM component. Then instead of spawning BP’s you’d add an HISM instance to the match bldg bp. You’d need an extensive config for this.

Only one BP, which will randomly decide which mesh to spawn.

Thanks guys. I need to do some research into your suggestions. Being that I have never used BP before its a bit overwhelming right now.

Just get the meshes read in separately, I’ll show you a bit of BP to use…

appreciate that. I do have the meshes imported separately now.

Right. Make an actor BP, one variable, which is an array of type static mesh. Also give the BP a static mesh component, like this:

In the construction script:

That’s it!

random mesh

Hmm seems doable. Let me ask in the static mesh is that where I would define the number of buidlings…A,b,C etc?

Like this:

you can also put this on the end of the script to get random Z angle ( in 90s )

awesome. Thank you! I will work on this later this afternoon. Will let you know how it goes.

Alex

1 Like

I was looking at each bldg as a prefab vs a single static mesh.

1 Like

why cant I find the Set static Mesh function?

Drag & drop Static Mesh Component reference into the graph (from the Components panel) , drag a wire and search for what you need.

Nodes are context sensitive, while what you ask should still pop up in a regular search, not everything does.

I actually did that but its not giving me the same thing.

You mean this:

Or what are we doing?

I am dragging the static Mesh variable that I made. I do not have a static mesh where you are grabbing from. Should I?

Could you show a screenshot of what you’re doing? There should be no need to manually create variables. But if you created a variable to reference a static mesh, you can set it directly in the details panels:

Also, since we’re talking about random grid gen, consider taking this 2D Grid Execution node for a spin at some point: