colors3dsmaxmaxscriptphotogrammetry

Color correction matrix in 3DS max on texture


I am loading a .obj file in maxscript like this:

myobject = ImportFile "anObject.obj" #noPrompt

I have a color correction matrix that I need to apply to the texture that comes with the .obj file (in a .mtl file), the color correction matrix is described as:

0.88725    0.019988      0.052614
0.32879    1.1125        0.013391
-0.083757  -0.0.31879    0.95243

or for simplifciation

a11 a12 a13
a21 a22 a23
a31 a32 a33

I could only find Color Correction via GUI here, but this does not specifiy a matrix, and does not show how to do it in maxscript. Furthermore, this will apply to the camera (I guess) and not to the texture, before light etc. gets rendered on it.

The obj. file got rendered by AutoCAD 3Dscanexport via photogrammetry, the approach currently does the color correction on the images taken for the photogrammetry is done. However, I was wondering if it is possible to do this after it was rendered to an .obj / .mtl file and loaded in 3ds max utilzing maxscript?


Solution

  • An mtl file only carries the material definition and links to external bitmap image files. Why don't you color-correct those bitmap files?