Script: SkyMaterial Used With Control Flow

SkyMaterial Used With Control Flow picture
Type
Rete logo indicatorrete
Date Created
Sep 20, 2024, 1:32:07 PM
Last Edit Date
Sep 29, 2025, 12:46:28 PM

Project Information

To all romantics out there, in this script you can experience as many sunset and sunrise cycles as you want. We exposed BabylonJS SkyMaterial to our users

View Full Project

Script Code

{
  "id": "rete-v2-json",
  "nodes": {
    "7be04e94e40fdd82": {
      "id": "7be04e94e40fdd82",
      "name": "bitbybit.babylon.material.skyMaterial.create",
      "customName": "sky material",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "luminance": 1,
        "turbidity": 10,
        "rayleigh": 2,
        "mieCoefficient": 0.005,
        "mieDirectionalG": 0.8,
        "distance": 1000,
        "inclination": 0.4,
        "azimuth": 0.25,
        "useSunPosition": true,
        "up": [
          0,
          1,
          0
        ],
        "dithering": false
      },
      "inputs": {},
      "position": [
        3058.9464454179747,
        494.46704314721137
      ]
    },
    "8dc0c495a2487d44": {
      "id": "8dc0c495a2487d44",
      "name": "bitbybit.babylon.meshBuilder.createCube",
      "customName": "create cube",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "size": 1000,
        "sideOrientation": "backside",
        "enableShadows": false
      },
      "inputs": {},
      "position": [
        3795.4218975405865,
        43.126810379356016
      ]
    },
    "5941b8dc45d25b6f": {
      "id": "5941b8dc45d25b6f",
      "name": "bitbybit.babylon.mesh.setMaterial",
      "customName": "material",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "includeChildren": false
      },
      "inputs": {
        "babylonMesh": {
          "connections": [
            {
              "node": "8dc0c495a2487d44",
              "output": "result",
              "data": {}
            }
          ]
        },
        "material": {
          "connections": [
            {
              "node": "7be04e94e40fdd82",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        4425.370569670581,
        199.3434419457268
      ]
    },
    "f820848c44d829a6": {
      "id": "f820848c44d829a6",
      "name": "bitbybit.flow.actions.trigger",
      "customName": "trigger",
      "data": {},
      "inputs": {},
      "position": [
        3613.7390463881,
        1415.111094601114
      ]
    },
    "29e1e3d41cc86c2d": {
      "id": "29e1e3d41cc86c2d",
      "name": "bitbybit.flow.time.interval",
      "customName": "interval",
      "data": {
        "interval": 10,
        "expire": 0
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "f820848c44d829a6",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        3969.2017594957556,
        1372.4652194433568
      ]
    },
    "06d2eaf58af821fc": {
      "id": "06d2eaf58af821fc",
      "name": "bitbybit.point.rotatePointsCenterAxis",
      "customName": "rotate points center axis",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 1,
          "forceExecution": false
        },
        "angle": 180,
        "axis": [
          0,
          1,
          0
        ],
        "center": [
          0,
          0,
          0
        ]
      },
      "inputs": {
        "center": {
          "connections": [
            {
              "node": "217b539eef86fb5f",
              "output": "result",
              "data": {}
            }
          ]
        },
        "points": {
          "connections": [
            {
              "node": "c7793fe35121cc99",
              "output": "list",
              "data": {}
            }
          ]
        },
        "axis": {
          "connections": [
            {
              "node": "3b3104b6086588d2",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "0f843eabc4b64cf1",
              "output": "exec",
              "data": {}
            }
          ]
        },
        "angle": {
          "connections": [
            {
              "node": "0f843eabc4b64cf1",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        5289.207004839166,
        1109.4793606632668
      ]
    },
    "217b539eef86fb5f": {
      "id": "217b539eef86fb5f",
      "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,
        "z": 0
      },
      "inputs": {},
      "position": [
        4792.674743533806,
        1539.854446789858
      ]
    },
    "c7793fe35121cc99": {
      "id": "c7793fe35121cc99",
      "name": "bitbybit.lists.createList",
      "customName": "create list",
      "data": {},
      "inputs": {
        "listElements": {
          "connections": [
            {
              "node": "68864a46eb1339bc",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        4759.606297806304,
        965.1667250651433
      ]
    },
    "3b3104b6086588d2": {
      "id": "3b3104b6086588d2",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector XYZ",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 1,
        "y": 0.5,
        "z": 1
      },
      "inputs": {},
      "position": [
        4388.109620059349,
        1580.7849422368872
      ]
    },
    "0f843eabc4b64cf1": {
      "id": "0f843eabc4b64cf1",
      "name": "bitbybit.flow.counters.counterMinMax",
      "customName": "counter min max",
      "data": {
        "count": 0,
        "min": 0,
        "max": 360,
        "step": 0.1,
        "pulse": false,
        "end": false
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "29e1e3d41cc86c2d",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        4367.084306606389,
        1179.6624530908332
      ]
    },
    "da8beac463cf85f4": {
      "id": "da8beac463cf85f4",
      "name": "bitbybit.babylon.material.skyMaterial.setSunPosition",
      "customName": "set sun position",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "material": {
          "connections": [
            {
              "node": "7be04e94e40fdd82",
              "output": "result",
              "data": {}
            }
          ]
        },
        "sunPosition": {
          "connections": [
            {
              "node": "7da706264772ce21",
              "output": "item",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "06d2eaf58af821fc",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        6789.341963064462,
        486.1633467209875
      ]
    },
    "7da706264772ce21": {
      "id": "7da706264772ce21",
      "name": "bitbybit.lists.passThrough",
      "customName": "pass through",
      "data": {},
      "inputs": {
        "item": {
          "connections": [
            {
              "node": "06d2eaf58af821fc",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        5891.094409024766,
        833.864202127336
      ]
    },
    "68864a46eb1339bc": {
      "id": "68864a46eb1339bc",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector XYZ",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 100,
        "y": 0,
        "z": 100
      },
      "inputs": {},
      "position": [
        4350.030472635696,
        785.9195106548322
      ]
    },
    "0944ecf71c7a59fa": {
      "id": "0944ecf71c7a59fa",
      "name": "bitbybit.vector.neg",
      "customName": "neg",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "vector": {
          "connections": [
            {
              "node": "7da706264772ce21",
              "output": "item",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "06d2eaf58af821fc",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        6217.665339330244,
        1317.176644103481
      ]
    },
    "122a8eda462e7034": {
      "id": "122a8eda462e7034",
      "name": "bitbybit.babylon.scene.drawDirectionalLight",
      "customName": "directional light",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "direction": [
          -100,
          -100,
          -100
        ],
        "intensity": 3,
        "diffuse": "#ffffff",
        "specular": "#ffffff",
        "shadowGeneratorMapSize": 4000,
        "enableShadows": true,
        "shadowDarkness": 0,
        "shadowUsePercentageCloserFiltering": true,
        "shadowContactHardeningLightSizeUVRatio": 0.2,
        "shadowBias": 0.0001,
        "shadowNormalBias": 0.002,
        "shadowMaxZ": 1000,
        "shadowMinZ": 0
      },
      "inputs": {},
      "position": [
        6113.294329886416,
        1614.4306283234482
      ]
    },
    "1a4e3c7e79b13361": {
      "id": "1a4e3c7e79b13361",
      "name": "bitbybit.babylon.lights.shadowLight.setDirectionToTarget",
      "customName": "set target",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": true
        }
      },
      "inputs": {
        "shadowLight": {
          "connections": [
            {
              "node": "122a8eda462e7034",
              "output": "result",
              "data": {}
            }
          ]
        },
        "target": {
          "connections": [
            {
              "node": "5206928c78ff1085",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "0944ecf71c7a59fa",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        7109.154877801929,
        1584.7414869381291
      ]
    },
    "5206928c78ff1085": {
      "id": "5206928c78ff1085",
      "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,
        "z": 0
      },
      "inputs": {},
      "position": [
        6592.650543860851,
        1816.6894182256397
      ]
    },
    "bb05dd72b1fa35e2": {
      "id": "bb05dd72b1fa35e2",
      "name": "bitbybit.babylon.lights.shadowLight.setPosition",
      "customName": "set position",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": true
        }
      },
      "inputs": {
        "shadowLight": {
          "connections": [
            {
              "node": "122a8eda462e7034",
              "output": "result",
              "data": {}
            }
          ]
        },
        "position": {
          "connections": [
            {
              "node": "d70c1f75b50f8c9c",
              "output": "item",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "9bf7fe13ffe01250",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        7278.265593016184,
        1085.872647157343
      ]
    },
    "416078b42f61dc1b": {
      "id": "416078b42f61dc1b",
      "name": "bitbybit.occt.shapes.face.createCircleFace",
      "customName": "circle",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "radius": 15,
        "center": [
          0,
          0,
          0
        ],
        "direction": [
          0,
          1,
          0
        ]
      },
      "inputs": {},
      "position": [
        7569.643246367097,
        2643.5031557149427
      ]
    },
    "9bf7fe13ffe01250": {
      "id": "9bf7fe13ffe01250",
      "name": "bitbybit.vector.mul",
      "customName": "mul",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": true
        },
        "scalar": 0.5
      },
      "inputs": {
        "vector": {
          "connections": [
            {
              "node": "7da706264772ce21",
              "output": "item",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "06d2eaf58af821fc",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        6544.8205289652815,
        961.9863189096055
      ]
    },
    "d70c1f75b50f8c9c": {
      "id": "d70c1f75b50f8c9c",
      "name": "bitbybit.lists.passThrough",
      "customName": "pass through",
      "data": {},
      "inputs": {
        "item": {
          "connections": [
            {
              "node": "9bf7fe13ffe01250",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        6907.08169667109,
        1000.3942042134834
      ]
    },
    "73c83c875413ef2f": {
      "id": "73c83c875413ef2f",
      "name": "bitbybit.draw.drawAnyAsync",
      "customName": "draw async",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "options": {
          "connections": [
            {
              "node": "2e1ce3391ab098c8",
              "output": "result",
              "data": {}
            }
          ]
        },
        "entity": {
          "connections": [
            {
              "node": "378fa45de098f011",
              "output": "result",
              "data": {}
            },
            {
              "node": "416078b42f61dc1b",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        8133.319963195593,
        2553.2301977697193
      ]
    },
    "228d425b101e8b0c": {
      "id": "228d425b101e8b0c",
      "name": "bitbybit.draw.drawGridMesh",
      "customName": "draw grid",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "width": 400,
        "height": 400,
        "subdivisions": 10,
        "majorUnitFrequency": 10,
        "minorUnitVisibility": 0.45,
        "gridRatio": 0.5,
        "opacity": 0.5,
        "backFaceCulling": false,
        "mainColor": "#ffffff",
        "secondaryColor": "#ffffff"
      },
      "inputs": {},
      "position": [
        3107.9611900355562,
        1336.2493222471307
      ]
    },
    "adb2543184f2bef9": {
      "id": "adb2543184f2bef9",
      "name": "bitbybit.advanced.text3d.create",
      "customName": "create 3d text",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "text": "bitbybit.dev",
        "fontType": "Orbitron",
        "fontVariant": "Bold",
        "fontSize": 3,
        "height": 1,
        "rotation": 0,
        "origin": [
          0,
          0,
          0
        ],
        "direction": [
          0,
          1,
          0
        ],
        "originAlignment": "centerBottom"
      },
      "inputs": {
        "origin": {
          "connections": [
            {
              "node": "a32e9347ca3d7f2f",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        5844.480854101651,
        2412.2194737567947
      ]
    },
    "f3ff25717a6dddf9": {
      "id": "f3ff25717a6dddf9",
      "name": "bitbybit.advanced.text3d.getCompoundShape",
      "customName": "compound shape",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "model": {
          "connections": [
            {
              "node": "adb2543184f2bef9",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        6268.6829487323275,
        2373.1569974888944
      ]
    },
    "b25bbb48b9bbf0d3": {
      "id": "b25bbb48b9bbf0d3",
      "name": "bitbybit.occt.transforms.rotate",
      "customName": "rotate",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "axis": [
          0,
          0,
          1
        ],
        "angle": 180
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "f3ff25717a6dddf9",
              "output": "result",
              "data": {}
            }
          ]
        },
        "axis": {
          "connections": [
            {
              "node": "4c057aa0b33aa56c",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        6983.263204403608,
        2465.204601994721
      ]
    },
    "4c057aa0b33aa56c": {
      "id": "4c057aa0b33aa56c",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector XYZ",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 0,
        "y": 1,
        "z": 0
      },
      "inputs": {},
      "position": [
        6521.039058560117,
        2959.853348073175
      ]
    },
    "2e1ce3391ab098c8": {
      "id": "2e1ce3391ab098c8",
      "name": "bitbybit.draw.optionsOcctShapeMaterial",
      "customName": "occt shape with material",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "precision": 0.01,
        "drawEdges": true,
        "edgeColour": "#ffffff",
        "edgeWidth": 2
      },
      "inputs": {
        "faceMaterial": {
          "connections": [
            {
              "node": "804ac3029e33bc0a",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        7639.103106551666,
        3105.820034051425
      ]
    },
    "804ac3029e33bc0a": {
      "id": "804ac3029e33bc0a",
      "name": "bitbybit.babylon.material.pbrMetallicRoughness.create",
      "customName": "pbr material",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "name": "Custom Material",
        "baseColor": "#ffffff",
        "emissiveColor": "#000000",
        "metallic": 1,
        "roughness": 0.8,
        "alpha": 1,
        "backFaceCulling": false,
        "zOffset": 2
      },
      "inputs": {},
      "position": [
        7267.416131181116,
        3169.937583723263
      ]
    },
    "378fa45de098f011": {
      "id": "378fa45de098f011",
      "name": "bitbybit.occt.transforms.rotate",
      "customName": "rotate",
      "async": true,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "axis": [
          0,
          0,
          1
        ],
        "angle": -90
      },
      "inputs": {
        "shape": {
          "connections": [
            {
              "node": "b25bbb48b9bbf0d3",
              "output": "result",
              "data": {}
            }
          ]
        },
        "axis": {
          "connections": [
            {
              "node": "9d9c665467ecfc27",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        7580.062827421648,
        2275.509050706809
      ]
    },
    "9d9c665467ecfc27": {
      "id": "9d9c665467ecfc27",
      "name": "bitbybit.vector.vectorXYZ",
      "customName": "vector XYZ",
      "async": false,
      "drawable": true,
      "data": {
        "genericNodeData": {
          "hide": true,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        },
        "x": 1,
        "y": 0,
        "z": 0
      },
      "inputs": {},
      "position": [
        6983.438603388849,
        2129.1259239767523
      ]
    },
    "a32e9347ca3d7f2f": {
      "id": "a32e9347ca3d7f2f",
      "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,
        "z": -1
      },
      "inputs": {},
      "position": [
        5497.83949360413,
        2658.2234816269115
      ]
    },
    "bfadd6556d1ede00": {
      "id": "bfadd6556d1ede00",
      "name": "bitbybit.babylon.mesh.setRotation",
      "customName": "rotation",
      "async": false,
      "drawable": false,
      "data": {
        "genericNodeData": {
          "hide": false,
          "oneOnOne": false,
          "flatten": 0,
          "forceExecution": false
        }
      },
      "inputs": {
        "exec": {
          "connections": [
            {
              "node": "ba8afdd3b44f9488",
              "output": "exec",
              "data": {}
            }
          ]
        },
        "rotation": {
          "connections": [
            {
              "node": "ba8afdd3b44f9488",
              "output": "result",
              "data": {}
            }
          ]
        },
        "babylonMesh": {
          "connections": [
            {
              "node": "73c83c875413ef2f",
              "output": "result",
              "data": {}
            }
          ]
        }
      },
      "position": [
        8698.903271532561,
        1791.1037245280327
      ]
    },
    "ba8afdd3b44f9488": {
      "id": "ba8afdd3b44f9488",
      "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,
        "z": 0
      },
      "inputs": {
        "y": {
          "connections": [
            {
              "node": "0f843eabc4b64cf1",
              "output": "result",
              "data": {}
            }
          ]
        },
        "exec": {
          "connections": [
            {
              "node": "0f843eabc4b64cf1",
              "output": "exec",
              "data": {}
            }
          ]
        }
      },
      "position": [
        8109.081575140506,
        1762.523013852331
      ]
    }
  }
}
Plans & Pricing

Choose Your Plan

Editor plans for 3D development, API keys for server-side CAD algorithms

B2B

ENTERPRISE

Custom pricing

Custom software development, dedicated servers & CAD automation at scale.

CAD Automation & Software
  • Custom software development
  • Cloud CAD automation pipelines
  • 3D configurators (STEP & GLTF)
  • Batch export jobs
  • Custom algorithms & deployment
Infrastructure & Support
  • Custom compute allocation
  • Dedicated / VPS server tenants
  • Long-running computation jobs
  • Custom upload limits & overage
  • SLA & premium support