Image loader

Hello,
I looking for a script which lists all maps used in the scene in a table in the left column, and in the right column its corresponding gamma.
Then you can select (and multi select) maps and choose another gamma.
These images are reloaded with new gamma.
Thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

Oh, here also a bad luck...

Oh, here also a bad luck... we cant find which image in which gamma is loaded. <bitmap>.gamma always return the global input gamma insted of the current :/

AttachmentSize
max_gamma.png 944 bytes

my recent MAXScripts RSS (archive here)

titane357's picture

dooh ! I tested the maxscript

dooh !
I tested the maxscript example :
print (getBitmapInfo (getDir #maxroot + "\\maps\\OAKLEAF.TGA"))
and yes it take Imput gamma....
How do you list all images used in the scene ? (already loaded ?)

Anubis's picture

one bad and one good news

You can get easy all bitmap textures used in the scene (an array containing their filename strings) with usedMaps(). Bwn one bad and one good news...

b1 = bitmap 320 240 filename:"C:/test.jpg" gamma:2.2 -- save as JPG
b1.gamma -->> 0.454545
render to:b1; save b1; close b1
(getBitmapInfo "C:/test.jpg")[8] -->> 1.0 (this is the BAD news)
 
b2 = bitmap 320 240 filename:"C:/test.tga" gamma:2.2 -- save as TGA
b2.gamma -->> 0.454545
render to:b2; save b2; close b2
(getBitmapInfo "C:/test.tga")[8] -->> 0.454 (this is the GOOD news)

my recent MAXScripts RSS (archive here)

titane357's picture

urgh ! If I well understand,

urgh ! If I well understand, as it is said in maxscript help, we can change gamma just on copy of image, but in fact just with .tga ?

Anubis's picture

yep, that's right, and with

yep, that's right, and with all images, not only with TGA.
The test above just show that TGA save actual value within the phisical image file, while the JPEG not.

my recent MAXScripts RSS (archive here)

titane357's picture

Thanks for your explanations

Thanks for your explanations :-)

pixamoon's picture

I think I found it

Hi,
I found the way around to do it. I'll add it to new version of Bitmap Tracking/Resizing ...
http://www.scriptspot.com/3ds-max/scripts/bitmap-tracking-resizing

Cheers :)

titane357's picture

hello Anubis, can't scripter

hello Anubis, can't scripter access to the load image command, to reload the already loaded image but with another gamma ? toooo bad.
Yes, color correction is cool when you know which image is in which gamma...
In imported and merge scenes it is sometimes the mess, so a read only list should be something good.... :-)

Anubis's picture

Hi Titane,Sounds good, but

Hi Titane,
Sounds good, but unfortunately, currently not possible to change the gamma of a bitmap without creating new one. Of course Max allows to set input/output gamma, but globals for all scene bitmaps.

P.S. - You can test Color Correction texture map (introduced in Max 2009), but its very bugged though.

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.