User avatar
By choo-chee
#297717
well again I'm trying to get decent texture previews in my maya viewport but it's impossible. regular maya shaders work perfectly but maxwell-node shaders are not showing correctly and also take about X20 time to display.... what can be done? I understand it's related to maxwell plug-in since regular shaders work fast and good. It's very hard to work like that, guessing all the times how the placement of the texture will be...
#298158
Actually, no plug-in shaders can be displayed like standard Maya shaders. There's a huge performance problem in that area and it's in the Maya code, so we can't do anything about it from the plug-in.

Try adding the following line to your Maya.env file (which should be located in My Documents/maya):
Code: Select all
MAYA_HW_FILE_TEXTURE_RESOLUTION_OVERRIDE=64
If that doesn't help, you can also try running this script on a scene which has many Maxwell materials, before switching to textured mode:
Code: Select all
for($i in `ls -type maxwellMaterial`)
{
    setAttr ($i + ".hwTextureQuality") 2;
    maxwellHwTexQualityCB($i);
}
The script will force the viewport resolution to 64x64 (it may take a while to run). You will also need to set the "Texture resolution" attribute on newly created materials to "64x64" manually (it's under "Hardware Texturing", at the bottom of the AE for the material).

For the 2.0 plug-in, we're not letting Maya handle the viewport display anymore; instead, we draw everything with plug-in code. This solves the performance problem, but it was quite a bit of work and we have to take care of a lot of details, hardware compatibility concerns etc. Due to these issues there are no plans to back-port the improvement to the 1.x plug-in.
#298159
thanx, I already set the maximum texture resolution to 32X32 ..... I just use shaders that I know well and rely on the projection factors and nightly renders ;(
anyway good to know version 2 will fix it, I'm waiting ...
#298295
Mihnea Balta wrote: For the 2.0 plug-in, we're not letting Maya handle the viewport display anymore; instead, we draw everything with plug-in code. This solves the performance problem, but it was quite a bit of work and we have to take care of a lot of details, hardware compatibility concerns etc. Due to these issues there are no plans to back-port the improvement to the 1.x plug-in.
Sorry to hijack the thread, but, Mihnea, did I read that right? Did you guys improve some viewport performance? That is great news! Can you elaborate on this?

It has been know for a quite a while that the viewport code in Maya sucks MAJORLY across all platforms. Some people claimed a studio (that worked on PS3 games, "Fallout" if I am not mistaken) just decided to rewrite the viewport code and run their own. Did you guys implement more changes to the plug-in (other than texturing)? Any performance improvement on the viewport is very welcome! Another reason to upgrade to 2.0!
#298313
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. :)
Maxwell Render 5 crach

An image(6000x3600) was rendered 3 times,and maxw[…]

Material Editor Help

Heeey - that is like Hacking :)) like real life h[…]

Thanks Luis, it's great to see progress with MW!

Thanks Fernando!