I have been trying to follow some tutorials on arranging an instance cube procedurally using blueprints.
So far I have only managed to create the bottom 9x9 grid and I’m getting lost with how to construct the other tiers of the pyramid.
I am new to using the blueprints and I am trying to replicate the attached image made in Blender.
Does anyone have any ideas on how to create the other tiers. 7x7_5x5_3x3_1
Eventually I would like to be able to create the pyramid using seeds and for it to be missing cubes in places like in the Blender Image.
Here’s my take on it:
The weighted bool allows you to skip blocks.
Unlike ClockworkOcean’s, mine does not build the tip
These are both fantastic answers. Thanks Guys.
I don’t know which method will be best yet
Ive decided to first test @ClockworkOcean to see if I can replicate and expand on what I’m trying to achieve.
How did you get the location node inputs onto the “Add static mesh component”?
The end result I’m trying to achieve would hopefully look as pictured above.
I already have the Pink cube as a destructible mesh and the glass cube as a blueprint (this changes material when the character collides with it).
These are the blocks I would like to spawn at random around the blue center core of the Pyramid.
The Blue core will not move or destruct at all. Just fine as static cubes. Can I remove blocks from the spawning Pyramid to allow room for the blue static blocks?
Thanks for your help.
Sorry if this is getting really deep.
Just right click on the transform pin and choose ‘split pin’, then do it again on the location pin.
You’ll notice I chose to spawn depending on a random number. You can decide what kind of cube to spawn depending on your X and Y parameters.
So I have been trying to decipher what you constructed. The ‘random float’ numbers I now know effect the construction although I’m not sure about the ‘>’ tab above them.
When you say about deciding which cube to spawn depending on the X + Y parameters. I can only guess something has to happen where the green wires are?
The only way I have gotten a different cube in so far is like the image below. Although that fills all the gaps back in again
The randdom node generates numbers between 0 and 1. I’m saying if that number is > than .25, make then cube. In other words cubes have a 75% chance of begin drawn.
You can say, if the random number is between 0 and .3 ( for instance ), then spawn a glass cube, otherwise spawn a normal one.
Or you could split the 0-1 range into 3 and draw 3 different types of cube.
Yes, your problem here is that you’re always spawning a cube. You need to break the range into 3 parts and make a decision.
I understand what you are saying, however in practice I still have trouble with the node setups.
Are you ok to scribble some notes onto my screen capture? I don’t know where to be adding and connecting things.
So I redid it a bit. Used a random int instead of float, easier to pick from an array. The array looks like this:
The difference in BP is:
That looks great although I would only want around 5-10% of the glass blocks. I have tried to use your technique to limit the amount of glass blocks.
Pretty sure I haven’t gone about it the best way but I have attached an image to show my working.
You could try it like so:
There are just the 2 types of blocks that make up the Pyramid. I tried to insert them into the mesh variable but it wouldn’t take either of the blocks.
That looks good, 1/12 chance of being glass.
That has worked really well!
Instead of a basic block in the 90% chance of spawn I’ve been trying to use a destructible mesh I created. Although It doesnt want to be connected to the ‘Select’ tab.
I did try converting the ‘False’ to a number of destructible variables but I still had no luck.
We can’t have a Static Mesh Component & Destructible Mesh Component in the select node, you’d need to Branch it like so:
The other Select nodes are optional unless you need multiple static / destructible meshes, ofc.
They are independent. How are you applying damage?
Is there a way I can make them independent of each other? Would an instance work?
They all seem to crumble at once.
I found what the problem was. I had ‘enable impact’ ticked in the destructible mesh settings.