Home Unreal Engine

Question about MaterialInstance(MI) Actor

polycounter lvl 5
Offline / Send Message
Minato polycounter lvl 5
Ok,this is one of those situations that i'm obviously missing something because these things are being used everywhere,but i can change a material without using them,just using the material float param track and specifying the Material and the Parameter's name,so what am i missing here?...is there more to these actors than meets my ever so slightly non-functional eyes?

Replies

  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    Couple things that always got me in the beginning:

    1) Make sure the material instance actor is pointing to a material instance constant
    2) Make sure the mesh has the material instance constant assigned to it
    3) Make sure your parameter works properly to begin with
    4) Make sure in your param track in matinee, you have your parameter name set properly.
  • Minato
    Options
    Offline / Send Message
    Minato polycounter lvl 5
    All true,but what i'm saying is i can change a Materials Parameter even without using the MI actors,So why should i use them?...
  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    They are there so you can animate parameters over time via Matinee.
  • Minato
    Options
    Offline / Send Message
    Minato polycounter lvl 5
    But that can be done even if you don't use MI's,when you create a 'Material float param track' in matinee,you can plug in the name of the material and the intended parameter's name,and it works,without the need to place a MI actor in the scene...ok,either i'm missing something here big time,or this actor is as useless as i think it is,i hope it's the latter...'>_>
  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    Hrmm that's news to me. I've always understood it that MIAs need to be the middle man.

    EDIT: Just tried it on a default test map on the base cube, I get the error "The track you are creating requires a Dynamic Actor, but the currently active group is using a Static Actor." From what I understand, static actors cannot be animated at all in any sense, thus the need for the MIA. I take it you're using something rigged like a character and that's why it's working?
  • Minato
    Options
    Offline / Send Message
    Minato polycounter lvl 5
    Ignore that error and be amazed...^^
  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    Ha it does work, learn something new everyday.
  • righteousouka
    Options
    Offline / Send Message
    the reason you don't want to animate the material instance without a MaterialInstance(MI) Actor is because it means it edits the package.

    so the first problem is that it means that because you edited the package, that becomes the saved default for the material. IE if you use it to make a light switch then play the game and flip the switch to turn the light on, but then restart the level it will be still be ON(which can cause some major desyncing between the emmisive texture and your dynamic light)

    most importantly if you play in game(not through the editor) Unreal will spit out an red error message on screen every time you adjust the material instance. I am not sure what happens if you cook the packages but i assume it makes editing the material instance directly not work though i haven't tested it.

    From what I've been told this is because packages in unreal are considered static at run time.

    It will work if you store the material instances in the levels package however.
  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    Ah interesting, so would that also mean then that if multiple mesh have the MIC applied, then ALL of them would start to be modified?
  • righteousouka
    Options
    Offline / Send Message
    if they all have the same exact material instance applied, yes.
  • Minato
    Options
    Offline / Send Message
    Minato polycounter lvl 5
    Huh,thanks a lot for letting us know that,it makes sense and i feel better knowing that...^^
Sign In or Register to comment.