msantana wrote:
Did you guys improve some viewport performance? That is great news! Can you elaborate on this?
Plug-in shaders must expose a function which returns the surface color at a given point. Maya calls this function when the shader is used with software rendering, and also when it wants to generate an OpenGL texture for the viewport. The design is clean and elegant but for some reason the implementation is extremely slow. Even if the plug-in does nothing but return a constant color, it takes ages to generate the texture. If the plug-in also needs to sample other texture nodes (as is the case for the Maxwell material), it gets much worse. The problem isn't immediately noticeable with the default resolution for viewport textures, which is 32x32, but a 512x512 texture is 256 times larger, so it will take 256 times longer to generate. That's why you get an annoying stall when the viewport is in textured mode and you change an attribute on the Maxwell material (or any other plug-in shader). When a scene with many shaders is loaded, or when the viewport is switched to textured mode for the first time, all the OpenGL textures need to be generated, so the annoying stalls add up.
These stalls are gone in 2.0. The actual drawing performance after the textures are generated hasn't improved (it may even be slightly lower than with the built-in Maya shaders, but not by a significant margin). The Maxwell shader does its own texture generation now, avoiding the slow Maya code, but the drawing performance can't be improved this way. It is possible to take over and do the entire viewport rendering from a plug-in, but you sacrifice some functionality. You can take full advantage of modern GPUs, but you double the amount of memory used for the geometry and various things no longer work in the viewport. It's a viable approach for a game studio with a specific pipeline and workflow, but it wouldn't work for us.
msantana wrote:
Did you guys implement more changes to the plug-in (other than texturing)?
Yes. There's a better UI for the Maxwell material, but I can't give any details yet. There are some quality enhancements to the viewport display too, and a bunch of other additions and fixes. Stay tuned for more 2.0 announcements. :)