PDA

View Full Version : Help on Material ID change script [EDIT]


sunboy69
04-08-2008, 04:22 PM
Help on Material ID change script

RustyKnight
04-08-2008, 10:58 PM
(4)What's your opinion on such a solution? Maybe we need to add an EditPoly modifier on stack if we want to change the MatIDs, otherwise there’s no way to proceed!Well, actually, I'd imagine that any object that has a multisub material applied to it must be some kind of editable something...For ease of use, I would suggest a editable poly...The really question is, why would you bother changing the material id's any way.

If you already have a multi/sub material, why not just add that material to the new sub?!

It seems to me, all you are trying to do is "merge" all the materials into a single place...??

I'd take a look at some of the clean up scripts that are around before running off and trying to rebuild rome...

Shane

erilaz
04-08-2008, 11:29 PM
I've changed your thread title wangzi, as this not a maxscript challenge. You just need assistance with solving your problem.

You are also having this problem solved here: http://forums.cgsociety.org/showthread.php?f=98&t=613267 . So i'm not sure why you are starting another thread.

sunboy69
04-09-2008, 02:25 AM
I've changed your thread title wangzi, as this not a maxscript challenge. You just need assistance with solving your problem.

You are also having this problem solved here: http://forums.cgsociety.org/showthread.php?f=98&t=613267 . So i'm not sure why you are starting another thread.

It's right you say! because i didn't make this thing clear before,so```i'm sorry!

SoLiTuDe
04-09-2008, 06:54 PM
Well, actually, I'd imagine that any object that has a multisub material applied to it must be some kind of editable something...For ease of use, I would suggest a editable poly...The really question is, why would you bother changing the material id's any way.

If you already have a multi/sub material, why not just add that material to the new sub?!

It seems to me, all you are trying to do is "merge" all the materials into a single place...??

Shane

^ That about sums it up. It sounds like you just want to take each object, put it's material in the slot of a multi/subobj material. If the objects are all separate objects you can still organize the mats by putting them in a multi/subobj. material type... you don't need material id's for the material to still be applied to the object, unless there is a real reason for you to assing the newly created multi/subobj material. (do you have to collapse the meshes to one single object?)

sunboy69
04-10-2008, 09:20 AM
Here I will explain in details: There are a lot of objects In MAX, and each polygon of each object has textures, some of them are shared textures. However, due to some operations, the shared textures do not come from the same material ball! So there will be many unnecessary materials, that is to say, we only need to keep one material ball, then share this material ball with the objects which need this texture!

LouisCho
04-10-2008, 12:52 PM
Seem to me that these object are grouped no? I don't understand who make a scene with one texture per polygon!

j-man
04-10-2008, 02:06 PM
hi,

Do you mean how the max primitives have materialID's pre-programmed?

J.

sunboy69
04-10-2008, 02:34 PM
hi,

Do you mean how the max primitives have materialID's pre-programmed?

J.
I think it's very detailed that i say and why the question is still being, i'm crazy!!
I just want to put all the standard materials(of scene) into the newly created multi/sub-obj material and apply the material onto all objects```
And are you look the thread carefulness please, and i wrote it tired...
But i'm very glad there're some enthusiastic people to help me! And thank you!!:)

sunboy69
04-10-2008, 02:53 PM
Just do it!..

sunboy69
05-06-2008, 02:51 PM
over```...

JHaywood
05-06-2008, 11:32 PM
I have a script that does this. It's on my site: http://jhaywood.com/maxScripts.htm

It's called "Multi Mat From Selected" and here's the explanation of what it does...
Creates a Multi/Sub-Object material that contains all the materials of the selected objects, and then modifies the object's face ID's so that the new material can be applied to them correctly. Also strips out unused material slots from objects that already have a Multi/Sub material applied.

I hope that helps. It's come in very useful for me in the past. I have a newer version that's not on the site that handles instanced objects correctly. If you need it, just let me know.

Of course, I should probably update the site one of these days...

CGTalk Moderation
05-06-2008, 11:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.