PDA

View Full Version : shader / material confusion


charliedz
05-09-2009, 04:59 PM
hello all,

so i'm still a little confused about shaders and materials. i found this explanation:

Textures = bitmaps that are used inside your materials & shaders. Ex. a photo of some bricks used as a diffuse map.

Shaders = smaller (math) modules that are used to build materials. Ex. a glass(lume) shader applied to the surface slot of a mental ray material. Shaders can hold textures as well.

Materials = Generally speaking, a material can be considered a ‘packaged’ set of various shaders. You can assign shaders and/or textures to a material. Ex. Standard material, Arch & Design Material, ProMaterial.


1. basic materials in maya are :lambert, phong, ocean shader, ramp shader, layered shader, surface shader, etc.... well, the word shader to describe materials is seriously confusing me. if its a material, why is it called a shader? and if those are examples of materials, what are examples of shaders?


2. if i want a glass surface, do i assign a glass shader or glass material?


3. if materials are made up of shaders, how do you add more than 1 shader to a material? it looks like there is a set list of maya materials and i just choose from that.


thanks :shrug:

djx
05-10-2009, 01:02 PM
They are just words to try and group things but I would say that there are many different types of shaders an a material is one of them that brings together the elements that describe the look of a surface and how it responds to light.

Other types of shaders are: light shaders, displacement shaders, shadow shaders etc

Textures, on the other hand, don't usually factor in any lighting calculations.

And in maya there is a thing called a shading group (SG node). In my opinion it is unfortunate that due to maya's history, the way the hypershade works many people never notice that the SG even exists. But if you use mentalray, you should get familiar with it. This is the node that is actually assigned to your surface and it is where all the materials, shaders and textures feed into. I think it's the most important part.

-- David

haggi
05-10-2009, 09:57 PM
If you read the mr manual, you can see that they use the word "shader" only for "historical reasons". In mr every single node is a "shader", even geometry shader which dont shade anything but create - maybe - geometry.

As already mentioned, several shaders are combined together to build the final appearance of an object.

Think of them maybe like a polygon mesh. The vertices, normals, uv - coordinates and edges are like single shaders and they all together build the polygon mesh.

And indeed with the shading group you create a material with all options in mentalray. Here you can stack several shaders together like a volume shder, a displacement shader and a shadow shader.

CGTalk Moderation
05-10-2009, 09:57 PM
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.