16 votes
Author Name: 
Vojtech Cada

Hexagon pattern primitive. The size of individual hexagons is driven by a texture map. Map colors can also be saved to vertex color channel.

Additional Info: 

Installation: Copy the .ms file to your scripts\startup folder or run as a script if you want to try it out first. The object primitive will be available under Examples in the Create panel.

Usage: After assigning a bitmap, use the button to put it in the first slot of Compact Material Editor. Attributes such as tiling, offset and output levels/curve will only be applied when the bitmap is inside another map - let's say Output.

hexGrid.ms4.04 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rachka's picture

Great script

This is great! It will be the greatest if as jennymc said, it can use a custom shape.

onyxlee's picture

Works great in Max 2021

Such a great script. If you simply drag it to max 2021, it won't show up under Create -> Example. You have to copy it to scripts -> startup and then restart Max, then you will see it.
Thanks again for such a great tool!

jennymc's picture

custom shape suggestion

very very nice script @Swordslayer and wonderful update @Ariel_G.

One more suggestion and it might be productive too, if there will be ""custom shape selection"" option it will be nice to make amazing patterns. would someone consider adding this option. thanks

PolyTools3D's picture

Clean and efficient. Great work!

Clean and efficient. Great work!

I can confirm that when you an animate a texture parameter it does not update on Max <2016. There is no call to the "buildMesh" event in version prior to 2016. Perhaps a bug in earlier versions that was fixed in 2016.

You can work around it by simply adding a key to any of the other parameters of the plugin.

Gap parameter (add by Ariel_G), but I would change the tile size instead of the gap, which makes the amount of tiles change.

All other additions made by Ariel_G are very nice too.

Personal Opinion:
When you select "Irregular" I would disable the DropDown menu. Perhaps it should be "Custom" instead?
Additionally I would set the minimum range of the "Gap Offset" to 0. I accidentally did set it to -2 or -3 and Max crashed.

Minor typo fixes:
Ngon Sides -> NGon Sides:
Rotate -> Rotation:
Gap Offser – Gap Offset:

Atelier Bump's picture

Ngon grid


I hope you don't mind. I've modified your script a little bit to add some more control parameters and n-sided polygons option.
NOTE: animation not tested

hexagon_grid_ngons.ms 5.33 KB
luxxeon's picture

Very useful.

Although I have used other scripts to create hexagon grids, this one is by far the most versatile, and interesting. Very good work here. I will certainly find many uses for it in my workflow. Thanks.

GFH's picture

Only in 2016

Previous releases don't update as you scrub the timeline.

lightcube's picture

That's odd. I tested with an

That's odd. I tested with an animated procedural texture yesterday and it did not update the geometry as the timeline changed. I'll test again later today.


Shawn Olson

Developer of Wall Worm

Swordslayer's picture

It works with any texture

It works with any texture map, which means it already works with animated textures. When assinging image sequence, check the sequence checkbox - that's it.

Nik's picture

Great! +1

And very concise code!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.