Material > Bitmaps

Material > Bitmaps

blakestone
Collaborator Collaborator
353 Views
4 Replies
Message 1 of 5

Material > Bitmaps

blakestone
Collaborator
Collaborator
I am listing all the materials in my scene with ==> sceneMaterials <== and when I access the .maps it shows the following:

#(undefined, Map #3:Bitmap, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, ...)

which I am pretty sure is all the Bitmap channels in the Standard Material rollout, however I am not sure how to find out what is what i.e Diffuse, Specular, Bump, Displace, Opacity etc.
--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes
354 Views
4 Replies
Replies (4)
Message 2 of 5

Steve_Curley
Mentor
Mentor
It's all in the help 😛

Locate the "StandardMaterial : Material" topic, scroll to the bottom of the page. Easiest way is to go the Index > Material > Types (on the next line) > Standard (on the resulting page).

Note. The array elements are not consistent - they differ by the specific shader (Metal, Blinn, Phong etc) making it difficult to iterate over them. You might be better off getting them individually (DiffuseMap, OpacityMap etc) which are consistent regardless of array element, but of course not all maps exist in all the shaders.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 3 of 5

blakestone
Collaborator
Collaborator
Thanks for the quick response... I was looking at this but before going ahead wanted to check if there was a quicker/easier way to check this via the .maps array
--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes
Message 4 of 5

Steve_Curley
Mentor
Mentor
Not that I know of - doesn't mean there isn't one, just that I don't know it.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 5 of 5

barigazy
Enthusiast
Enthusiast
I try this only consider standard material but you can expand this

for o in objects where o.material != undefined do
(
case (classof o.material) of
(
(standardmaterial): (
if (pcnt = (getPropNames $).count) != 0 do
(
for i = 1 to pcnt where mod i 2 == 0 do
(
if i == 2 do format "%\n" (">>>" + o.material as string)
format "%\n" ((getPropNames o))
)
)
)
--(): ()
)
)
0 Likes