[Bf-committers] Thoughts on Plugins...

Austin Benesh bfdeveloper at gmail.com
Mon Jun 20 21:20:45 CEST 2005

Jonathan Merritt wrote:

>Bart wrote:
>>What about making a plugin that uses shading language (Yafray, OpenGL
>>Shading Language) definied in a shaderfile?
>> Example:
>>- you got a material named "Custom Shader"
>>- first you browse to a file (may ASCII) where the shader algorithm,
>>    properties and customizable options (color, hardness etc.) are
>>- after loading the file you got sliders and input fields to cutomize
>>the shader
>I agree; this is the basic approach I would take for a shader API.
>However, I would split the task into two different levels...
>In the Blender API, I would have *just* the bits required for the GUI
>and the input and output of the shader.  Forget about shading language
>details at this point.  Just have it set up as a C ABI that a plugin
>must fulfil.
>You then have the option of coding shaders in C/C++, or of implementing
>a shading virtual machine to execute compiled RenderMan or GLSL shaders,
>or a shade-tree structure, or ... whatever.  You have complete freedom
>from a particular standard.
>The reason for doing this is that the size of the tasks such as setting
>up the API and integrating it into Blender's existing renderer pale in
>comparison with the task of actually *implementing* a full shader VM
>(just ask Paul Gregory!).  I would suggest re-using (for example) the
>relatively modular VM from a project such as Aqsis and splitting it off
>as a separate library.  It's a really big job though.  I expect most
>people would opt for just coding shaders in straight C, or perhaps a
>Java backend...
>Jonathan Merritt.
>Bf-committers mailing list
>Bf-committers at projects.blender.org
I agree with Jonathan on this matter. The basic plugin API would need to 
be written first. All it should include is an interface between the 
plugin and the few Blender options that will be modified. As for 
interface options, all the user really needs are a couple of slider bars 
to edit the options. Improving the plugin API will take a little while, 
but this is a good first step.

More information about the Bf-committers mailing list