Home Unreal Engine

How many material IDs can you have?

polycounter lvl 11
Offline / Send Message
Pope Adam polycounter lvl 11
How many different material ID's can you have on a single static mesh in UDK?

I'm having some difficulty when I import this mesh with 8 different materials... the material ID groups get all mismatched and shit when I import.

Any suggestions? I haven't used UDK in like 3 years so I'm hella rusty.

Replies

  • Dan!
    Options
    Offline / Send Message
    Dan! polycounter lvl 6
    Not suer what the MatID cap is- I don't think 8 is it though. I believe your ordering can be solved via this method from the UDK docs;

    When the order of the materials applied to the mesh is important, you can specify a particular order by using a special naming convention for the materials. By default, the materials will be created in Unreal Edtior randomly so there is no guarantee as to what order the materials will be. This can be a problem, for example, when dealing with characters when your character system relies on the body material being the first material, the head material being the second materials, etc.
    Unreal uses the skin_** naming convention to specify ordering for materials. This can be the entirety of the name of the material or appended onto the existing name of the material. It just has to be found within the name of the material.
    So, if you have two materials that need to be ordered consistently, you might have them named:

    • M_ExampleMesh_skin_00
    • M_ExampleMesh_skin_01
    http://udn.epicgames.com/Three/FBXMaterialPipeline.html

    good luck
  • Pope Adam
    Options
    Offline / Send Message
    Pope Adam polycounter lvl 11
    Thansk for the heads up.

    I ended up re-constructing my multi-sub material from scratch and re-exporting and it fixed it. I guess I ahd been swapping around mats inside max for so long and between other mutli subs that is corrupted the material. Sloppy on my part i know :(

    Managed to fix it though :)

    cheers
    ADM
  • ndchristie
    Options
    Offline / Send Message
    In the future, make sure your mat ID's are all in order, the stack is as collapsed as possible, and each material swatch has a bitmap assigned, even if it's not the one you're using in UDK. Importer will sometimes ignore changes made higher up in a stack, as well as 'empty' (fill color) materials.
  • Snight
    Options
    Offline / Send Message
    Snight polycounter lvl 16
    8 materials for one object is really overkill. Keep in mind that you want to have as few materials as you can on one single object. The more textures you have in each material the longer it will take the GPU to grab all those textures in all the different materials used on that one object. It can get really expensive fast, especially if you're using masked/transparent materials.
  • Pope Adam
    Options
    Offline / Send Message
    Pope Adam polycounter lvl 11
    omg i accidentally just pressed 'report' instead of reply... sorry if you get some weird message from a mod.

    here's what i intended to reply to your post with:

    Right. At work I would never have that many materials on a single object, but in this case it was just for a single high rez portfolio shot and i wanted to get it in to the engine as quick and dirty as possible - hence the jacked up/corrupted material ID problem I was having.

    When constructing the scene I duplicated, copied, and created from scratch over 300 individual sub ojects and just never cleaned up the scene... huge mistake LOL but I originally had no intentions of taking it out of max.

    In the end it's turned out quite nice and it'll look good in the folio. Good lookin out though.
  • Snight
    Options
    Offline / Send Message
    Snight polycounter lvl 16
    Just remember other people read your posts and you don't want to relay incorrect or bad info. That's not good for anyone. Glad it worked out though for ya.
  • iniside
    Options
    Offline / Send Message
    iniside polycounter lvl 6
    Snight wrote: »
    8 materials for one object is really overkill. Keep in mind that you want to have as few materials as you can on one single object. The more textures you have in each material the longer it will take the GPU to grab all those textures in all the different materials used on that one object. It can get really expensive fast, especially if you're using masked/transparent materials.

    It's really dependent of how unique object is. IF this will show up in scene once or twice you can even add 16 sub-materials. Won't have any big impact on performance anyway.
    Sometimes can be even faster than assembling entire object from modules.
    Really depends on use-case.
  • Pope Adam
    Options
    Offline / Send Message
    Pope Adam polycounter lvl 11
    Snight wrote: »
    Just remember other people read your posts and you don't want to relay incorrect or bad info. That's not good for anyone. Glad it worked out though for ya.

    ok sorry man
Sign In or Register to comment.