11
$\begingroup$

I want to create a step pyramid. Not a smooth three dimensional triangle with five faces, but a pyramid with "steps", like this:

cool step pyramid

Requirements:

  • Creating the pyramid should be fast!
  • You should be able to control how many "steps" there are
  • No matter how big, the pyramid needs to be consistent, meaning all the steps have the same height and the distance between the inner corner to the outer corner of a step is the same
$\endgroup$
5
  • 5
    $\begingroup$ The "actual" pyramids you are likely referring to did not look like this. What we see today is the skeleton. $\endgroup$
    – pipe
    Commented Sep 16, 2018 at 8:27
  • $\begingroup$ @pipe Actually some of the earlier pyramids were step pyramids. Certain nations only knew how to do step pyramids to begin with, and didn't figure out how to slope them until later. E.g. The Pyramid of Djoser $\endgroup$
    – Pharap
    Commented Sep 16, 2018 at 10:47
  • 4
    $\begingroup$ @noClue Technically the "smooth 3-dimensional triangle" is the 'proper' pyramid. What you're asking for is a kind of step pyramid. $\endgroup$
    – Pharap
    Commented Sep 16, 2018 at 10:48
  • $\begingroup$ Guys... I think everyone will know what I actually meant. $\endgroup$
    – user18695
    Commented Sep 16, 2018 at 17:13
  • 2
    $\begingroup$ Actually, no, I didn’t—reading only the title, I absolutely thought you meant the mathematical figure properly referred to as “pyramid.” The current phrasing is misleading and unhelpful, and should be changed. I have suggested an edit along these lines. $\endgroup$
    – KRyan
    Commented Sep 17, 2018 at 0:20

5 Answers 5

23
$\begingroup$

There is a builtin addon for that, no need to reinvent the wheel. Under the User Preferences > Addons make sure Add Mesh : Extra Objects is active.

Then in the 3D View simply press Shift + A > Mesh > Extras > Step Pyramid

You can then adjust the builtin parameters as desired.

Animated screenshot of the add-on in action.

Only downside is that the addon seems to generate pyramids radially, hence a four sided pyramid seems by default rotated 45° about the Z axis in relation to world coordinates, it also is kind of destructive, in the sense that it can't easily be changed or its parameters adjusted after creation.

As mentioned by @batFINGER the Reduce Step By value needs to be twice the value of the Height parameter to obtain "square steps", where the riser matches the tread depth. Andrew Morton then clarified this is due to the reduction value being applied in relation to total base diameter, taking into account steps on both sides, rather than an absolute tread depth, thus apparently halved.

$\endgroup$
5
  • 1
    $\begingroup$ Crunching in 45 in for rotation z on creation is one way to "fast" fix. Could you elaborate on how to set reduce step size, eg how and why it needs to be 2x height for consistent step size? Suppose I've gone down the wheel re-invention path somewhat with answer. As mentioned for an irregular base bending the regular primitive whilst keeping insets consistent could prove difficult for some. $\endgroup$
    – batFINGER
    Commented Sep 16, 2018 at 7:28
  • $\begingroup$ Nice addon! Activating. $\endgroup$ Commented Sep 16, 2018 at 11:02
  • $\begingroup$ @batfinger I'll have to check on that later, not at the computer right now, never actually used this before this answer. Keeping insets consistent is a frequent problem I encounter too often when dealing with bezier curves bevel objects also. When the "curvature radius" is shorter than the section dimensions it leads to self intersections that are hard to deal with. $\endgroup$ Commented Sep 16, 2018 at 11:10
  • $\begingroup$ @batFINGER It's twice the height because there are ledges on both opposite sides. $\endgroup$ Commented Sep 16, 2018 at 12:11
  • $\begingroup$ @batFINGER I caved in to your pressure, details added $\endgroup$ Commented Sep 17, 2018 at 1:30
4
$\begingroup$

A bmesh solution

As an exercise wrote a bmesh script to take a single ngon mesh and make it a consistent pyramid with steps steps of size step_size.

I've used the the primitive plane add as a default ngon. Comment that part out, manually add any single ngon face object, select it, and run script in object mode.

Basically the script takes a face, makes the base (solidify), then insets and extrudes along the normal for each extra step of the pyramid. By no means the quickest way to do this, however for non-regular based pyramids produces solution which may be easier than editing from regular pyramid created using extra objects addon's stepped pyramid.

enter image description here Sample runs, on default plane, filled ngon circle, and arbitrary 6 sided ngon shaped mesh

import bpy
from mathutils import Vector
import bmesh

step_size = 0.1
steps = 10
# remove and make some single ngon active mesh object for arbitrary base
bpy.ops.mesh.primitive_plane_add()
context = bpy.context
ob = context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)
faces = bm.faces[:]
vec = step_size * faces[0].normal #* Vector((0, 0, 1))

# make the base
bmesh.ops.solidify(bm, geom=faces, thickness=step_size)
bmesh.ops.translate(bm, vec=vec, verts=bm.verts)
steps -= 1

for s in range(steps):
    bmesh.ops.inset_individual(bm, faces=faces, use_even_offset=True, thickness=step_size)
    ret = bmesh.ops.extrude_face_region(bm, geom=faces)
    faces = [f for f in ret['geom'] if isinstance(f, bmesh.types.BMFace)]
    verts=[v for v in ret['geom'] if isinstance(v, bmesh.types.BMVert)]
    bmesh.ops.translate(bm, vec=vec, verts=verts)

