0
$\begingroup$

I've got a basic cube and I would like to have different instances of objects for top vertices and bottom vertices. My idea is that I need to separate the cube and calculate which point is above which but I don't know how to achieve that using the geometry nodes. I know I can accomplish this using indexes or IDs but I need this to work even if the original cube is extruded which won't work with this method.

EDIT:

  1. Top/bottom in this question is meant as position on Z axis. The cube would be extruded only in X and Y axis.
  2. The object should be the frame of reference. I'm only planning to rotate it horizontally.
  3. There is no need to solve vertical (Z) extrusion.

What I want to achieve

Cube with different instances on vertices

What I have so far (missing the selection/boolean for vertices)

Geometry nodes setup

$\endgroup$
3
  • 1
    $\begingroup$ (1) Do you have some reference for orientation to identify what is "top" and what is "bottom" ? For example, are points with Z max "top" and points with Z min "bottom" ? (2) Is this reference in the world frame of reference (so "top" and "bottom" is changing when objects are rotated) or is it in the object frame of reference (so independent of any transformations in Object Mode) ? $\endgroup$ Commented May 31, 2024 at 10:37
  • $\begingroup$ and to clarify some more, do you intend to extrude the cube vertically? In which case, what do you want to happen to the vertices that are neither at the top nor at the bottom? $\endgroup$ Commented May 31, 2024 at 10:41
  • $\begingroup$ Edited with answers to your questions. I knew I was missing something. Thank you. $\endgroup$ Commented May 31, 2024 at 11:46

1 Answer 1

0
$\begingroup$

Assuming the origin is somewhere in the middle of the cube you can accomplish this easily by just checking if the verts are above/below the origin.

enter image description here

enter image description here

Need a bit more information on the use case to identify situations where this logic breaks. But solution will be some variation of this.

$\endgroup$
3
  • $\begingroup$ Thanks for this! This will suffice. I was going the long way and didn't know the comparison works compared to the original object instead of world coordinates. $\endgroup$ Commented May 31, 2024 at 13:39
  • $\begingroup$ I found that I would also need a way to manipulate the cube in Z axis and still have different instances on the vertices? Do you think it's possible? When trying this it makes the instance after a threshold just the one type if I change the Z coordinate. $\endgroup$ Commented May 31, 2024 at 16:32
  • $\begingroup$ Can you explain a bit more? What do you mean manipulate the cube on the Z-axis? $\endgroup$ Commented Jun 2, 2024 at 12:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.