A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »[MaxScript] DixFix

Author Topic: [MaxScript] DixFix (4 messages, Page 1 of 1)
Moderators: Dennis

DeadHamster
Joined: Jun 8, 2014


Posted: Feb 19, 2018 11:20 AM    Msg. 1 of 4       
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.




Link


OR, 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


stunt_man
Joined: Sep 22, 2009

GMYF - Now hosting proper MLG gametypes!


Posted: Mar 4, 2018 01:58 AM    Msg. 2 of 4       
Nice work. Can you make one that fixes material names after ripping to .obj? Or recommend me a script that does this, if it already exists?


Halo Noob Modder117
Joined: Jan 22, 2016

I guess I'm just going to have to rip your tags


Posted: Mar 4, 2018 10:24 AM    Msg. 3 of 4       
If only there was a max script that could allow for the edits of ripped BSPs so they wouldn't be destroyed and needing to be re-worked...
Edited by Halo Noob Modder117 on Mar 4, 2018 at 10:25 AM


DeadHamster
Joined: Jun 8, 2014


Posted: Mar 4, 2018 01:13 PM    Msg. 4 of 4       
Quote: --- Original message by: stunt_man
Nice work. Can you make one that fixes material names after ripping to .obj? Or recommend me a script that does this, if it already exists?


Clarify the issue for me, not quite sure what you're referring to. What are you using to rip, are you exporting with 3DS max to an .OBJ, and the material names are screwed up when you reimport?

 

 
Previous Older Thread    Next newer Thread







Time: Sun June 17, 2018 11:59 PM 171 ms.
A Halo Maps Website