bm.to_mesh(me)
$\endgroup$
4
$\begingroup$

The simplest solution is probably the Remesh modifier:

  1. Create a simple pyramid out of five faces. You can do that by selecting the four vertices of the top face and merging them (Alt+M then select At Center).
  2. Add a Remesh modifier. Set Mode to Blocks.
  3. Increase Octree Depth until sufficient number of pyramid steps has been achieved or surpassed.
  4. Decrease Scale to reduce the number of steps.
  5. Apply the modifier, optionally tweak the object scale.

At this point, you already have a pyramid shape but its mesh is rather dense. To clean up the mesh:

  1. Switch to Edit Mode (Tab).
  2. Press Space and search for Limited Dissolve. This fixes vertical faces but it leaves horizontal faces with the wrong edges.
  3. G to Mesh > Clean Up > Split Concave Faces. This splits the horizontal surfaces in the way we want. Be sure to select all of the faces.
  4. Press Numpad 7 , Numpad 5 then 3 x Numpad 4 to switch to top-down view rotated 45 degrees.
  5. Box select the north and south slopes and press Space and search for Limited Dissolve again to remove unwanted edges.
  6. Repeat once again for the west and south slopes.

Now you can efficiently tweak the mesh. To remove the bottom step, select the bottom face, then press Ctrl + Num > X > Dissolve Vertices. Similarly for the top step.

$\endgroup$
3
$\begingroup$

You can do this by using an Array modifier and an Empty.

  1. Create a new cube, and scale it to the size of your step.

  2. Very important! Hit Ctrl > A (or the appropriate command on your operating system) and select Scale. This applies the scale so that the array modifier doesn't get confused.

  3. Switch over to the Modifiers tab in the Properties panel (looks like a wrench) and select Add Modifier. You should see one that says Array under Generate. Click that one.

  4. Create an Empty (Shift > A > Empty). It can be any one of the options you want, we will be able to delete it later. I selected a Cube.

  5. Move the empty object to where you want the offset of the step would be. I just set mine with an X and Y of 0, and then I set the Z to 1. That will be the offset each step will take.

  6. Scale the empty object to how you want the steps scaled. If you do not scale it, the array modifier will just place blocks upon blocks; you want steps. I scaled mine to 0.8 which looks pretty good in my opinion. Do NOT apply the scale! It is needed for the array modifier.

  7. Go back to the cube object and to the modifiers tab. Under Count uncheck Relative Offset and select Object Offset. Click the value box with the cube in it. It should show a list of objects. Select the Empty.

  8. Increase the count to the number of steps you want and you should see the pyramid! Adjust it to your liking.

  9. To permanently apply this to your object do this: Under the Array modifier click Apply. The modifier should disappear, but the object should seem unchanged. Now, you can delete the Empty.

  10. You are done! Following my own steps I got this:

enter image description here

Not exactly your picture but I'm sure by adjusting the values of the empty you can get something of equal likeness :)

$\endgroup$
5
  • 2
    $\begingroup$ This doesn't leave all steps with the same size... $\endgroup$ Commented Sep 15, 2018 at 23:40
  • $\begingroup$ Oops...I'm trying to fix that right now. I'm a beginner myself, every time I set the empty Z scale to 1 it looks weird $\endgroup$
    – sam1370
    Commented Sep 15, 2018 at 23:42
  • 2
    $\begingroup$ @Sam1370 The reason it gets weird, is that it scales down from the most recent one. So if you set the X and Y scales of the empty to 0.9, the first (not counting the original, which stays the same) will be 0.9, the second will be 0.9*0.9 = 0.81, the third will be 0.9*0.9*0.9 = 0.729 and so on. $\endgroup$
    – user27640
    Commented Sep 16, 2018 at 0:13
  • 2
    $\begingroup$ This would have been my way... It works fine if your array is in say, Z, and you scale the Empty S-Shift-Z in object mode. All the steps have equal depth - The array elements pick up the XY scale. ,,Maybe the OP wanted a manifold mesh, though? $\endgroup$
    – Robin Betts
    Commented Sep 16, 2018 at 0:30
  • $\begingroup$ @DuaneDibbley Got it, thanks. If anyone has a solution, please edit my answer. :) $\endgroup$
    – sam1370
    Commented Sep 16, 2018 at 1:30
1
$\begingroup$

If you want each step to set back the same distance and to rise the same height, 1 way I like

  1. Add a plane
  2. subdivide it into as many segments as you need.subdivided plane
  3. Extrude along the z axis a fixed distance. In the example, I use e.2Row 1
  4. deselect the outer ring of facesdeselect
  5. Repeat steps 3 and 4 until doneenter image description here

If you want to use a rectangle, then use edge loops rather than subdividing. You can have rectangular steps that way. You don't have to make each step the same height.

$\endgroup$
1
  • 1
    $\begingroup$ A faster way is to inset faces. 1) add a plane. 2) extrude. 3) inset. repeat steps 2 and 3 as desired. By using numerical values for the inset and extrude, you can precisely control the setback and height. This also creates fewer faces. $\endgroup$ Commented Sep 16, 2018 at 6:31

You must log in to answer this question.