Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

The original Arch to Standard:

fn convertArchToStandard mat =

-- Make new Standard mat, with original's diffuse map

newMat = Standard diffuseMap:mat.mapM0

newMat.name = mat.name

newMat.diffuse = mat.diff_color

showTextureMap newMat on

newMat.specularLevel = 30

newMat.glossiness = 20

return newMat

-- Loop through all objects, checking material on each

for obj in geometry do

mat = obj.material

if (mat != undefined) then

if (classof mat == Multimaterial) then

-- This is a multi-sub material, so loop through all submaterials

for i in mat.materialIdList do

(
submat = mat[i]

if (classof submat == Arch___Design__mi) then

mat[i] = convertArchToStandard submat

else if (classof mat == Arch___Design__mi) then

-- Regular, non-multi material

obj.material = convertArchToStandard mat

My failed Standard to Arch

fn convertStandardToArch mat =

-- Make new Arch mat, with original's diffuse map

newMat = Arch___Design__mi diffuseMap:mat.mapM0

newMat.name = mat.name

newMat.diffuse = mat.diff_color

showTextureMap newMat on

newMat.refl_weight = 0.6

newMat.refl_gloss = 0.5
return newMat

-- Loop through all objects, checking material on each

for obj in geometry do

mat = obj.material

if (mat != undefined) then

if (classof mat == Multimaterial) then

-- This is a multi-sub material, so loop through all submaterials

for i in mat.materialIdList do

submat = mat[i]

if (classof submat == Standard) then

mat[i] = convertStandardToArch submat

else if (classof mat == Standard) then

(
-- Regular, non-multi material

obj.material = convertStandardToArch mat

You might also like