{"record":{"id":"32190e0e9ccbbab1","repo":"remotion-dev/remotion","slug":"combined-1d-and-3d-luts-are-not-supported","errorCode":null,"errorMessage":"Combined 1D and 3D LUTs are not supported.","messagePattern":"Combined 1D and 3D LUTs are not supported\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/helpers/cube-lut.ts","lineNumber":52,"sourceCode":"\t\t\tif (offset > 0) {\n\t\t\t\tthrow new Error(`LUT header after color data on line ${index + 1}.`);\n\t\t\t}\n\n\t\t\tif (headers.has(keyword)) {\n\t\t\t\tthrow new Error(`Duplicate ${keyword} on line ${index + 1}.`);\n\t\t\t}\n\n\t\t\theaders.add(keyword);\n\t\t}\n\n\t\tif (keyword === 'TITLE' && titleMatch) {\n\t\t\ttitle = titleMatch[1];\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (keyword === 'LUT_1D_SIZE' || keyword === 'LUT_3D_SIZE') {\n\t\t\tif (type !== null) {\n\t\t\t\tthrow new Error('Combined 1D and 3D LUTs are not supported.');\n\t\t\t}\n\n\t\t\ttype = keyword === 'LUT_1D_SIZE' ? '1d' : '3d';\n\t\t\tsize = numbers[0];\n\t\t\tconst maxSize = type === '1d' ? 65536 : 256;\n\t\t\tif (\n\t\t\t\tnumbers.length !== 1 ||\n\t\t\t\t!Number.isInteger(size) ||\n\t\t\t\tsize < 2 ||\n\t\t\t\tsize > maxSize\n\t\t\t) {\n\t\t\t\tthrow new Error(`${keyword} must be an integer from 2 to ${maxSize}.`);\n\t\t\t}\n\n\t\t\tdata = new Float32Array((type === '1d' ? size : size ** 3) * 3);\n\t\t\tcontinue;\n\t\t}\n","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/studio/src/helpers/cube-lut.ts#L34-L70","documentation":"Thrown by the Studio's own cube-lut helper while scanning .cube headers: a valid .cube file must declare exactly one of LUT_1D_SIZE or LUT_3D_SIZE, defining the LUT type. The parser keeps a `type` variable, and this error fires when a size keyword for the other type appears after a type has already been established (e.g. both LUT_1D_SIZE and LUT_3D_SIZE present). It means the LUT file mixes 1D and 3D table declarations, which the parser does not support; the fix is to supply a LUT file that is purely 1D or purely 3D.","triggerScenarios":"Loading a .cube file containing both LUT_1D_SIZE and LUT_3D_SIZE keywords.","commonSituations":"Hand-merged LUT files combining a 1D shaper and 3D table into one file; converters that emit both sections; editing mistakes.","solutions":["Split the file into separate 1D and 3D .cube LUTs and load them independently.","Remove the size keyword that does not match the intended LUT type.","Re-export the LUT with only one of LUT_1D_SIZE or LUT_3D_SIZE.","Use a LUT tool that converts combined shaper+3D LUTs into a single 3D LUT."],"exampleFix":"// before\nLUT_1D_SIZE 32\nLUT_3D_SIZE 2\n// after\nLUT_3D_SIZE 2","handlingStrategy":"validation","validationCode":"const sizes = text.match(/^LUT_(1D|3D)_SIZE.*$/gm) || [];\nif (new Set(sizes.map((s) => s.split('_')[1])).size > 1) throw new Error('Combined 1D and 3D LUT');","typeGuard":"null","tryCatchPattern":"try {\n  parseCubeLut(text);\n} catch (err) {\n  if (err.message.includes('Combined 1D and 3D')) {\n    // split file into two LUTs or pick one type\n  }\n}","preventionTips":["Keep 1D shaper and 3D table LUTs in separate files","Inspect size keywords before loading","Use converters that emit single-type .cube files"],"tags":["lut","parsing","validation"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}