Blender Git Loki

Git Commits -> Revision c4491f5

Revision c4491f5 by Jeroen Bakker (master)
July 4, 2011, 18:14 (GMT)
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 :)

Commit Details:

Full Hash: c4491f558b77530ef45ef7a1b80ba7567e338bae
SVN Revision: 38090
Parent Commit: 7c15143
Lines Changed: +70, -19

15 Modified Paths:

/release/scripts/startup/bl_ui/properties_material.py (+1, -0) (Diff)
/release/scripts/startup/bl_ui/properties_render.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+4, -3) (Diff)
/source/blender/blenkernel/intern/node.c (+3, -1) (Diff)
/source/blender/editors/space_outliner/outliner.c (+5, -1) (Diff)
/source/blender/makesdna/DNA_material_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_material.c (+6, -1) (Diff)
/source/blender/makesrna/intern/rna_render.c (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+7, -1) (Diff)
/source/blender/nodes/intern/CMP_nodes/CMP_image.c (+8, -3) (Diff)
/source/blender/render/intern/source/pipeline.c (+11, -2) (Diff)
/source/blender/render/intern/source/rendercore.c (+9, -1) (Diff)
/source/blender/render/intern/source/shadeinput.c (+1, -1) (Diff)
/source/blender/render/intern/source/zbuf.c (+10, -3) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021