[Bf-committers] Thoughts on Plugins...

Austin Benesh bfdeveloper at gmail.com
Thu Jun 23 06:11:36 CEST 2005

Campbell Barton wrote:

> Austin Benesh wrote:
>> 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,
>>>> name,
>>>>    properties and customizable options (color, hardness etc.) are
>>>> definied
>>>> - 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
>>> http://projects.blender.org/mailman/listinfo/bf-committers
>> 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.
> Have a look at this post, is similar- and may get implimented sometime.
> Would leverage on existing skills in the python community and not be 
> overly hard to add in to blenders rendering engine.
> http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=6332&highlight=eva 
> - Cam
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
This is a good discussion. I've started a wiki page for this. 

More information about the Bf-committers mailing list