I am trying to generate a crystal structure wich is basically a repetitipn of objects in a set manner. I am using the nodes as attached: enter image description here

As shown in the images below, in this setup what I am aiming for is when I set a value (n) for "core x-dimension", "core y-dimension" or "core thickness" I am expecting to have n yellow spheres kinda sandwiched between n+1 white spheres. This is working for numbers up to 61. But at 62 the number of white spheres become n+3 (instead of n+1) and number of yellow spheres remain n. This behaviour repats itself for other multiples of 62 (124, 168, 248 etc). Above 62 the number of white spheres go with n+3 (instead of n+1) and number of yellow spheres go with n+2 (instead of n) enter image description here enter image description here
enter image description here

Blender file:

What is the reason for this anomally, any idea?

  • $\begingroup$ Hello and welcome. Please use a title that matches the content of the post. It should read like a question, be descriptive but succinct, unique and identifying, summarizing the problem so that anyone searching for similar issues is likely to find this. Remove anything superfluous, avoid using words like "this", "help with", "issue" or "question about", instead describe what "it" is. Remember, your title is the first thing visitors see, answers you get depend heavily on it. See What is the problem of asking “How do I do this?" $\endgroup$ Commented May 20 at 16:52
  • $\begingroup$ You mention thickness.. is this packing what you're looking for ? $\endgroup$
    – Robin Betts
    Commented May 21 at 8:43
  • $\begingroup$ pls provide blend file so we can check it out and don't have to rebuild it manually. thx for your understanding. $\endgroup$
    – Chris
    Commented May 21 at 8:55
  • $\begingroup$ It would really be better if you would provide a file. Just a few things I instantly wonder: why are you using multiple Combine XYZ nodes on the leftt when they all just combine the same three values? Or are those varying combinations? Because it is really not easy to see where exactly the connections are going. $\endgroup$ Commented May 21 at 9:43
  • $\begingroup$ Here is the link for my file: (blend-exchange.com/b/WO4l0p4L) $\endgroup$ Commented May 22 at 19:18

1 Answer 1


It is all a matter of values which you are combining. Since you use a Volume Cube instead of something simple like a Mesh > Grid for example which lets you exactly define where the points are, it is depending on the varying Min/Max values, the volume's Resolution X/Y/Z and the Spacing of the Distribute Points in Volume node.

This is what it looks like with your values when you set the Y dimension to 62:


But when you change some of your values, like in the example below where I increase the Resolution for the Volume Cube nodes from 32 to 48 (but actually even 33 would be okay) then it works fine:

changed resolution

You could also decrease the resolution and find values where it works, it's not necessarily needed to have a higher resolution. And as I mention in the beginning, it is not a single thing, it's the combination of values. So even if you would leave the Resolution at 32, changing the Spacing for the Distribute Points in Volume nodes can help too, here in the next example I've changed it from 0.2 to 0.15:

changed spacing

As before, other values would work too, for example 0.3 for the Spacing. The reason for this behaviour is, when changing the dimensions, resolution, spacing etc. this results in values which then have to be rounded in one way or another because there can only be an integer number of objects been placed. And when the combinations do not mathc very well, this odd behaviour will occur.

And although I showed you other values that worked, the thing is you will always risk using values which might work in one case, but not in another.

So I would do it with a fixed grid for distributing the objects. In my example below I'm using a mesh primitive Grid with the X and Y dimensions as Vertices X and Vertices Y and the Size X = Spacing × (X dimension - 1) and Size Y = Spacing × (Y dimension - 1). This grid I instance on a vertical Mesh Line with the Thickness as Count and a Z offset given by the Spacing.

On these grid instances I place the red spheres with an Instance on Points node, I also use the grids to instance cubes on them, for the size I use the Spacing. To avoid duplicate points I then have to realize the instances and then Merge By Distance. Then I take another Instance on Points node to place the white spheres on the corners of the cubes.

The "start location" frame can be ignored if you do not need to center the resulting sphere grid vertically. Perhaps there is an even easier way to create this.

molecule grid

  • $\begingroup$ Thank you for your detailed explanation Gordon. I am trying to achieve to generate multiple so called heterostructures. You can understand if you look into the following blender file of mine: (blend-exchange.com/b/GL6LMJ3v) One difference with your result and mine is that white spheres are sitting in every cavity generated by 4 red spheres. But white spheres should skip one neighbour position. I achieved it with Checker Texture node. But most probably I can do the same for this one aswell. Not sure if I can arrange it to work in z direction but that can be resolved I guess. $\endgroup$ Commented May 22 at 19:45
  • $\begingroup$ @FurkanIşık I'm not at a PC so cannot look into your file, your question said nothing about skipping positions... it says "n yellow spheres sandwiched by n+1 white spheres", in my file it's n red spheres sandwiched by n+1 white spheres so it seemed to be correct to me (apart from the color 😉). Maybe I have time to look into your file tomorrow. $\endgroup$ Commented May 22 at 20:31
  • $\begingroup$ No no, I just sent it to explain it better, of course I do not ask you to solve it for me. I just was curious if your method is compatible with my task. That's it. Like I said I appreciate what you have done for me already. Cheers! $\endgroup$ Commented May 22 at 21:21
  • $\begingroup$ @FurkanIşık: just ask a new question - you can open as many questions as you want here $\endgroup$
    – Chris
    Commented May 23 at 4:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .