Skip to main content

Frozen Snowflake

OCCT category icon with a stylized logo representation

❄️ Create an intricate frozen snowflake ornament using zigzag patterns between hexagons, advanced lofting techniques, and selective face extrusion! This tutorial demonstrates how to build complex organic shapes by combining multiple loft surfaces and extracting specific faces for detailed geometry.

The algorithm:

  1. Create hexagon wire pairs - two sets of concentric hexagons at different heights (y = 0.2 and y = 0)
  2. Generate zigzag patterns - create jagged wires between inner/outer hexagon pairs
  3. Scale zigzag wires - scale one pattern by 3x and another by 6x to create depth variation
  4. Create three loft surfaces - connect zigzag wires with smooth lofted surfaces
  5. Extract faces from lofts - decompose each loft surface into individual faces
  6. Filter specific faces - select every 2nd face from each loft for the spikey effect
  7. Extrude filtered faces - push selected faces outward to create 3D protrusions
  8. Create two compounds - group extruded faces into two sets with different materials
  9. Render with metallic materials - apply blue and cyan PBR materials for an icy appearance
Bitbybit Platform

Snowflake ornament

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"e80cdb6f2a431e95": {
"id": "e80cdb6f2a431e95",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 3
},
"inputs": {
"center": {
"connections": [
{
"node": "1185f8d207a3f82e",
"output": "result",
"data": {}
}
]
}
},
"position": [
223.890625,
310.51953125
]
},
"b3883706e0c58c9f": {
"id": "b3883706e0c58c9f",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 3.7
},
"inputs": {
"center": {
"connections": [
{
"node": "ad48f922ed47c3e2",
"output": "result",
"data": {}
}
]
}
},
"position": [
222.859375,
708.19921875
]
},
"8075b1389d37c96a": {
"id": "8075b1389d37c96a",
"name": "bitbybit.occt.shapes.wire.createZigZagBetweenTwoWires",
"customName": "zig zag between two wires",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"nrZigZags": 4,
"inverse": false,
"divideByEqualDistance": false,
"zigZagsPerEdge": true
},
"inputs": {
"wire1": {
"connections": [
{
"node": "e80cdb6f2a431e95",
"output": "result",
"data": {}
}
]
},
"wire2": {
"connections": [
{
"node": "b3883706e0c58c9f",
"output": "result",
"data": {}
}
]
},
"nrZigZags": {
"connections": [
{
"node": "f67582e9ca42c8a6",
"output": "result",
"data": {}
}
]
}
},
"position": [
1143.6196063316072,
458.42883100162123
]
},
"5a78940ae3ae81bf": {
"id": "5a78940ae3ae81bf",
"name": "bitbybit.occt.transforms.scale",
"customName": "scale",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"factor": 3
},
"inputs": {
"shape": {
"connections": [
{
"node": "8075b1389d37c96a",
"output": "result",
"data": {}
}
]
}
},
"position": [
1678.3054790399979,
315.35343739190205
]
},
"ff1794dca2b99779": {
"id": "ff1794dca2b99779",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "9beb7dcb04fa6f42",
"output": "result",
"data": {}
},
{
"node": "8075b1389d37c96a",
"output": "result",
"data": {}
},
{
"node": "5a78940ae3ae81bf",
"output": "result",
"data": {}
},
{
"node": "7d877c9750dedefe",
"output": "result",
"data": {}
}
]
}
},
"position": [
2246.534379113014,
714.9278109363955
]
},
"b7378baa676913a9": {
"id": "b7378baa676913a9",
"name": "bitbybit.occt.shapes.face.getFaces",
"customName": "get faces",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shape": {
"connections": [
{
"node": "0c4159e76b58d633",
"output": "result",
"data": {}
}
]
}
},
"position": [
3072.7181735710606,
-107.3755019687693
]
},
"ad48f922ed47c3e2": {
"id": "ad48f922ed47c3e2",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.2,
"z": 0
},
"inputs": {},
"position": [
-162.37221187003445,
747.7184658018467
]
},
"1185f8d207a3f82e": {
"id": "1185f8d207a3f82e",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.2,
"z": 0
},
"inputs": {},
"position": [
-252.94258547497708,
311.90388593601784
]
},
"9dd41f3330ad0fff": {
"id": "9dd41f3330ad0fff",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 2
},
"inputs": {},
"position": [
235.2104156475863,
1116.294670621434
]
},
"9beb7dcb04fa6f42": {
"id": "9beb7dcb04fa6f42",
"name": "bitbybit.occt.shapes.wire.createZigZagBetweenTwoWires",
"customName": "zig zag between two wires",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"nrZigZags": 4,
"inverse": false,
"divideByEqualDistance": false,
"zigZagsPerEdge": true
},
"inputs": {
"wire1": {
"connections": [
{
"node": "9dd41f3330ad0fff",
"output": "result",
"data": {}
}
]
},
"wire2": {
"connections": [
{
"node": "de72420ac9cadfc7",
"output": "result",
"data": {}
}
]
},
"nrZigZags": {
"connections": [
{
"node": "f67582e9ca42c8a6",
"output": "result",
"data": {}
}
]
}
},
"position": [
1145.0759404649393,
948.6945784133306
]
},
"de72420ac9cadfc7": {
"id": "de72420ac9cadfc7",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 6,
"radius": 2.5
},
"inputs": {},
"position": [
234.75634001881605,
1540.2366231866586
]
},
"7d877c9750dedefe": {
"id": "7d877c9750dedefe",
"name": "bitbybit.occt.transforms.scale",
"customName": "scale",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"factor": 6
},
"inputs": {
"shape": {
"connections": [
{
"node": "9beb7dcb04fa6f42",
"output": "result",
"data": {}
}
]
}
},
"position": [
1694.2801683982289,
963.7382210340952
]
},
"0c4159e76b58d633": {
"id": "0c4159e76b58d633",
"name": "bitbybit.occt.operations.loftAdvanced",
"customName": "loft advanced",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"makeSolid": false,
"closed": false,
"periodic": false,
"straight": true,
"nrPeriodicSections": 10,
"useSmoothing": false,
"maxUDegree": 3,
"tolerance": 1e-7,
"parType": "approxCentripetal"
},
"inputs": {
"shapes": {
"connections": [
{
"node": "ff1794dca2b99779",
"output": "list",
"data": {}
}
]
}
},
"position": [
2708.447723102907,
-104.23992507282833
]
},
"849b48485b173809": {
"id": "849b48485b173809",
"name": "bitbybit.lists.removeNthItem",
"customName": "remove nth item",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"nth": 2,
"offset": 1,
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "b7378baa676913a9",
"output": "result",
"data": {}
}
]
}
},
"position": [
3447.7421219811436,
-108.69127893785503
]
},
"735e266df2ec4cf2": {
"id": "735e266df2ec4cf2",
"name": "bitbybit.occt.operations.extrude",
"customName": "extrude",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"direction": [
0,
1,
0
]
},
"inputs": {
"shape": {
"connections": [
{
"node": "04cdeb3875ee9a50",
"output": "result",
"data": {}
}
]
}
},
"position": [
4205.480366859519,
-114.5636121542974
]
},
"faa67c56c26b00eb": {
"id": "faa67c56c26b00eb",
"name": "bitbybit.occt.transforms.translate",
"customName": "translate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"translation": [
0,
0,
0
]
},
"inputs": {
"shape": {
"connections": [
{
"node": "f2b028b1b290cc43",
"output": "result",
"data": {}
}
]
},
"translation": {
"connections": [
{
"node": "50b5bcf24783c2d0",
"output": "result",
"data": {}
}
]
}
},
"position": [
3678.039390687034,
841.1418147999855
]
},
"f2b028b1b290cc43": {
"id": "f2b028b1b290cc43",
"name": "bitbybit.occt.operations.loftAdvanced",
"customName": "loft advanced",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"makeSolid": false,
"closed": false,
"periodic": false,
"straight": true,
"nrPeriodicSections": 10,
"useSmoothing": false,
"maxUDegree": 3,
"tolerance": 1e-7,
"parType": "approxCentripetal"
},
"inputs": {
"shapes": {
"connections": [
{
"node": "fa37a24a00e9e039",
"output": "list",
"data": {}
}
]
}
},
"position": [
2708.0150410587903,
594.0054557471906
]
},
"50b5bcf24783c2d0": {
"id": "50b5bcf24783c2d0",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.3,
"z": 0
},
"inputs": {},
"position": [
3208.226060825467,
1001.0510781161385
]
},
"79f69312a516b971": {
"id": "79f69312a516b971",
"name": "bitbybit.occt.shapes.face.getFaces",
"customName": "get faces",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shape": {
"connections": [
{
"node": "faa67c56c26b00eb",
"output": "result",
"data": {}
}
]
}
},
"position": [
4092.994902626245,
907.0530327484794
]
},
"4695a402fdf6afd1": {
"id": "4695a402fdf6afd1",
"name": "bitbybit.lists.removeNthItem",
"customName": "remove nth item",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"nth": 2,
"offset": 0,
"clone": true
},
"inputs": {
"list": {
"connections": [
{
"node": "79f69312a516b971",
"output": "result",
"data": {}
},
{
"node": "ab072b3e3f027a3c",
"output": "result",
"data": {}
}
]
}
},
"position": [
4509.1843820805625,
1086.9670362367706
]
},
"b4138bacefb47375": {
"id": "b4138bacefb47375",
"name": "bitbybit.occt.operations.extrude",
"customName": "extrude",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"direction": [
0,
1,
0
]
},
"inputs": {
"direction": {
"connections": [
{
"node": "b886129aad2ed5f6",
"output": "result",
"data": {}
}
]
},
"shape": {
"connections": [
{
"node": "66e90d08acfea68b",
"output": "result",
"data": {}
}
]
}
},
"position": [
5351.011354362222,
1203.707202747882
]
},
"66e90d08acfea68b": {
"id": "66e90d08acfea68b",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "4695a402fdf6afd1",
"output": "result",
"data": {}
}
]
}
},
"position": [
4915.336005115206,
1124.9584323931854
]
},
"b886129aad2ed5f6": {
"id": "b886129aad2ed5f6",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0.3,
"z": 0
},
"inputs": {},
"position": [
4901.471907206477,
1372.2206605187941
]
},
"f67582e9ca42c8a6": {
"id": "f67582e9ca42c8a6",
"name": "bitbybit.math.numberSlider",
"customName": "number slider",
"data": {
"options": {
"min": 2,
"max": 5,
"step": 1,
"width": 350,
"updateOnDrag": false
},
"number": 5
},
"inputs": {},
"position": [
107.42804981132838,
-17.9636555623008
]
},
"fe6c5624fb703309": {
"id": "fe6c5624fb703309",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"options": {
"connections": [
{
"node": "d7263477e555ac17",
"output": "result",
"data": {}
}
]
},
"entity": {
"connections": [
{
"node": "362d9bf9cc3cb4d4",
"output": "result",
"data": {}
}
]
}
},
"position": [
5924.723449566433,
-111.53178530658113
]
},
"d7263477e555ac17": {
"id": "d7263477e555ac17",
"name": "bitbybit.draw.optionsOcctShapeMaterial",
"customName": "options occt shape material",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.01,
"drawEdges": false,
"edgeColour": "#ffffff",
"edgeWidth": 4
},
"inputs": {
"faceMaterial": {
"connections": [
{
"node": "8e33f6727b0706bb",
"output": "result",
"data": {}
}
]
}
},
"position": [
5486.94470128069,
156.23056701043086
]
},
"8e33f6727b0706bb": {
"id": "8e33f6727b0706bb",
"name": "bitbybit.babylon.material.pbrMetallicRoughness.create",
"customName": "pbr metallic roughness",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"name": "Custom Material",
"baseColor": "#94b4ff",
"emissiveColor": "#000000",
"metallic": 0.8,
"roughness": 0.2,
"alpha": 1,
"backFaceCulling": false,
"zOffset": 2
},
"inputs": {},
"position": [
5118.512257722949,
194.58498038781784
]
},
"fa37a24a00e9e039": {
"id": "fa37a24a00e9e039",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "7d877c9750dedefe",
"output": "result",
"data": {}
},
{
"node": "5a78940ae3ae81bf",
"output": "result",
"data": {}
}
]
}
},
"position": [
2241.129104922553,
896.0115541514479
]
},
"7de1706cdd750bf5": {
"id": "7de1706cdd750bf5",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "9beb7dcb04fa6f42",
"output": "result",
"data": {}
},
{
"node": "8075b1389d37c96a",
"output": "result",
"data": {}
}
]
}
},
"position": [
2235.6843003071995,
1077.9650153204825
]
},
"cd345a51b893f357": {
"id": "cd345a51b893f357",
"name": "bitbybit.occt.operations.loftAdvanced",
"customName": "loft advanced",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"makeSolid": false,
"closed": false,
"periodic": false,
"straight": true,
"nrPeriodicSections": 10,
"useSmoothing": false,
"maxUDegree": 3,
"tolerance": 1e-7,
"parType": "approxCentripetal"
},
"inputs": {
"shapes": {
"connections": [
{
"node": "7de1706cdd750bf5",
"output": "list",
"data": {}
}
]
}
},
"position": [
2709.313991949925,
1302.9969569747925
]
},
"385f313eaddac4e2": {
"id": "385f313eaddac4e2",
"name": "bitbybit.occt.transforms.translate",
"customName": "translate",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"translation": [
0,
0,
0
]
},
"inputs": {
"shape": {
"connections": [
{
"node": "cd345a51b893f357",
"output": "result",
"data": {}
}
]
}
},
"position": [
3670.6457956495497,
1266.3298042429847
]
},
"ab072b3e3f027a3c": {
"id": "ab072b3e3f027a3c",
"name": "bitbybit.occt.shapes.face.getFaces",
"customName": "get faces",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shape": {
"connections": [
{
"node": "385f313eaddac4e2",
"output": "result",
"data": {}
}
]
}
},
"position": [
4085.3186674463977,
1290.1892980768341
]
},
"98d98c391055bb28": {
"id": "98d98c391055bb28",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "b4138bacefb47375",
"output": "result",
"data": {}
}
]
}
},
"position": [
5729.299371583634,
1240.7771167032029
]
},
"362d9bf9cc3cb4d4": {
"id": "362d9bf9cc3cb4d4",
"name": "bitbybit.occt.shapes.compound.makeCompound",
"customName": "make compound",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shapes": {
"connections": [
{
"node": "acb0dd7668d380c5",
"output": "list",
"data": {}
}
]
}
},
"position": [
4961.545668209146,
-122.31719569645998
]
},
"272f0500401f4a00": {
"id": "272f0500401f4a00",
"name": "bitbybit.occt.shapes.compound.makeCompound",
"customName": "make compound",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shapes": {
"connections": [
{
"node": "98d98c391055bb28",
"output": "list",
"data": {}
}
]
}
},
"position": [
6107.978877130744,
1197.0619441137005
]
},
"9242ef5035943028": {
"id": "9242ef5035943028",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "272f0500401f4a00",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "590176fd8a13c6db",
"output": "result",
"data": {}
}
]
}
},
"position": [
6613.714741969893,
1192.5795174038262
]
},
"590176fd8a13c6db": {
"id": "590176fd8a13c6db",
"name": "bitbybit.draw.optionsOcctShapeMaterial",
"customName": "options occt shape material",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.01,
"drawEdges": false,
"edgeColour": "#ffffff",
"edgeWidth": 2
},
"inputs": {
"faceMaterial": {
"connections": [
{
"node": "b26de7648f7f1454",
"output": "result",
"data": {}
}
]
}
},
"position": [
6110.858628800067,
1474.248536407265
]
},
"b26de7648f7f1454": {
"id": "b26de7648f7f1454",
"name": "bitbybit.babylon.material.pbrMetallicRoughness.create",
"customName": "pbr metallic roughness",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"name": "Custom Material",
"baseColor": "#33ffc2",
"emissiveColor": "#000000",
"metallic": 0.8,
"roughness": 0.2,
"alpha": 1,
"backFaceCulling": false,
"zOffset": 0
},
"inputs": {},
"position": [
5730.1753562835,
1514.5514298621156
]
},
"4c222d1fffea0b26": {
"id": "4c222d1fffea0b26",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "fe6c5624fb703309",
"output": "result",
"data": {}
}
]
}
},
"position": [
6314.722918633292,
-71.48278221495036
]
},
"f93171cee29f0049": {
"id": "f93171cee29f0049",
"name": "bitbybit.advanced.navigation.zoomOn",
"customName": "zoom on",
"async": true,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"meshes": [],
"includeChildren": true,
"animationSpeed": 0.8,
"offset": -0.2,
"doNotUpdateMaxZ": true
},
"inputs": {
"meshes": {
"connections": [
{
"node": "4c222d1fffea0b26",
"output": "list",
"data": {}
}
]
}
},
"position": [
6694.456483050785,
-113.61952779763146
]
},
"04cdeb3875ee9a50": {
"id": "04cdeb3875ee9a50",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "849b48485b173809",
"output": "result",
"data": {}
}
]
}
},
"position": [
3832.0181812557166,
-76.42665207494241
]
},
"acb0dd7668d380c5": {
"id": "acb0dd7668d380c5",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "735e266df2ec4cf2",
"output": "result",
"data": {}
}
]
}
},
"position": [
4594.637545631506,
-77.03737187519735
]
},
"1c52e4db105a151a": {
"id": "1c52e4db105a151a",
"name": "bitbybit.babylon.scene.enableSkybox",
"customName": "enable skybox",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"skybox": "city",
"size": 1000,
"blur": 0.1,
"environmentIntensity": 0.7,
"hideSkybox": true
},
"inputs": {},
"position": [
314.5707100259427,
2120.3398542926925
]
}
}
}

How It Works

Hexagonal Foundation

The snowflake starts with two sets of concentric hexagons:

  • First set (y = 0.2): Inner radius 3.0, outer radius 3.7 - forms the main structure
  • Second set (y = 0.0): Inner radius 2.0, outer radius 2.5 - forms the base layer

All hexagons have 6 corners and are oriented with their normal pointing in the Y direction (upward).

Zigzag Pattern Generation

The createZigZagBetweenTwoWires operation creates jagged connecting patterns:

  • zigzag1: Connects between the first hexagon pair (radii 3.0 ↔ 3.7)
  • zigzag2: Connects between the second hexagon pair (radii 2.0 ↔ 2.5)
  • nrZigZags = 5: Creates 5 zigzag segments per edge (30 total around each hexagon)
  • zigZagsPerEdge = true: Distributes zigzags evenly across each of the 6 hexagon edges

Scaled Variations

To create depth and complexity:

  • zigzag1Scaled: The first zigzag pattern scaled 3x larger (radius ~9 to ~11.1)
  • zigzag2Scaled: The second zigzag pattern scaled 6x larger (radius ~12 to ~15)

This scaling creates dramatic size variation between inner and outer layers.

Advanced Lofting

Three loft surfaces are created using loftAdvanced with straight interpolation:

  1. loft1 (Main surface): Connects 4 wires in sequence: zigzag2 → zigzag1 → zigzag1Scaled → zigzag2Scaled

    • Creates a complex surface transitioning through all scale variations
    • Forms the central "crown" of the snowflake
  2. loft2 (Translated cap): Connects zigzag2Scaled → zigzag1Scaled

    • Translated 0.3 units upward along Y-axis
    • Forms the raised "tips" layer
  3. loft3 (Base): Connects zigzag2 → zigzag1

    • Remains at the base position
    • Forms the foundation structure

Selective Face Extraction

This is where the magic happens! Each loft surface is decomposed into its constituent faces, then filtered:

  • loft1 faces: Extract every 2nd face starting at offset 1 → creates the main spiky protrusions
  • loft2Translated faces: Extract every 2nd face starting at offset 0 → creates the raised end caps
  • loft3 faces: Extract every 2nd face starting at offset 0 → creates the base end caps

The getNthItem filtering creates the characteristic "every-other-spike" pattern that makes the snowflake look organic and complex rather than uniformly smooth.

Face Extrusion

All filtered faces are extruded 0.3 units along the Y-axis:

  • Main faces (from loft1): Form the central spiky structure
  • End faces (from loft2 & loft3): Form the raised and base caps

Each face becomes a 3D protrusion, creating the frozen, crystalline appearance.

Compound Organization

The extruded faces are organized into two compounds:

  • Compound 1: Main faces with blue metallic material (#94b4ff)
  • Compound 2: End cap faces with cyan metallic material (#33ffc2)

This two-tone approach adds visual interest and depth to the final rendering.

Customization ❄️

  • nrZigZags variable: Change from 5 to 3-7 for different spike density (fewer = chunkier spikes, more = finer detail)
  • Hexagon radii: Adjust the 3.0, 3.7, 2.0, 2.5 values to change the overall proportions
  • Scale factors: Modify the 3x and 6x scaling to adjust depth (try 2x and 4x for subtler effects, or 4x and 8x for dramatic)
  • Extrusion distance: Change 0.3 to adjust spike height (try 0.2 for subtle, 0.5 for dramatic)
  • Face filtering offset: Change the nth/offset parameters to select different faces
  • Materials: Experiment with different metallic/roughness values and colors for various ice effects

Technical Insights

Why Loft Advanced?

The loftAdvanced operation with straight: true creates ruled surfaces - straight lines connecting corresponding points on each wire. This creates sharp, geometric transitions perfect for crystalline structures rather than smooth organic curves.

The Power of Face Filtering

By extracting and extruding only specific faces (every 2nd one), we create:

  • Negative space: Gaps between protrusions that catch light and shadow
  • Geometric complexity: From simple lofts to intricate 3D structure
  • Performance optimization: Fewer faces to extrude than processing all faces

Compound vs Boolean Union

Unlike the frost-flower tutorial which uses boolean union, this design uses compounds:

  • Pros: Faster computation, preserves individual faces, allows multiple materials
  • Cons: Not a single unified solid (but perfect for visualization and decoration)

Rendering & Visualization Tips

  • Materials: The metallic PBR materials with high metallic (0.8) and low roughness (0.2) create realistic ice crystals
  • Colors: Blue (#94b4ff) and cyan (#33ffc2) evoke frozen water and winter themes
  • Lighting: The compound approach with different zOffsets creates depth in the rendering
  • Scale: The default size (~30 units) works well for visualization - adjust based on your scene
  • Camera: The complex geometry looks best when viewed from slightly above at an angle
  • Animation: Try rotating slowly around the Y-axis to show off the intricate spike patterns

Happy modeling! ❄️✨