C4D HexMap Script

Last Page Update: 10/04/2013

This is a small venture into C4D’s Python scripting (once again, to see ‘how stuff works’). The provided script will read in a hex map definition file, saved from my ‘HexMapCreator’ application and create an UV-mapped hex map object (and text info file) from it.

  • Place script ‘miko_CreateHex.py’ in C4D’s script folder (in my case, it is, like, C:\Users\miko\AppData\Roaming\MAXON\CINEMA…\library\scripts)
  • Place files ‘mymap.bmp’ (color bitmap for texturing) and ‘mymap_xz.txt’ (export from HexMapCreator) in a test folder (both files are needed for map object creation).
  • Create new empty C4D file and save to test folder (needed so the script knows where to look for the other files)
  • Run the Python script (e.g. start from script manager)
  • Along with the hex map object, an info file with center positions of the different map tiles will be created (‘Data_HexPos.txt’)

Although all this is rather tailored to my very personal needs, you might want to check the script and see if you could use parts of it for your own purposes. Note that I have chosen to create ’embossed’ tiles, which rises number of created polys.


(C4D Working Setup)

(Model import into Unity3D)

C4D_HexScript_Release_0.01.zip10/04/2013306 KBZipped C4D(R15) script and demo data files (miko_CreateHex.py, AutoHexMap.c4d, mymap.bmp, mymap_xz.txt)