[Bf-committers] Shader plugin system.

Jonathan Merritt j.merritt at pgrad.unimelb.edu.au
Sat Nov 27 04:18:15 CET 2004


Hi Everyone,

Just to butt in here on a topic closely related to these confusing 
water-color discussions: a shader plugin system might be a nice thing to 
have.  It could be based upon providing the same kinds of data to a DSO 
as are provided to shaders in the RenderMan standard, which is a true 
superset of Blender's current capabilities.

It would allow custom Blender shaders to be written in C (or any other 
language that can be wrangled into the appropriate calling convention), 
as well as allowing connection to external shader authoring tools for 
Blender's own renderer.  It would then also be a simple matter to 
compile, for example, a RenderMan shader directly for Blender.  All of 
the infrastructure required for parsing and processing RenderMan SL 
files is already implemented twice in GNU GPL code: in Aqsis and in 
Pixie.  We would have the best of both worlds: the ability to use a 
shading language, or to write shaders (and their tools) in C.

To give you an example of some of the current limitations of the texture 
plugin: I wrote a RenderMan CD shader some time ago.  Examples Rendered 
using Aqsis:
    http://www.warpax.com/temp/cd.jpg
    http://www.warpax.com/temp/cd.avi   (284 KB)
(the AVI really shows off the effect; the still is a bit lacking).  Note 
that this effect is *not* something you can achieve using a reflection 
map of some kind, because the color lookup depends not only upon the 
position and normal vector of the surface but also upon its inherent 
direction parameters (uv coordinates in the case of RenderMan).

I checked to see if I could implement this as a Blender texture plugin, 
but unfortunately no way near enough information is provided by the 
texture API.  I could implement the effect directly within Blender, of 
course, but that would be undesirable for all the reasons enumerated in 
the recent "water-color effect" discussion (as opposed to the "water 
color texture painting" discussion, which seems to be something else :-).

Jonathan Merritt.



More information about the Bf-committers mailing list