Home › Forums › General Questions › Overall Saturation in the scene
- This topic has 5 replies, 4 voices, and was last updated 3 days, 23 hours ago by
xeon.
-
AuthorPosts
-
2025-03-26 at 11:24 am #80900
gf3d
CustomerHi Guys,
is there a way to correct the overall Saturation in a Scene by Puzzles or Coding….
If so pls. let me know how that can be achieved
Greets
Ger
2025-03-26 at 2:55 pm #80914kdv
Participanthttps://threejs.org/examples/?q=color#webgl_postprocessing_3dlut
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2025-03-26 at 3:11 pm #80915gf3d
CustomerThank you kdv……its good to know that its possible….
But since i´m not a coder…and the solution seems to be coding…..
Question…..?
Where to code what in wich File…(I assume its the Visual Logic file)
Thanks
Ger
2025-03-26 at 11:08 pm #80923kvdml
CustomerDouble post, sorry
`-
This reply was modified 3 days, 23 hours ago by
kvdml. Reason: Double post
2025-03-26 at 11:11 pm #80924kvdml
CustomerFound this in an old project I did two years ago:
Open your verge3d’s project js file (not visual_logic.js but projectname.js)1.
On top, after ‘use strict’: add thisimport { LUTPass } from "./modules/LUTPass/LUTPass.js"; import { LUTCubeLoader } from "./modules/LUTPass/LUTCubeLoader.js"; import { LUT3dlLoader } from "./modules/LUTPass/LUT3dlLoader.js"; import GUI from "lil-gui"; const lutsMap = { "name_of_your_cube_file.CUBE": null, };
2. Further down, in createApp(){}, before loadScene() add this:
Object.keys(lutsMap).forEach((name) => { if (/\.cube$/i.test(name)) { new LUTCubeLoader().load("luts/" + name, (result) => { fillLutsMap(name, result, true); }); } else { new LUT3dlLoader().load("luts/" + name, (result) => { fillLutsMap(name, result, false); }); } }); function fillLutsMap(name, result, isCube) { delete lutsMap[name]; if (isCube && result.title == "Untitled") { result.title = name.replace(/.cube/i, ""); const idx = name.indexOf(" "); if (idx > 0) result.title = result.title.slice(0, idx); } else if (!result.title) result.title = name.replace(".3dl", ""); lutsMap[result.title] = result; }
3. Then towards the end of the file, search runcode(),
Put this inside the function:
(I left out the GUI and the webgl2 fallback, if you need the gui, look up the code in the threejs module)if (!app.postprocessing) app.enablePostprocessing([]); const params = { enabled: false, lut: "name_of_your_cube_file", intensity: 0, use2DLut: false, }; const lutPass = new LUTPass(); app.postprocessing.composer.addPass(lutPass); setLutPassTexture(); function setLutPassTexture() { if (lutsMap[params.lut]) { const lut = lutsMap[params.lut]; lutPass.lut = params.use2DLut ? lut.texture : lut.texture3D; } }
Files needed:
Make a directory ‘modules’ in the root, make a LUtPass directory there, add the three js files from the lutfiles modules
Put your CUBE file in the directory you set in point 2 (‘luts/)2025-03-26 at 11:26 pm #80929xeon
Customergf3d…did you happen to test the various Color Management View Transform options to see if that solved the issues you were having…you probably did but just curious.
Nice LUT solution though.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com -
This reply was modified 3 days, 23 hours ago by
-
AuthorPosts
- You must be logged in to reply to this topic.