Converting Autodesk materials

Converting Autodesk materials

hanselmoniz
Enthusiast Enthusiast
13,013 Views
52 Replies
Message 1 of 53

Converting Autodesk materials

hanselmoniz
Enthusiast
Enthusiast
Please could you help out to change autodesk materials to vray materials. So far I've got. I would however have to grab the properties of individual autodesk materials and set them to vray... i do not know if I'm going in the right direction as i am new to maxscript


for varMat in scenematerials do
( if classof varMat == Autodesk_Material then
if varMat = Autodesk_ceramic then
(varMat = vraymtl ())
if varMat = Autodesk_concrete then
(varMat = vraymtl ())
if varMat = Autodesk_generic then
(varMat = vraymtl ())
if varMat = Autodesk_glazing then
(varMat = vraymtl ())
if varMat = Autodesk_wood then
(varMat = vraymtl ())
if varMat = Autodesk_masonry then
(varMat = vraymtl ())
if varMat = Autodesk_metal then
(varMat = vraymtl ())
if varMat = Autodesk_metallic_paint then
(varMat = vraymtl ())
if varMat = Autodesk_mirror then
(varMat = vraymtl ())
if varMat = Autodesk_plastic then
(varMat = vraymtl ())
if varMat = Autodesk_solid_glass then
(varMat = vraymtl ())
if varMat = Autodesk_stone then
(varMat = vraymtl ())
if varMat = Autodesk_wall_paint then
(varMat = vraymtl ())
if varMat = Autodesk_water then
( varMat = vraymtl ())

)
3dmaxdesign 2011 64-bit
i7 2600 windows 7 64-bit
quadro 600
0 Likes
13,014 Views
52 Replies
Replies (52)
Message 41 of 53

Anonymous
Not applicable

here is a screenshot of ther error

0 Likes
Message 42 of 53

Swordslayer
Advisor
Advisor

It should be enought to test the objects with the offending material. Select them - if you're not sure which to select, you can use something like

 

select (for obj in objects where obj.material != undefined AND obj.material.name == "Concrete - Cast In Situ" collect obj)

 and save them to a new scene. Alternatively upload it to some filesharing website/dropbox.

 

 

0 Likes
Message 43 of 53

Anonymous
Not applicable

here it is

0 Likes
Message 44 of 53

Swordslayer
Advisor
Advisor

The DefinitionID of that particular material is Concrete-005 (why oh why?), to work around this and similar issues we can for example replace the first part of case expression in the conversion function like this:

 

else case ((trimRight mtl.DefinitionID "_-1234567890") as name) of

 This will strip numbers, dash and underscore at the end of the DefinitionID.

0 Likes
Message 45 of 53

Anonymous
Not applicable
i really do not know the file was exported from revit
0 Likes
Message 47 of 53

Anonymous
Not applicable
now i get a error in
mat: PEA-01 Raised floor:Autodesk_Hardwood
i will check the mtl.defintionid
0 Likes
Message 48 of 53

Anonymous
Not applicable

Smiley Frustrated now it is this one... hardwood

0 Likes
Message 50 of 53

Anonymous
Not applicable

Maybe this one could help you?

http://www.motivacg.com/en/material-converter/

0 Likes
Message 51 of 53

hanselmoniz
Enthusiast
Enthusiast

Please excuse me as im a total noob at this and any help would be much appreciated

i want to convert all the autodesk_map types in my scene to autodesk bitmaptexture and so far i have got this. But it does not seem to work

 

for i in scenematerials do
(if isProperty mp "Generic_Image" AND classof mp.Generic_Image == Autodesk_Map then
nwmp = bitmaptexture ()
nwmp.filename = mp.Parameters_Source
nwmp.coords.realWorldScale = on
nwmp.coords.U_Offset = 0
nwmp.coords.V_Offset = 0
nwmp.coords.U_Tiling = mp.Scale_Width
nwmp.coords.V_Tiling = mp.Scale_Height
nwmp.coordinates.UVW_Type= 0
nwmp.coordinates.U_Mirror = false 
nwmp.coordinates.V_Mirror = false 
nwmp.coordinates.U_Tile =  true 
nwmp.coordinates.V_Tile = true 
nwmp.output.output_amount = mp.Parameters_Brightness
nwmp.output.invert=  mp.Parameters_Invert_Image
nwmpxpos = mp.Position_X 
nwmpypos = mp.Position_Y 
nwm.coords.W_angle = mp.Position_Rotation
nwmprphorz = mp.Repeat_Horizontal
nwmprpvert = mp.Repeat_Vertical
nwmp.coords.blur = mp.Advanced_Parameters_Blur
nwmp.coords.blur_Offset = mp.Advanced_Parameters_Blur_Offset
nwmp.filtering  = mp.Advanced_Parameters_Filtering
nwmp.coordinates.mapChannel= mp.Advanced_Parameters_Map_Channel)

 

3dmaxdesign 2011 64-bit
i7 2600 windows 7 64-bit
quadro 600
0 Likes
Message 52 of 53

hanselmoniz
Enthusiast
Enthusiast

just a bit of tidying up but not there as yet as suggestions

--convert function for autodesk map to bitmaptexture
fn convert_AutodeskMap_to_ABitmaptexture mp =
(if isProperty mp "Generic_Image" AND classof mp.Generic_Image == Autodesk_Map then
	a = mp.generic_image.Parameters_Source as string
	grt = trimleft a "BitMap:"
nwmp = Bitmaptexture ()
nwmp.name = mp.Generic_image.name 
nwmp.filename = grt
nwmp.coords.realWorldScale = on
nwmp.coords.U_Offset = 0
nwmp.coords.V_Offset = 0
nwmp.coords.U_Tiling = mp.generic_image.Scale_Width
nwmp.coords.V_Tiling = mp.generic_image.Scale_Height
nwmp.coordinates.UVW_Type= 0
nwmp.coordinates.U_Mirror = false 
nwmp.coordinates.V_Mirror = false 
nwmp.coordinates.U_Tile =  true 
nwmp.coordinates.V_Tile = true
nwmp.output.output_amount = (mp.generic_image.Parameters_Brightness * 0.01)
nwmp.output.invert =  mp.generic_image.Parameters_Invert_Image
nwmp.coords.W_angle = mp.generic_image.Position_Rotation
nwmp.coords.blur = mp.generic_image.Advanced_Parameters_Blur
nwmp.coords.blur_Offset = mp.generic_image.Advanced_Parameters_Blur_Offset
nwmp.filtering  = mp.generic_image.Advanced_Parameters_Filtering
nwmp.coordinates.mapChannel = mp.generic_image.Advanced_Parameters_Map_Channel
)

 

3dmaxdesign 2011 64-bit
i7 2600 windows 7 64-bit
quadro 600
0 Likes
Message 53 of 53

Anonymous
Not applicable

When i wanted to convert several autodesk materials to standart one's (or vray) none of this scripts worked for me in max 2018, so decided to write my own dumb script/parser. It acts like texture ripper mostly and shows some bad programming skills, though i hope it will be usefull for somebody. Smiley Happy

 

-- autodesk mats converter 0.1 for max 2018 by loxotron
-- drag materials to material slots and start script, it will parce them all

global mat_source
global mat_source_sc_w
global mat_source_sc_h
global mat_name
global mat_cutout
global mat_cutout_name
global mat_cutout_sc_w
global mat_cutout_sc_h
global mat_bump
global mat_bump_name
global mat_bump_amount
global mat_bump_sc_w
global mat_bump_sc_h
global mat_mix1
global mat_mix2
global mat_noise_sz
global mat_noise_type
global mat_noise_th_low
global mat_noise_th_high
global mat_noise_copy
global mat_mix1b
global mat_mix2b
global mat_transp
global mat_gloss
global mat_spec


fn convert_Mtl_to_standart mtl =
 ( 
	local mtl_color

	if(mtl.baseType == "Ceramic") then (
		if(mtl.Ceramic_Color_Map != undefined) then ( 
			mat_name = mtl.Ceramic_Color_Map.name
			mat_source = mtl.Ceramic_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
		)
		if(mtl.Ceramic_Color != undefined) then ( mtl_color = mtl.Ceramic_Color )
	) 
	if(mtl.baseType == "Concrete") then (
		if(mtl.Concrete_Color_Map != undefined) then ( 
			mat_name = mtl.Concrete_Color_Map.name
			mat_source = mtl.Concrete_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
		)
		 if(mtl.Concrete_Color != undefined) then ( mtl_color = mtl.Concrete_Color )
	) 
	if(mtl.baseType == "Plastic/Vinyl") then (
		if(mtl.Plastic_Color_Map != undefined) then ( 
			mat_name = mtl.Plastic_Color_Map.name
			mat_source = mtl.Plastic_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Plastic_Color_Map.Scale_Width
			mat_source_sc_h = mtl.Plastic_Color_Map.Scale_Height
		)
		 if(mtl.Plastic_Color != undefined) then ( mtl_color = mtl.Plastic_Color )
		 mat_gloss = 64
		 mat_spec = 44
	)
	if(mtl.baseType == "Stone") then (
		if(mtl.Stone_Image != undefined) then ( 
			mat_name = mtl.Stone_Image.name
			mat_source = mtl.Stone_Image.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Stone_Image.Scale_Width
			mat_source_sc_h = mtl.Stone_Image.Scale_Height
		)
	) 
	if(mtl.baseType == "Solid Glass") then (
		if(mtl.Solid_Glass_Custom_Color_Map != undefined) then ( 
			mat_name = mtl.Solid_Glass_Custom_Color_Map.name
			mat_source = mtl.Solid_Glass_Custom_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Solid_Glass_Custom_Color_Map.Scale_Width
			mat_source_sc_h = mtl.Solid_Glass_Custom_Color_Map.Scale_Height
		)
		 if(mtl.Solid_Glass_Custom_Color != undefined) then ( mtl_color = mtl.Solid_Glass_Custom_Color )
		 mat_gloss = 70
		 mat_spec =100
	) 
	if(mtl.baseType == "Hardwood") then (
		if(mtl.Wood_Image != undefined) then ( 
			mat_name = mtl.Wood_Image.name
			mat_source = mtl.Wood_Image.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Wood_Image.Scale_Width
			mat_source_sc_h = mtl.Wood_Image.Scale_Height
		)
		 if(mtl.Wood_Stain_Color != undefined) then ( mtl_color = mtl.Wood_Stain_Color )
	) 
	if(mtl.baseType == "Ceramic" or mtl.baseType == "Concrete" or mtl.baseType == "Stone" or mtl.baseType == "Plastic/Vinyl") then (
		if(mtl.Finish_Bumps_Image != undefined and mtl.Finish_Bumps_Image.Parameters_Source != undefined) then (
			mat_bump_name = mtl.Finish_Bumps_Image.name
			mat_bump = mtl.Finish_Bumps_Image.Parameters_Source as string 
			mat_bump = trimleft mat_bump "BitMap:"
			mat_bump_sc_w = mtl.Finish_Bumps_Image.Scale_Width
			mat_bump_sc_h = mtl.Finish_Bumps_Image.Scale_Height
		)
		if(mtl.Finish_Bumps_Amount != undefined) then ( mat_bump_amount = 10.0 )
	)
	if(mtl.baseType == "Ceramic" or mtl.baseType == "Stone"  or mtl.baseType == "Masonry" or mtl.baseType == "Masonry CMU" or mtl.baseType == "Plastic/Vinyl" or mtl.baseType == "Solid Glass" or mtl.baseType == "Metal") then (
		if(mtl.Relief_Pattern_Image != undefined and mtl.Relief_Pattern_Image.Parameters_Source != undefined) then ( 
			mat_bump_name = mtl.Relief_Pattern_Image.name
			mat_bump = mtl.Relief_Pattern_Image.Parameters_Source as string
			mat_bump = trimleft mat_bump "BitMap:"
			mat_bump_sc_w = mtl.Relief_Pattern_Image.Scale_Width
			mat_bump_sc_h = mtl.Relief_Pattern_Image.Scale_Height
		)
		if(mtl.Relief_Pattern_Amount != undefined) then ( mat_bump_amount = 10.0 )
	)
	if(mtl.baseType == "Hardwood") then (
		if(mtl.Relief__Pattern_Image != undefined and mtl.Relief__Pattern_Image.Parameters_Source != undefined) then ( 
			mat_bump_name = mtl.Relief__Pattern_Image.name
			mat_bump = mtl.Relief__Pattern_Image.Parameters_Source as string
			mat_bump = trimleft mat_bump "BitMap:"
			mat_bump_sc_w = mtl.Relief__Pattern_Image.Scale_Width
			mat_bump_sc_h = mtl.Relief__Pattern_Image.Scale_Height
		)
		if(mtl.Relief__Pattern_Amount != undefined) then ( mat_bump_amount = 10.0 )
	)
	if (mtl.baseType == "Generic") then (
		if(mtl.Generic_Image != undefined) then (
			mat_name = mtl.Generic_Image.name
			if(mtl.Generic_Image.basetype == "Noise") then (
					if(mtl.Generic_Image.Appearance_Color_1_Map.basetype != "Tile") then (
						mat_mix1 = mtl.Generic_Image.Appearance_Color_1_Map.Parameters_Source as string
					) else (
						mat_mix1 = mtl.Generic_Image.Appearance_Color_1_Map.Tile_Appearance_Tile_Color_Map.Parameters_Source as string
					)
					if(mtl.Generic_Image.Appearance_Color_2_Map.basetype != "Tile") then (
						mat_mix2 = mtl.Generic_Image.Appearance_Color_2_Map.Parameters_Source as string
					) else (
						mat_mix2 = mtl.Generic_Image.Appearance_Color_2_Map.Tile_Appearance_Tile_Color_Map.Parameters_Source as string
				)
				mat_noise_sz = mtl.Generic_Image.Appearance_Size
				mat_noise_type = mtl.Generic_Image.Appearance_Noise_Type
				mat_noise_th_low = mtl.Generic_Image.Noise_Threshold_Low
				mat_noise_th_high =  mtl.Generic_Image.Noise_Threshold_High
			) else if (mtl.Generic_Image.basetype == "Tile") then (
				mat_source = mtl.Generic_Image.Tile_Appearance_Tile_Color_Map.Parameters_Source as string
				mat_source = trimleft mat_source "BitMap:"
				mat_source_sc_w = mtl.Generic_Image.Tile_Appearance_Tile_Color_Map.Scale_Width
				mat_source_sc_h = mtl.Generic_Image.Tile_Appearance_Tile_Color_Map.Scale_Height
			) else (
				mat_source = mtl.Generic_Image.Parameters_Source as string
				mat_source = trimleft mat_source "BitMap:"
				mat_source_sc_w = mtl.Generic_Image.Scale_Width
				mat_source_sc_h = mtl.Generic_Image.Scale_Height
			)
		)
		if(hasProperty mtl "Generic_Glossiness" and mtl.Generic_Glossiness > 0) then ( mat_gloss = mtl.Generic_Glossiness )
		if(mtl.Generic_Color != undefined) then ( mtl_color = mtl.Generic_Color )
	)
	if(mtl.baseType == "Glazing") then (
		if(mtl.Glazing_Custom_Color_Map != undefined) then ( 
			mat_name = mtl.Glazing_Custom_Color_Map.name
			mat_source = mtl.Glazing_Custom_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Glazing_Custom_Color_Map.Scale_Width
			mat_source_sc_h = mtl.Glazing_Custom_Color_Map.Scale_Height
		)
		 mat_gloss = 100
		 mat_spec =50
		 if(mtl.Glazing_Custom_Color != undefined) then ( mtl_color = mtl.Glazing_Custom_Color )
	) 
	if(hasProperty mtl "Cutouts_Image" and mtl.Cutouts_Image != undefined and mtl.Cutouts_Image.Parameters_Source != undefined) then ( 
		mat_cutout_name = mtl.Cutouts_Image.name
		mat_cutout = mtl.Cutouts_Image.Parameters_Source as string
		mat_cutout = trimleft mat_cutout "BitMap:"
		mat_cutout_sc_w = mtl.Cutouts_Image.Scale_Width
		mat_cutout_sc_h = mtl.Cutouts_Image.Scale_Height
	)
	if(hasProperty mtl "Bump_Image" and mtl.Bump_Image != undefined) then
	 (
		if(mtl.Bump_Image.basetype != "Noise" and mtl.Bump_Image.Parameters_Source != undefined) then (
			mat_bump_name = mtl.Bump_Image.name
			mat_bump = mtl.Bump_Image.Parameters_Source as string 
			mat_bump = trimleft mat_bump "BitMap:"
			mat_bump_sc_w = mtl.Bump_Image.Scale_Width
			mat_bump_sc_h = mtl.Bump_Image.Scale_Height
		) else if(mtl.Bump_Image.basetype == "Noise" and mtl.Bump_Image.Appearance_Color_1_Map.Parameters_Source != undefined) then (
			mat_bump_name = mtl.Bump_Image.name
			mat_mix1b = mtl.Bump_Image.Appearance_Color_1_Map.Parameters_Source as string
			mat_mix2b = mtl.Bump_Image.Appearance_Color_2_Map.Parameters_Source as string
			mat_noise_copy = true
		)
	 )

	if(hasProperty mtl "Bump_Amount" and mtl.Bump_Amount != undefined) then ( mat_bump_amount = mtl.Bump_Amount )
	if(hasProperty mtl "Transparency_Enable" and mtl.Transparency_Enable == true) then (
		mat_transp = mtl.Transparency_Amount
		if(mtl.Transparency_Image != undefined) then ( 
			mat_cutout_name = mtl.Transparency_Image.name
			mat_cutout = mtl.Transparency_Image.Parameters_Source as string
			mat_cutout = trimleft mat_cutout "BitMap:"
		)
	)
	if(mtl.baseType == "Metal") then (
		if(mtl.Metal_Color != undefined) then ( mtl_color = mtl.Metal_Color )
	)	
	if(mtl.baseType == "Masonry" or mtl.baseType == "Masonry CMU") then (
		if(mtl.Masonry_Color_Map != undefined) then ( 
			mat_name = mtl.Masonry_Color_Map.name
			mat_source = mtl.Masonry_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Masonry_Color_Map.Scale_Width
			mat_source_sc_h = mtl.Masonry_Color_Map.Scale_Height
		)
		if(mtl.Masonry_Color != undefined) then ( mtl_color = mtl.Masonry_Color )
	)	
	if(mtl.baseType == "Metallic_Paint" or mtl.baseType == "Metallic Paint") then (
		if(mtl.Metallic_Paint_Color_Map != undefined) then ( 
			mat_name = mtl.Metallic_Paint_Color_Map.name
			mat_source = mtl.Metallic_Paint_Color_Map.Parameters_Source as string
			mat_source = trimleft mat_source "BitMap:"
			mat_source_sc_w = mtl.Metallic_Paint_Color_Map.Scale_Width
			mat_source_sc_h = mtl.Metallic_Paint_Color_Map.Scale_Height
		)
		 mat_gloss = 35
		 mat_spec =50
		if(mtl.Metallic_Paint_Color != undefined) then ( mtl_color = mtl.Metallic_Paint_Color )
	)
	if(mtl.baseType == "Mirror_Tint" or mtl.baseType == "Mirror") then (
		mtl_color = mtl.Mirror_Tint_Color
	)
	if(mtl.baseType == "Wall_Paint") then (
		mtl_color = mtl.Wall_Paint_Color
	)
	if(mtl.baseType == "Water") then (
		mtl_color = mtl.Water_Custom_Color
	)	

	if(mtl_color != undefined) then
	( 
		standardMaterial name: mtl.name Diffuse:mtl_color
	) else (
		standardMaterial name: mtl.name Diffuse:(color 0 0 0)
	)
 )

for i = 1 to 24 do
(
	medit.SetActiveMtlSlot i false

	mat_source = undefined
	mat_source_sc_w = undefined
	mat_source_sc_h = undefined
	mat_mix1 = undefined
	mat_mix2 = undefined
	mat_mix1b = undefined
	mat_mix2b = undefined
	mat_name = undefined
	mat_cutout = undefined
	mat_cutout_name = undefined
	mat_cutout_sc_w = undefined
	mat_cutout_sc_h = undefined
	mat_bump = undefined
	mat_bump_amount = undefined
	mat_bump_name = undefined
	mat_bump_sc_w = undefined
	mat_bump_sc_h = undefined
	mat_transp = undefined
	mat_noise_sz = undefined
	mat_noise_type = undefined
	mat_noise_th_low = undefined
	mat_noise_th_high  = undefined
	mat_gloss = undefined
	mat_spec = undefined
	mat_noise_copy = false

	origMtl = meditMaterials[medit.GetActiveMtlSlot()] -- get Active Material Slot
	if(matchPattern origMtl.name pattern:"*Glossy*") then (
		 mat_gloss = 20
		 mat_spec = 10
	)
	if isKindOf origMtl Autodesk_Material then
	( 
		setMeditMaterial (medit.GetActiveMtlSlot()) (convert_Mtl_to_standart origMtl)

		origMtl = meditMaterials[medit.GetActiveMtlSlot()]
		if(mat_source != undefined) then ( origMtl.diffuseMap = bitmaptexture name: (getFilenameFile mat_name as string) filename: mat_source )
		if(mat_source_sc_w != undefined) then ( origMtl.diffusemap.coords.U_Tiling = -mat_source_sc_w/4 )
		if(mat_source_sc_h != undefined) then ( origMtl.diffusemap.coords.V_Tiling = -mat_source_sc_h/6 )
		if(mat_mix1 != undefined and mat_mix2 != undefined) then ( 
			origMtl.diffuseMap = Noise name: (getFilenameFile mat_name as string)
			origMtl.diffuseMap.map1 =  bitmaptexture name: (getFilenameFile mat_mix1 as string) filename: mat_mix1
			origMtl.diffuseMap.map2 =  bitmaptexture name: (getFilenameFile mat_mix2 as string) filename: mat_mix2
		)
		if(mat_cutout != undefined) then ( origMtl.opacityMap = bitmaptexture name: (getFilenameFile mat_cutout_name as string) filename: mat_cutout )
		if(mat_cutout_sc_w != undefined) then ( origMtl.opacityMap.coords.U_Tiling = -mat_cutout_sc_w/4 )
		if(mat_cutout_sc_h != undefined) then ( origMtl.opacityMap.coords.V_Tiling = -mat_cutout_sc_h/6 )
		if(mat_bump != undefined) then ( origMtl.bumpMap = bitmaptexture name: (getFilenameFile mat_bump_name as string) filename: mat_bump )
		if(mat_mix1b != undefined and mat_mix2b != undefined) then (
			origMtl.bumpMap = Noise name: (getFilenameFile mat_bump_name as string)
			origMtl.bumpMap.map1 =  bitmaptexture name: (getFilenameFile mat_mix1b as string) filename: mat_mix1b
			origMtl.bumpMap.map2 =  bitmaptexture name: (getFilenameFile mat_mix2b as string) filename: mat_mix2b
			if(mat_noise_copy == true) then (
				if(mat_noise_sz != undefined) then ( origMtl.bumpMap.size = mat_noise_sz)
				if(mat_noise_type != undefined) then ( origMtl.bumpMap.type = mat_noise_type)
				if(mat_noise_th_low != undefined) then ( origMtl.bumpMap.thresholdLow = mat_noise_th_low)
				if(mat_noise_th_high != undefined) then ( origMtl.bumpMap.thresholdHigh = mat_noise_th_high)
				mat_noise_copy = false
			)
		)
		if(mat_bump_amount != undefined) then ( origMtl.bumpMapAmount = mat_bump_amount )
		if(mat_bump_sc_w != undefined) then ( origMtl.bumpMap.coords.U_Tiling = -mat_bump_sc_w/4 )
		if(mat_bump_sc_h != undefined) then ( origMtl.bumpMap.coords.V_Tiling = -mat_bump_sc_h/6 )
		if(mat_transp != undefined) then ( origMtl.opacity = 100 - mat_transp)
		if(mat_noise_sz != undefined) then ( origMtl.diffuseMap.size = mat_noise_sz)
		if(mat_noise_type != undefined) then ( origMtl.diffuseMap.type = mat_noise_type)
		if(mat_noise_th_low != undefined) then ( origMtl.diffuseMap.thresholdLow = mat_noise_th_low)
		if(mat_noise_th_high != undefined) then ( origMtl.diffuseMap.thresholdHigh = mat_noise_th_high)
		if(mat_gloss != undefined) then ( origMtl.glossiness = mat_gloss)
		if(mat_spec != undefined) then ( origMtl.specularLevel = mat_spec)
	)
)
0 Likes