Home Technical Talk

[Maya] change default texture in UV editor (probably shaderfx/hypershade related)

polycounter lvl 6
Offline / Send Message
bitinn polycounter lvl 6
Hi,

I am wondering if this is something I can fix in hypershade/shaderfx: the default texture preview for my PBR material (based on the Stingray PBS material base) is always the BRDF LUT texture, which isn't very helpful when I tried to lineup uv shell to tiling textures.



Yes I could change them in the texture menu but it will reset on object selection.

I have lived with it so far until I had to do a bunch of tiling texture on modular environments recently. There must be something I can do.

What exactly determine the order of texture preview in the UV editor? If I can't preview a material, at least I want to preview the basecolor texture instead of brdf lut.



Help much appreciated!

Replies

  • bitinn
    Offline / Send Message
    bitinn polycounter lvl 6
    I am bumping this to ask a simple question:

    IF you have created custom material based on Stingray PBS material's standard base in Maya, have you experienced the same problem?

    (I am already asking Autodesk for some comments.)
  • Axi5
    Offline / Send Message
    Axi5 interpolator
    This seems to only be a bug with the Stingray PBS shader, the texture stays as your selection, between object selections, when you're using a built-in lambert.

    Couldn't you temporarily just create a blinn/lambert shader with only the texture you need?

    Also you can middle click that "Textures" menu to run the previously used command, so you don't always have to open the menu, it doesn't fix the problem but it saves a second.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    I've had this too so you're not alone..

      You can change the UI order of the texture nodes within the ShaderFX graph - I'm not sure whether that changes what happens in the menu (never checked,  don't care tbh) but it's worth a look - you could try negative numbers if it does make a difference..  
  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    Maya's sorting is... uh. yeh.

    poopipe's suggestion would also be my guess. It could be using the order that the file nodes were brought in, or maybe whoever has the lowest/highest UUID. I've never paid attention to UUID, couldn't tell you if it's random or incremental.
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    *Raises hand* yeah I am suffering under this aswell.

    Okay I dont have solution but I have what I would describe as a solid work around:

    If you select the shaderfx pbs shader in the hyper shade window to the right below the thumbnails there is a tab called "Property Editor" in there look for "Texture Global" it should have three slots pointing to two cubemaps and the LUT/LookUpTable. if you right click the bottom slot called: "Brdf Lut" and choose break selection it disconnects the reference to the .dds file. This should break absolutely everything ... but somehow it doesnt!

    Maya can still display the cubemap reflections just fine and after saving and restarting Maya the connection to the *.dds will have automagically been reestablished. But for the rest of the work session in the UVEditor the LUT will no longer show up in the list of textures and what ever other texture is on top of the list will be used as a default instead. 

    The sorting of that list is not alphabetic (or my "A"lbedo would have been on top instead of somewhere randomly in the middle) it is sorted by order of creation oldest one first newest one last. With this knowledge you can manually sort the list by strategically removing and recreating the "texture sample" nodes inside your shader. So Remove all the textures except the one you want to show in the uv editor and than recreate them in what ever order you like.

    Now every time you start Maya and work on a scene with your pbs shader after breaking the connection to the LUT your desired default texture will be used as the default.
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    Also in the ShaderFX window Settings-> Show Properties Panel
    Each texture node once selected will also all the way at the bottom show a property called "UiOrder" its set by default to 100  
    This does not effect the order in the UVEditor just the "Property Editor" and "Attribute Editor" order!
    For your sanities sake id recommend syncing this with your "creation" order by using numbers like 100, 200, 300 etc...
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    Disconnecting the LUT manually every time via the hyper shader became tedious I made myself a shelf button with this mel code inside: 

    disconnectAttr file9.outColor MI_GenericUberShader.TEX_brdf_lut;

    Of course you would have to adjust it to your materials name.

    Surely some real mel wizard would also know how to run this on "startup" somehow.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    It's definitely possible - we have it enabled on startup at work.  

    Can't share the code obvs. But it's doable
Sign In or Register to comment.