3
$\begingroup$

I am trying to model regular polygons (triangle, square, pentagon, hexagon, etc.) with the edges made up of cylindrical rods, kind of like the bonds in a molecule. I can get the basic shape by working with a circle mesh and changing to the appropriate number of vertices, but would appreciate some help in changing the edges to cylindrical "bonds." An example of a folded hexagon that I am trying to model is shown below. Thank you!

enter image description here

$\endgroup$
2
  • $\begingroup$ Hello, I'm not sure to understand what it should look like. Have you tried to add a skin modifier then a subdivision modifier ? $\endgroup$ – Gorgious Jul 21 '20 at 15:02
  • $\begingroup$ Sorry for not being very clear. Just added an image of a folded hexagon. $\endgroup$ – Das Jul 21 '20 at 15:57
7
$\begingroup$

I think the easiest way to do this is to bevel a curve object.

Go to Blender Preferences > Add-ons. Type "extra" in the search bar, and activate the Add Curve: Extra Objects add-on by checking the box next to it.

enter image description here

Then in the 3D Viewport press Shift + a, choose Curve > Polygon and set the sides to 6.

In the Properties window, go to Object Data Properties > Bevel, and change the Depth value to give the curve thickness.

enter image description here

Then move and rotate the vertexes in Edit Mode to get the desired result.

enter image description here

If you want the corners to be less sharp and more rounded you can change the handle type of the selected vertices (from the original Vector) to Aligned. You can also use Vector and Aligned vertices together in one curve to get a more precise result.

enter image description here

EDIT:

Alternatively (which I quite stupidly didn't realize before) you can place Spheres to represent the atoms at the corners of the curve. If you would use a Hook modifier the curve would follow the position of the atom object.

Select the curve. Go into Edit Mode. Select a corner Vertex. Press Ctrl + S and choose Cursor to Selected. Go to object mode and Press Shift + A and choose a spherical object like Mesh > UV Sphere. (Press S to scale it down)

Now select the the sphere and Shift select the curve (in that order) so both are selected. Go into Edit model and select the curve vertex and press Ctrl + H and choose Hook to Selected object.

enter image description here

However if you choose to do this, you might want to parent the curve and all its atoms to an empty object, to be able to move the molecule (by moving the empty) without issues. (Add an empty, move it in the center of your molecule, select al the parts of the molecule, Shift select the empty, press Ctrl + P and choose Object(keep Transform). )

$\endgroup$
5
  • $\begingroup$ Ooops, you just beat me to it! I'll eave mine in, just for the differences. $\endgroup$ – Robin Betts Jul 21 '20 at 16:45
  • $\begingroup$ I didn't even realise the object should have spheres, but since it is about a scientific model of a molecule it makes sense of course. Also I think instancing the spheres is the easiest way to go. So +1 : ) Though the Hook modifier would allow different atoms to move with the curve vertices (I might edit my answer accordingly.) $\endgroup$ – Fjoersteller Jul 21 '20 at 17:12
  • $\begingroup$ Hooking! Good idea :) All depends on what OP needs to do with these models .. maybe we've both gone OTT $\endgroup$ – Robin Betts Jul 21 '20 at 17:19
  • $\begingroup$ Quite possibly, yes : ) $\endgroup$ – Fjoersteller Jul 21 '20 at 18:00
  • $\begingroup$ This is "super" helpful. Especially because I can now do this with or without the spheres for atoms depending on the model I am trying to make. I'll need the corners to be sharp rather than rounded but thank you for letting me know how to do either one. What a great community! $\endgroup$ – Das Jul 21 '20 at 18:39
4
$\begingroup$

One route would be via Curves (make them 2D, if your polygons are planar.)

  • Enable the shipped add-on 'Add Curve: Extra Objects' This will give you a polygonal curve option.
  • Create your polygon of choice, and (for the optional next part,) Shift D make a copy of it, and Header > Object menu > Convert that to a mesh.
  • In its geometry panel, ensure the original (if 2D) curve-polygon has no fill, and give it a bevel, of whatever resolution and thickness suits.

For the second part, you could take some of the tedium out of placing atoms on your polygons by:

  • In the Mesh copy, Object Properties tab > Relations panel > Instancing, set instancing to Vertex.
  • Create a sphere at the origin (pivot) of the original Curve-polygon You can hide that one, eventually.
  • Parent the sphere to the mesh copy. Duplicates should appear on the corners of the curve.
  • You can CtrlA the dupliverts, > Make Instances Real. Then you can scale them independently in Object mode.
  • You can give them independent materials by associating the materials with the Objects, rather than their Data, just under the materials list panel in the Materials tab.

enter image description here

Eventually, you could parent the atoms to their polygons / various polygons to one another so they move about together, or convert the whole lot to joined? meshes if you're going in that kind of direction.

$\endgroup$
3
$\begingroup$

Try using the Skin Modifier and the Subdivision surface modifier.
enter image description here

If you need more precise control over it, you can select all the vertices, hit E to extrude and then S to scale it a little bigger, and then select everything again, hit E, and extrude upward. You can then use the subdivision surface modifier to make the edges round, and select any edges you want to be sharp, press Shit+E and then drag the mouse out to create a sharp edge.

$\endgroup$
1
  • $\begingroup$ I don't know much about the skin modifier and never used it before. So this is a good chance to try it out. Looks like this is a useful one to know for some of my other projects as well. Thanks for suggesting this different approach. $\endgroup$ – Das Jul 21 '20 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.