Truncated Octahedron

One of the space-filling polyhedra, the truncated octahedron, in addition to its capacity to… well… fill space without gaps, boasts as well some really pleasing looks and plenty of interesting properties. Today’s post presents a simple script for Unity 3D which allows to create a truncated octahedron in that environment using a couple of variations – flat/smooth shaded, solid and wireframe (with either MeshTopology.LineStrip or LineRenderer). Furthermore you can create an arbitrarily sized grid composed of truncated octahedrons in X, Y and Z directions. Not to reveal too much why I needed such functionality – it seems like a nice extension of hex strategy world maps to 3D 🙂 You will find the script in the usual UnityAssets repository on GitHub. Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *