DixFix is a rewrite of a Maxscript I stole that helps make materials better viewable in 3DS max's viewport. Partial credit goes to some guy out there on the internet who's name and script I don't remember nor care to find.
This one is geared towards Halo CE, specifically fixing imported models from various ripping tools. It will disable any type of transparency from alpha, opacity or opacity maps, it sets all materials to show the diffuse map in the viewport and sets the specular level to 0.
These are all things that Adjutant or other apps do on import, and it can often mean lots of tedious clicking to readjust. Feel free to use this instead.
LinkOR, copy/paste the below into NotePad and save it as a .ms file wherever your 3DS max scripts are stored.
----------------------------------------------------------------------------------------------------
-- Material "Fixer" script
-- This script automates setting all materials as viewed in the viewport,
-- with no alpha source on the diffuse map, and no opacity maps.
-- <3 hamp
----------------------------------------------------------------------------------------------------
fn setDiffuse changeMat =
(
if classof changeMat == multimaterial then
(
for i = 1 to changeMat.numsubs do
(
if changeMat.materialList != undefined then
(
setDiffuse changeMat.materialList
)
)
)
else if classof changeMat == standardmaterial then
(
changeMat.showInViewport = true
changeMat.adLock = true
changeMat.specularlevel = 0
changeMat.opacity = 100
changeMat.opacitymapenable = false
changeMat.adTextureLock = true
if changeMat.diffuseMap != undefined then
(
setDiffuse changeMat.diffuseMap
)
)
else if classof changeMat == bitmaptexture then
(
changeMat.alphasource = 2
)
)
rollout MaterialFixRollout "Material Fix Script" width:160 height:48
(
GroupBox grp3 "DixFix" pos:[3,0] width:154 height:45
button FixBtn "Dix Materials" pos:[8,18] width:142 height:20
on FixBtn pressed do
(
for i=1 to selection.count do
(
s = selection
if s.material != unassigned do
(
setDiffuse s.material
)
)
)
)
CreateDialog materialfixrollout