Blender Git Loki

Git Commits -> Revision 876665a

Revision 876665a by Sergey Sharybin (master)
May 29, 2012, 14:00 (GMT)
Initial commit of new keying nodes

First node is called Keying Screen (Add -> Matte -> Keying Screen) and it's
aimed to resolve issues with gradients on green screens by producing image
with gradient which is later used as an input for screen color in keying nodes.

This node gets motion tracks from given movie clip and trackign object and uses
them to define color and position of points of gradient: for position marker's
position on current frame is sued, for color average color of pattern area is
used.

Gradient is calculating in the following way:
- On first step voronoi diagram is creating for given tracks.
- On second step triangulation of this diagram happens by connecting sites
to edges which defines area this site belongs to.
- On third step gradient filling of this triangles happens. One of triangle
vertices is colored with average track color, two rest vertoces are colored
with average color between two neighbor sites. Current pixel's color in
triangle is calculating as linear combination of vertices colors and
barycentric coordinates of this pixel.

This node is implemented for both tile and legacy compositor systems.

Second node is basically a combination of several existing nodes to make keying
more straighforward and reduce spagetti mess in the compositor, but it also
ships some fresh approaches calculating matte which seems to be working better
for not actually green screens.

This node supports:
- Chroma preblur
- Dispilling
- Clip white/black
- Dilate/Erode
- Matte post blur

This node doesn't support chroma pre-blur for legacy compositor (yet).

There're still lots of stuff to be improved here, but this nodes night already
be used i think.

Some details might be found on this wiki page:
http://wiki.blender.org/index.php/User:Nazg-gul/Keying

This patch also contains some currently unused code from color math module, but
it was used for tests and might be used for tests in the future. Think it's ok
to have it in branch at least.

Commit Details:

Full Hash: 876665ac25a731bcf5937d4e06de7337d6e8af6a
SVN Revision: 47179
Parent Commit: f5917b1
Lines Changed: +2587, -13

14 Added Paths:

/source/blender/blenlib/BLI_voronoi.h (+70, -0) (View)
/source/blender/blenlib/intern/voronoi.c (+833, -0) (View)
/source/blender/compositor/nodes/COM_KeyingNode.cpp (+211, -0) (View)
/source/blender/compositor/nodes/COM_KeyingNode.h (+44, -0) (View)
/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp (+57, -0) (View)
/source/blender/compositor/nodes/COM_KeyingScreenNode.h (+36, -0) (View)
/source/blender/compositor/operations/COM_KeyingDispillOperation.cpp (+89, -0) (View)
/source/blender/compositor/operations/COM_KeyingDispillOperation.h (+49, -0) (View)
/source/blender/compositor/operations/COM_KeyingOperation.cpp (+114, -0) (View)
/source/blender/compositor/operations/COM_KeyingOperation.h (+57, -0) (View)
/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp (+217, -0) (View)
/source/blender/compositor/operations/COM_KeyingScreenOperation.h (+79, -0) (View)
/source/blender/nodes/composite/nodes/node_composite_keying.c (+218, -0) (View)
/source/blender/nodes/composite/nodes/node_composite_keyingscreen.c (+202, -0) (View)

21 Modified Paths:

/source/blender/blenkernel/BKE_node.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/node.c (+2, -0) (Diff)
/source/blender/blenlib/BLI_math_base.h (+3, -0) (Diff)
/source/blender/blenlib/BLI_math_color.h (+4, -0) (Diff)
/source/blender/blenlib/BLI_math_geom.h (+3, -0) (Diff)
/source/blender/blenlib/CMakeLists.txt (+1, -0) (Diff)
/source/blender/blenlib/intern/math_color.c (+84, -0) (Diff)
/source/blender/blenlib/intern/math_geom.c (+39, -0) (Diff)
/source/blender/compositor/CMakeLists.txt (+12, -0) (Diff)
/source/blender/compositor/intern/COM_Converter.cpp (+7, -0) (Diff)
/source/blender/editors/space_node/drawnode.c (+36, -1) (Diff)
/source/blender/makesdna/DNA_node_types.h (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+61, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree_types.h (+2, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/nodes/CMakeLists.txt (+2, -0) (Diff)
/source/blender/nodes/composite/nodes/node_composite_blur.c (+14, -8) (Diff)
/source/blender/nodes/composite/nodes/node_composite_dilate.c (+4, -4) (Diff)
/source/blender/nodes/composite/node_composite_util.c (+16, -0) (Diff)
/source/blender/nodes/composite/node_composite_util.h (+4, -0) (Diff)
/source/blender/nodes/NOD_composite.h (+3, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021