fabin Posted July 10, 2024 Share Posted July 10, 2024 for quite a while i've been wanting to understand how color cubes work, so i could make my own. i assume it's some sort of palette that gets run through the game's rendering engine? if anyone has any resources/guides on this, i'd really appreciate it! :] 2 Link to comment https://forums.kleientertainment.com/forums/topic/158145-how-do-you-makegenerate-a-color-cube/ Share on other sites More sharing options...
fabin Posted July 21, 2024 Author Share Posted July 21, 2024 (edited) i found out a way! i haven't found how to implement them yet (i used another mod as testing grounds) but i found a way to make them first of all, you're gonna have to get ktools and an image editing software, i myself use GIMP, since it's pretty good and it's free, you can use whatever if you don't know how to make ktools function, then you're gonna have to learn some very simple batch file code. below's a step-by-step if you need it Spoiler first, extract ktools wherever. make sure to remember where you put it! second, in the folder you extracted ktools, make a text file. in this text file you're gonna want to specify where ktools is and where the input and output for it will be you're gonna want to use ktech.exe, as that's the TEX extractor. shift-right click on ktech.exe and click "copy as path", and now copy and paste it to your text file now find the color cube's file, for this were gonna need the identity color cube, which has no alterations to it. you can find it in your DST installation folder > "data/images/colour_cubes/identity_colourcube.tex". paste that in the text file too, just make sure there's a space inbetween the paths and the last step for extracting is specifying the output path. this can be any folder, so just create an output folder in the ktools folder for simplicity and paste the path in the text file you should end up with something similar to this: "C:\Users\ [your-user-here] \Desktop\ktools-4.4.4\krane.exe" "C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\images\colour_cubes\identity_colourcube.tex" "C:\Users\ [your-user-here] \Desktop\ktools-4.4.4\output" now save it as a .bat file, for this you can just go to the notepad, file > save as, in "save as type" select all files, and in the file name field, just change the output from .txt to .bat and the third and final step is running the .bat file. if everything goes right, you should end up with the identity color cube extracted to the output you're gonna want to extract a file called "identity_colourcubes.tex" in DST's installation folder > "data/images/colourcubes/". after you've done that, you can get to editing! this is it, the color cube. it's basically a LUT (look-up table) for colors. left side is for dark colors, where right side is for lighter colors. here you can do some basic color correction to get what you want to achieve for this example, let's say i want to make a very pink-ish and less saturated color cube, similar to summer's color cube in a way let's first desaturate it and bring up the contrast just a smidge now for the actual adjustment part, let's bring down the greens and bring up the reds and blues, this'll make it more pink-ish. i'll use the curves tool in gimp for that, changing each RGB channel individually. i'll also bring up the blacks in green and blue to sort of give it a ghostly feel, lastly i'll desaturate it again, as this step brings up the saturation sometimes lastly, i'll just hue shift it a bit to the left and bring down the contrast and this is it! this is the final result, now all you need to do is convert it from a .png back to .tex, and hook it up to some code. here's how it looks like in-game! sort of ghostly, isn't it? and that's it, you've got your own color cube! now for the implementation part, you'll have to figure it out for yourself, as i am too, but if you need a few pointers, i've found that the file "playervision.lua" in "data/databundles/scripts.zip > /scripts/components/playervision.lua" and "colourcubes.lua" in "components/colorcubes.lua" specify majority of color cubes, so maybe an addcomponentpostinit will there will be enough. hope that was helpful! Edited July 22, 2024 by fabin 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/158145-how-do-you-makegenerate-a-color-cube/#findComment-1737051 Share on other sites More sharing options...
Wonderlarr Posted July 27, 2024 Share Posted July 27, 2024 I wish I would've seen this post sooner, I could've helped you! For Hat Kid I had to figure this out for myself as well, ended up modifying spring day to be much greener for Hat Kid's Dweller Mask. Link to comment https://forums.kleientertainment.com/forums/topic/158145-how-do-you-makegenerate-a-color-cube/#findComment-1737928 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now