'Override' option - bitmap dialog window ?

Hi guys ,
As you can see i've got a problem with the access to this 'override' option for gamma change.

I've tried to find something in 3dsmax manual first ,google it,but with no success.

Default gamma i'm using is 2.2.
There is a need to load normal maps and change it to gamma:1.0.Its a simple script to generate material and load the proper maps into it.
Fileingamma is working somehow ,but its not the way i want.Cause any transfer to different scene is giving result 2.2 again.

I've got an idea to create .mat file ,load it and then will get the right bitmap slots to the newmaterial .

Here is a part of the code :

for i = 1 to selection.count do
(
fileingamma = 1.0
      local drifitPath = @"ThePath"
      local normalFabric = drifitPath + "JPG name"
      isDrifitFileExist = doesFileExist normalFabric
      if (isDrifitFileExist == true)then
	(
	  newmat.texmap_bump.normal_map.mapList[3] = Bitmaptexture filename:normalFabric
	)
)
fileingamma = 2.2

So, would be great if you are more experienced in that.
Thanks in advice!

AttachmentSize
override.jpg11.78 KB

Comments

Comment viewing options

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

.

have you seen this?

I guess it should be as easy as

tex = Bitmaptexture bitmap:(openBitmap "C:\texture.jpg" gamma:1.0)
meditMaterials[1].diffuseMap = tex
riff-raff's picture

'Override' walked around

Hey miauu , thanks for the fast response .Its a nice to have access to those options ,but it seems thats not what i was searching for or did not find a way to implement it properly as override option in bitmap dialog window.

Here is the approach that gives me best results for now:

- Made a .mat file with Normal maps/bitmaps already overrided to 1.0.
- Load the library .
- Generate myMaterial. --gamma-2.2
- Copy myMaterial to new slot. --Its the way to keep generated maps.
- Transfer .mat-VrayNormalMap to myMaterial. -- the maps are off for now.
- Transfer the maps back - myMaterialCopy -> myMaterial. -- map are in and overrided.
- delete myMaterialcopy.

(
        --load the .mat file 
local matPath = "thePath"
local matName = ".mat"
local matlibrary = matPath + matName
--tmp2 = loadTempMaterialLibrary matlibrary
local matMaterials = #()
for i=1 to tmp2.count do append matMaterials tmp2[i]
 
meditMaterials[6] = VrayMtl()
local newmat = meditmaterials[6]
 
	--FIXING THE MAPS
	--copy matslot 6 to 12 
meditMaterials[12] = copy newmat
meditMaterials[12].name = meditMaterials[12].name + "_copy"
 
	--copy normal map slot from matMaterials to newmat to get proper 'overide' - now the maps are overided
newmat.texmap_bump = copy matMaterials[1].texmap_bump
newmat.texmap_bump.name = "NORMALS"
 
	-- transfering normal maps back from matslot 12 to 6 
newmat.texmap_bump.normal_map.mapList[3].filename = copy meditMaterials[12].texmap_bump.normal_map.mapList[3].filename
newmat.texmap_bump.normal_map.mapList[2].filename = copy meditMaterials[12].texmap_bump.normal_map.mapList[2].filename
newmat.texmap_bump.normal_map.mapList[1].filename = copy meditMaterials[12].texmap_bump.normal_map.mapList[1].filename
 
	-- clear slot 12 and get the default material back
meditMaterials[12] = Standardmaterial()
meditMaterials[12].name = "12 - Default"
)
miauu's picture

.

IDisplayGamma.gamma : float : Read|Write

Get/Set the Gamma value.

Available in 3ds Max 2008 and higher.

Equivalent to the System Global Variable displayGamma available in previous releases.

EXAMPLE:

IDisplayGamma.colorCorrectionMode = #gamma --enable Gamma
IDisplayGamma.gamma = 1.8 --set the Gamma to 1.8

Comment viewing options

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