Home Technical Talk

does maya have any form of material inheritance?

grand marshal polycounter
Online / Send Message
Alex_J grand marshal polycounter
Say I want MaterialA to be used on objectA and objectB, but I want to use a different texture file for each object.
Is there a way to do that in maya?

analogous to material instances in unreal engine

thanks

Replies

  • Alex_J
    Online / Send Message
    Alex_J grand marshal polycounter
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    oh nice find, didnt know that one yet. that could come in handy. i wonder if its compatible with shader fx. if so that would make a lot of things easier for me!

  • Alex_J
    Online / Send Message
    Alex_J grand marshal polycounter
    Neox said:
    oh nice find, didnt know that one yet. that could come in handy. i wonder if its compatible with shader fx. if so that would make a lot of things easier for me!

    well i didn't know about shaderFX but it may be useful for me, lol. thanks for mentioning it.  if i end up needing to use them together will report what i find
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Neox said:
    oh nice find, didnt know that one yet. that could come in handy. i wonder if its compatible with shader fx. if so that would make a lot of things easier for me!

    with shaderfx you kinda get that anyway if you manage your sfx files.  propagating the changes is admittedly a pain in the arse to do manually so we wrote some tooling to ease the misery. 
    tbh. if I were doing it manually I'd export the sfx to a glsl/hlsl shader and use that instead 
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    poopipe said:
    Neox said:
    oh nice find, didnt know that one yet. that could come in handy. i wonder if its compatible with shader fx. if so that would make a lot of things easier for me!

    with shaderfx you kinda get that anyway if you manage your sfx files.  propagating the changes is admittedly a pain in the arse to do manually so we wrote some tooling to ease the misery. 
    tbh. if I were doing it manually I'd export the sfx to a glsl/hlsl shader and use that instead 
    no idea how this works, but will look into it
    my ideal scenario is a master material and then material instances was parameters i open up

    atm i have copies of the shaderfx (that i even have to use shaderfx because maya doesnt support simple things out of the box....) applied for like 5 materials. if i want to toggle something, i need to toggle it 5 times.
    ideally i can switch one toggle and it switches for all 5 instances

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    I was thinking a level deeper than that really - eg.  if you wanted to change how you unpacked a texture or add a parameter in the base material and have that propagate rather than having to muck around in each of your sfx graphs. 

    in theory that process should work with .sfx files but my experience suggests it doesn't work very well at all. We work around it by generating our materials on on the fly but that required writing a python wrapper for shaderfx. 

    however - 
    A script to toggle material parameters across the scene is fairly trivial - parameters (including textures) on a shaderfx material are just attributes so you can set them very easily with setAttr()

    I just checked to see if I have a standalone example to hand but i do not.  
Sign In or Register to comment.