PDA

View Full Version : maya shaders vs mr shaders


eem
08-26-2006, 03:53 PM
So I remember in the blitz of excitement that was the begining of the vray like interior thread months ago it seemed that everyone sort of came to a consensus that you should use the mental ray shaders because they are more physically accurate... I think that was it. Then some people said the MR shaders were faster. So I ended up using all MR shaders for the most part since then. But I just got Maya 8 now and noticed that it has more mental ray features integrated into the standard maya shaders. Which makes me think that Alias's intention is to rule out the use of base MR shaders eventually and gradually create their own super shader node that'll be used in all cases. Which made me think of this topic again, are the MR shaders really the way to go for an all MR workflow? I'm playing around with the maya shaders trying to answer this through trial and error and the only real difference I'm finding is that the maya shaders treat FG considerably different than the mental ray shaders. Is this due to that physical accuracy thing? How exactly do maya shaders treat FG then? Have any of you found any other differences between the two?

bgawboy
08-26-2006, 09:13 PM
What is the context of your testing?
In other words, what kind of lights? Falloff settings? Are they area lights?
FG only, no GI?
Are you using objects as virtual lights, like HDRI skydomes or IBL (environment shader)?


I am a firm believer of setting up shaders in sets of Kits, where the values that are transported around the scene are well matched with each other. This could be aimed at being physically accurate, or just aimed at being artistically intuitive. It also has to make some assumptions on how you use and set up the options of FG, GI, shadows, etc.

In that respect, the Maya shaders are meant to work with each other. Most of basic shaders are designed to work as a set of material/surface shader, shadow shader and photon shader.

This means that one has to be careful, for example, if you start with a Maya Blinn and then override the material/surface shader with say a DGS. There is still a lingering shadow and photon shader in there. The way to prove this is to export to an mi file and look at the material(Shading Group).

Now, the methodology using DGS with GI and FG is that you shouldn't use shadow shaders. The same effect is handled by refracting photons, or refracting secondary FG rays. Also, the photon shader should match the material/surface shader so that the transparency and D, G, and S coefficients match.

Now if you assign a DGS shader to an object directly, it will create a 'clean' material (Shading Group) without shadow and photon shader, but you may also have to remember to hook up that same DGS material shader to the photon slot of the material (in the mental ray tab of the Shading Group). (The DGS doubles as a material/surface shader and a photon shader, so that you can reuse it exactly for this purpose.)

The Maya base shaders tend to cover a lot of functionality. They are what we call monolithic shaders, rather than component shaders which are typically combined into shader networks and made into Phenomena. Many folks tend to like the way these shaders present themselves in the UI, as it makes for a shorter learning curve when first using them.

It does however put a lot of potentially unused functionality into the shading calculation, and this is why some people find smaller component shaders faster for how they want certain materials to look. Once you start making bigger shader networks, the Maya shaders should come back to show better performance.

Also, in monolithic shaders, it may take some evolution to optimize for typical use cases so that the performance can match simple shaders.

Chadrik
08-27-2006, 06:20 AM
well put, bart.

i've always thought of the mr shaders as example shaders for shader writers. in my opinion, the shaders are not very artist friendly, and reveal a very programmer oriented design. just take a look at their basic spotlight shader -- to set the cone angle you must input the cosine of 1/2 of angle. not terribly intuitive. the value is input in this way so that the shader can avoid having to recompute this figure for every call, making it slightly faster, and infinitely more difficult to use. if you are a single artist striving for fast, photorealistic results, the mr shaders could be the solution for you, but it is difficult to build a pipeline for a large production around them because they are so unfriendly. and as bart points out, by the time you've constructed a phenomenon sophisticated enough to be artist-friendly then your speed margin has disappeared. i'm very curious if many studios are attempting to leave behind the maya shaders in favor of all MR shaders and custom shaders -- it would be a monumental feat to eliminate the maya shaders entirely.

CGTalk Moderation
08-27-2006, 06:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.