blender/release/scripts
Jeroen Bakker c4491f558b Current situation
A mesh can consist out of multiple material. Take a character with clothing's. the skin can be a different material as the different clothing's. During compositing it is a common use-case to only do a part of the composit on only a specific material. Currently this can not be done.

In blender movies this feature is known to be implemented, but until now it never got integrated into trunk.
Proposal

With material index the Blender internal renderer will be capable of creating a buffer containing the material indexes of the first pixel-hit. This will be implemented in the same manner as the object index.

In the compositor the ID Mask node can be used to extract the information out of the Render pass.
Impact
User interface

On the properties-space the next changes will be done

    Scene⇒Render layer⇒Passes⇒Material index will be added
    Material⇒Options⇒Pass index will be added

DNA

    Material struct will get an new field called “index”. this will be a short-type.
    Material struct the field pad will be removed.
    A new Render-layer pass will be added (bit 1«18)

RNA

    Material RNA is updated (based on “pass index” from object)
    Render layer RNA is updated (based on IndexOB)

Blender internal renderer

The Blender internal renderer will process the render pass as a copy of the Object index.
Blender compositor

The render layer input will get a new output socket called “IndexMA”
Usage

An example on how to use material index can be found at:

https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/compositing/composite_materialindex.blend

This is also example of a commit message longer than the commit itself :)
2011-07-04 18:14:41 +00:00
..
modules fix for error when moving module, broke fracture tools and select internal face operator. 2011-07-03 04:28:41 +00:00
presets fix [#27196] Traceback caused by preset selection 2011-04-28 09:52:16 +00:00
startup Current situation 2011-07-04 18:14:41 +00:00
templates move generic bpy helper modules into bpy_extras. 2011-05-16 07:51:02 +00:00