Shader Anatomy

From K-3D

Jump to: navigation, search

Surface Shader, Basic Anatomy

includes other object shaders


(A) Color Set, one or more colors, possibly a gradient defined by a color spline.

(B) Coordinate Space.

(C) Perturbation of coordinate space via function.

(D) Mix or Blend Function, combines two or more color textures.

(E) Relationship variables, various data sets that can drive the above functions so that end result relates to the scene in some way.

(F) Lighting model, this is how the final color texture will relate to the lighting in the scene, it defines the surface.

(G) Shader type, color textures can be used in shaders such as displacement too, matching them across surface and displacement is very useful.


Image:Surface_Shader_Anatomy_1.png

The blocks above could form the basis of a schema for a library of Layered Shader parts. If they are well designed then they can be combined into a standard Renderman shader when required, else they are used by Aqsis as they are.

  • one advantage to this systems is that the shader result is just a color image until the application of (F) the lighting model, this means that we can create a BitMapSourceShader object that can use most of the shader pipeline to bake the colors (by calling Aqsis with a special RIB file) so that they can be used in renderers such as Yafray which has it's own lighting model.

If you have additional blocks to add or other input please discuss them so that we may have a system that covered the majority of non-specialized shaders.