Home Technical Talk

[Maya] Controlling a shader network?

So I'm going to be doing sprite renders in Mental Ray for a while and wrote some custom shader networks in the Hypershade. On one, I have 12 or so attributes around the network that need to be set per surface/asset. What I want to do is have an easy collection of them, so I don't need to dig through the hypershade each time. I'm not an API guy, so doing this "the right way" isn't a solution for me right now.

My first thought was to create attributes on the main material node, connecting them upstream to each node/attribute that I want it to drive. This renders properly, but the viewport only shows a black color and it's own specular, since I'm feeding everything into the color channel. I understand this is technically a loop, but not a feedback loop, since the driven outputs never lead directly to the inputs in the final node. I also discovered that this is a limitation in viewport 2.0, it does render in the two legacy modes, but incorrectly.

Here's a real simple example, Bulge V on the blinn connects to the corresponding value on bulge1. Note that the swatch updates correctly at all times, but nothing in the viewport until I delete this upstream connection. Anyone have any ideas or experience with this?


Replies

  • Eric Chadwick
    I wonder if you could use Shader FX instead, and capture the viewport instead of render it? Then wysiwyg. Getting alpha would be a bit trickier, but you could use a shader boolean to switch to alpha-only mode, then combine the two captures into your preferred image format.
  • throttlekitty
    Maybe I'll revisit ShaderFX. In my initial tests, Mental Ray wouldn't render it and I had issues getting the hardware render to actually render. A majority will be full-sized maps + overlays that are likely to be bigger than my screen, stitching screengrabs in post would probably be my last resort, but thanks!
  • radiancef0rge
    Offline / Send Message
    radiancef0rge ngon master
    ShaderFX is not a offline render shader solution so it will not work with mentalray 
  • Eric Chadwick
    You might take a look at V-Ray, if you can afford it. Their RT renderer is really nice, at least in Max. Not sure about the Maya integration sorry. But with RT's progressove refinement as you tweak settings, you get near real-time updates.
  • chronic
    Offline / Send Message
    chronic polycounter lvl 10
    You can try mental ray with IPR, it can be fast enough for basic shaders.
  • throttlekitty
    It turns out that IPR acts the same as the viewport with the upstream connection in place. It only fully evaluates the network on a full render, which is still quick-ish.  I did write a "switcheroo" script to swap all the extra attribute outputs from the material node into inputs, which gives a one-way ticket to each node/attribute for tweaking. I can at least get fast visual feedack with that, but then surface setup becomes a much longer task.

    I'm not sure VRay would get around this issue, since it would still on rely on Maya's node engine?

    Taking a step back, I think a about half the features aren't actually necessary for most our set pieces, which brings me down to a couple of items that need to be tweaked. It would still be nice to have the extras tagged onto the material node, such is life.
Sign In or Register to comment.