Advantage of writing shaders??


#1

Hello everyone, been discovering the different areas where scripting can be used in maya…
I came to know that one can write custom shaders in maya…
I am not able to get what is the advantage of writing a shader when almost all attributes are present in the maya or mental ray shaders…Is it optimisation???

What languages are used to write such shaders??
Can someone provide me an example where a better result was achieved with a custom shader

Secondly, we are currently a small studio…Is it advisable for me as a modeling/texturing artist to learn writing custom shaders???

PS: I am familiar with C/C++ and Python…


#2

Shader writing is used to accomplish different things:

  1. Solve a new problem
  2. Reduce complexity for demanding shots
  3. Create a tool that works in your specific pipeline
  4. Generate data you could use elsewhere (like Nuke, or another 3D package, etc)
  5. Improve on existing shaders
  6. Introduce new shaders and methods (BSDF materials are an example)

Examples are:

  1. Shaders written to mimic something specific using data from another source, like the Iron Man suit shader that uses measured BSDF data. This reduces (or eliminates) the need to eyeball and develop one using artist time.

  2. Creating a shader that writes specific data to a framebuffer pass or AOV for compositing later.

  3. Shaders that can take point cloud data and use it between sources (XSI to Maya) or renderers (Renderman to mental ray, etc)

  4. Make a renderer do a job differently, like making a path tracing BSDF material for mental ray so you can run it more like iRay without the iRay restrictions.

The thing about shader writing is that your imagination is the limit on what you might want it to do.

Shader writers are usually developers and that is their primary task. They also work with other departments if they need different things. Shader writers specifically would deal with lighters and look development. More general developers would also write tools as well as shaders for all departments. It depends on what your studio may need you to do and where you are most valuable.

A lot of places will use what is out of the box so-to-speak and not write anything. But in those cases I have found myself wishing we had a shader writer. Otherwise you may end up brute-forcing your way into doing some things. It will work, but it is inefficient and occasionally maddening.


#3

I am not able to get what is the advantage of writing a shader when almost all attributes are present in the maya or mental ray shaders…Is it optimisation???

This is not true. There are soo many devleopments in the shader world that take years to make there way into mental ray (point based work flows, spherical harmonics, thin film interference just to give some examples). As a shader writter you can implment these things way faster than mental ray ever will.

It’s also great for workflow, you can take complex problems and make a simple shader to sort it out.


#4

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.