script to automate rgb color conversion to gamma 2.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi, I was wondering if there is a plugin to do so?
If so great, but since I haven't found one yet, I was thinking of something like this:
basically, I have many old models, with materials made on a 1.0 gamma environment, and everytime I want to use one of them, I have to manually convert all colors to match a 2.2 gamma equivalent.
the formula I use is 255*((old/255)^2.2), based on a tutorial by mintviz, but having to manually correct all colors is a tedious and time consuming process, and at least theoretically could be heavily automated.
what I'm thinking is a simple button that when you press, converts all existing colors, from the selected object only, to it's 2.2 equivalent.
I've done a little custom attributes interfacing in maxscript, but that's all, so I don't have a large experience with it, so I need some help here.
the script would verify if there's an object or objects selected, then it would pick all of their materials, check each of them for existing colors assigned to the map slots, sub maps, etc, and apply the formula to all of them.
what you think?
it should be simple enough, I just don't even know where to start