Blender Git Commit Log

Git Commits -> Revision 658b4c0

Revision 658b4c0 by Lukas Toenne (master)
March 11, 2014, 13:12 (GMT)
New Corner Pin node: uses explicit corner values for a plane warp transformation.

This was suggested by Christopher Barrett (terrachild). Corner pin is a common feature in compositing.

The corners for the plane warping can be defined by using vector node inputs to allow using perspective plane transformations without having to go via the MovieClip editor tracking data.
Uses the same math as the PlaneTrack node, but without the link to MovieClip and Object.

{F78199}

The code for PlaneTrack operations has been restructured a bit to share it with the CornerPin node.

* PlaneDistortCommonOperation.h/.cpp: Shared generic code for warping images based on 4 plane corners and a perspective matrix generated from these. Contains operation base classes for both the WarpImage and Mask operations.

* PlaneTrackOperation.h/.cpp: Current plane track node operations, based on the common code above. These add pointers to MovieClip and Object which define the track data from wich to read the corners.

* PlaneCornerPinOperation.h/.cpp: New corner pin variant, using explicit input sockets for the plane corners.

One downside of the current compositor design is that there is no concept of invariables (constants) that don't vary over the image space. This has already been an issue for Blur nodes (size input is usually constant except when "variable size" is enabled) and a few others. For the corner pin node it is necessary that the corner input sockets are also invariant. They have to be evaluated for each tile now, otherwise the data is not available. This in turn makes it necessary to make the operation "complex" and request full input buffers, which adds unnecessary overhead.

Commit Details:

Full Hash: 658b4c0d56dffbcf1476c2a2a019fa0ecfb79376
Parent Commit: 558fa43
Lines Changed: +960, -460

9 Added Paths:

/source/blender/compositor/nodes/COM_CornerPinNode.cpp (+67, -0) (View)
/source/blender/compositor/nodes/COM_CornerPinNode.h (+41, -0) (View)
/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp (+223, -0) (View)
/source/blender/compositor/operations/COM_PlaneCornerPinOperation.h (+68, -0) (View)
/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp (+194, -0) (View)
/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.h (+75, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp (+117, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackOperation.h (+90, -0) (View)
/source/blender/nodes/composite/nodes/node_composite_cornerpin.c (+59, -0) (View)

6 Deleted Paths:

/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.cpp (+0, -95)
/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.h (+0, -62)
/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp (+0, -70)
/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h (+0, -49)
/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp (+0, -123)
/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h (+0, -53)

10 Modified Paths:

/release/scripts/startup/nodeitems_builtins.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/node.c (+1, -0) (Diff)
/source/blender/compositor/CMakeLists.txt (+8, -6) (Diff)
/source/blender/compositor/intern/COM_Converter.cpp (+4, -0) (Diff)
/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp (+1, -2) (Diff)
/source/blender/editors/space_node/drawnode.c (+7, -0) (Diff)
/source/blender/nodes/CMakeLists.txt (+1, -0) (Diff)
/source/blender/nodes/NOD_composite.h (+1, -0) (Diff)
/source/blender/nodes/NOD_static_types.h (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021