Home Technical Talk

3dsmax 9 - Material ID issues.

polycounter lvl 16
Offline / Send Message
JohnnySix polycounter lvl 16
So I've been building a very generic looking sci-fi wall thing - style issues aside, I've run in to a big snag. I've tried all options, but I get the same result- messed up materials.

As they say, a picture is worth a thousand words, so here's what happens :

Material_problem_by_JohnnySix.jpg

The top option totally screws up everything.

Is there a way to reset all material ID's on all objects in a scene to match the materials?

It doesn't seem very obvious from trial and error?

Replies

  • Marcan
    Offline / Send Message
    Marcan polycounter lvl 12
    There is a blur script that cleans up multiple meshes materials and collapses it as one.

    http://www.neilblevins.com/blurscripts/blurscripts.htm

    Edit: It's called CollapseSubObjectMaterial.

    2nd Edit: It's the way I work by the way, if I attach two meshes together I always use the 2nd option and then run a material cleaner script.
  • Stronin
    Ah yes, can't forget that problem! :)

    Rejoice though, theres an easy fix, this one doesn't use a script if you don't want to use one.

    Select the mesh you want to attach the other pieces to,

    Collapse the UVW Unwrap modifier onto your editable poly. (it won't forget your settings)

    Then attach the other pieces to your original mesh (I'm assuming your doing this as an editable polygon model)


    Just make sure to move each pieces UV's out of the center box so you don't have them overlapping.

    That should do the trick.
  • Tumerboy
    Offline / Send Message
    Tumerboy polycounter lvl 16
    I do this the boring manual way, but things don't get screwed up.

    Manually set up a multi sub object material, with all of the materials you will have on your final object.

    Select each part, assign the material, then assign the proper mat ID to it.

    Attach everything (and it won't even bring up the stupid dialog)
  • Mark Dygert
    Sample your materials into a new slot using the eye dropper. More then likely you have two multi-sub-object materials causing problems.

    Make a master multi-sub-object and under the "Polygon: Material ID's" Rollout in "Edit Poly" Set the ID's for the pieces to match your new master multi-sub.
  • JohnnySix
    Offline / Send Message
    JohnnySix polycounter lvl 16
    I did option #4 - Set to one texture, then re-assigned each poly manually. :poly127:

    The blurscipts don't seem to want to load with Max 9, and the 2nd reply is what I've been doing anyway.

    I assigned a # in the materials properties before I started applying them, hoping that this would be how it would assign things within the Editable poly object.

    Alas , I click some faces and they count into double figures, even though there are only 7 materials in use? :poly142:


    Also now, in addition to the 32 slots, in the UT2004 editor, once imported, the texture slots are all shuffled up. I don't particularly fancy replacing every single one with the correct texture using the UT2004 editors clunky interface. :(

    In game, side-by-side with the previous version (with correct texuture)

    Lightmaps_by_JohnnySix.jpg

    And the 32nd slot (Ued counts from 0 )

    32_slots_by_JohnnySix.jpg


    Edit - Vig - Do the Material ID channles you assign in the material editor mean anything in relation to the Material ID on the model?
  • Marcan
    Offline / Send Message
    Marcan polycounter lvl 12
    JohnnySix wrote: »
    Do the Material ID channles you assign in the material editor mean anything in relation to the Material ID on the model?

    If I understand correctly...

    Yes, it does. In fact they should be the same in both Max and Unreal. Unreal does some weird thing if you're going out of range of the number of materials in the Subobject Material Slot in Max and you export it. Keep it clean, every face should have the right number assigned to it, they shouldn't be assigned a # that doesn't exist in the Subobject Material.

    Edit: Let me be clearer:

    If you have seven material id's in your subobject in Max, then you need to have 7 # on your model assigned. Even though Max loops them (#1 can also be #8, #2 can be #9 and so on) Unreal doesn't really like it.
  • Eric Chadwick
    Blurscripts should all load fine in Max 9, I've used them a ton. There are some really good ones in that (huge) set.
  • JohnnySix
    Offline / Send Message
    JohnnySix polycounter lvl 16
    Blurscripts should all load fine in Max 9, I've used them a ton. There are some really good ones in that (huge) set.

    Hmm, they never seemed to load into the UI - Should they appear as a new toolbar/icons ?

    I looked in the side panel thing also (utilities) but nothing there either. :poly141:


    In general - going forward - say I'm starting again from scratch on a new project, how do I stop max duping up materials/IDs as I am building the mesh?
  • Eric Chadwick
    No, as with most scripts you have to add them manually to the UI, gives you more flexibility in how you want to invoke them... quad, menu, toolbar, or keyboard hotkey, or all of the above if you want.
  • Mark Dygert
    JohnnySix wrote: »
    In general - going forward - say I'm starting again from scratch on a new project, how do I stop max duping up materials/IDs as I am building the mesh?
    It really depends on the project, the engine and the object but in general if its going to have a few textures, create a multi-sub object (click standard and change it to multi-sub) and add new textures to the multi-sub assigning the ID's as you go. So you have one master material instead of a bunch of separate ones. This way as Nick talked about, you'll have one material that is assigned to everything and when you merge objects it won't prompt you to handle the mat ID's.

    You can create separate textures and drag them into the multi-sub if that works for you but make sure to assign the master material to all objects and control the material ID's

    It can be handy to create selection sets based on the material ID's.

    As for the Material ID channel in the material editor, (Actually called the G-Buffer ID everywhere else, poor wording if you ask me) this is to flag materials for use in things like video post. For example you had a green material you wanted to glow you would assign a GBuffer ID of 2 to the green material. Then in video post you would set a glow effect to look for GBuffer ID 2. When it finds it it would apply the effect to only that material.
  • JohnnySix
    Offline / Send Message
    JohnnySix polycounter lvl 16
    Thanks Vig - it all is much clearer now! :poly124:

    I went and created a couple of multisub materials, and re-assigned all polygons to one of seven possible ID's and it all works fine.

    I'd always thought the numbers in the Material ED 'forced' surface ID #'s on polygons- so that's one myth busted. I'll bear it in mind if I get round to doing any animated stuff though. :)



    Corridor_of_doom_04_by_JohnnySix.jpg

    Corridor_of_doom_05_by_JohnnySix.jpg
Sign In or Register to comment.