Blender Git Commit Log
Git Commits -> Revision 1cbb272
Revision 1cbb272 by Sergey Sharybin (soc-2011-tomato) August 3, 2013, 19:53 (GMT) |
Initial code layout for plane track deform node Idea of this is: - User selects which plane track to use (for this he need to select movie clip datablock, object and track names). - Node gets an image and mask inputs (both are optional). - Node outputs: * Input image warped into the plane. * Input mask warped by the plane. * Plane, rasterized to a mask. Warping image is done by computing reverse bilinear coordinates, and getting pixel from corresponding position. This requires some tricks with downsampling to make warped image looks smooth. Currently compositor doesn't support downsampling, so we needed to implement our own operation for this. Currently idea is dead simple: value of output pixel equals to an average of neighborhood of corresponding pixel in input image. Size of neighborhood is defined by ratio between input and output resolutions. This operation doesn't give perfect results and works only for downsampling. But it's totally internal operation not exposed to the interface, so it's easy to replace it with smarter bi-directional sampler with nicer filtering. Limitations: - Node currently only warps image and outputs mask created out of plane, warping input mask is not implemented yet. - Image warping doesn't report proper depending area of interest yet, meaning interactivity might be not so much great, - There's no anti-aliasing applied on the edges of warped image and plane mask, so they look really sharp at this moment. |
Commit Details:
Full Hash: 1cbb2725c52e87bc7e951cc2c74c624e19f6a88a
SVN Revision: 58871
Parent Commit: 8f57259
Lines Changed: +1045, -2
13 Added Paths:
/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp (+160, -0) (View)
/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h (+42, -0) (View)
/source/blender/compositor/operations/COM_DownsampleOperation.cpp (+115, -0) (View)
/source/blender/compositor/operations/COM_DownsampleOperation.h (+57, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.cpp (+89, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.h (+61, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp (+62, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h (+43, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp (+100, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h (+51, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpMaskOperation.cpp (+58, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpMaskOperation.h (+49, -0) (View)
/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.c (+66, -0) (View)
/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h (+42, -0) (View)
/source/blender/compositor/operations/COM_DownsampleOperation.cpp (+115, -0) (View)
/source/blender/compositor/operations/COM_DownsampleOperation.h (+57, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.cpp (+89, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackCommonOperation.h (+61, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp (+62, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h (+43, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp (+100, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h (+51, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpMaskOperation.cpp (+58, -0) (View)
/source/blender/compositor/operations/COM_PlaneTrackWarpMaskOperation.h (+49, -0) (View)
/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.c (+66, -0) (View)
12 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 (+13, -0) (Diff)
/source/blender/compositor/intern/COM_Converter.cpp (+4, -0) (Diff)
/source/blender/editors/space_clip/tracking_ops.c (+5, -2) (Diff)
/source/blender/editors/space_node/drawnode.c (+36, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+23, -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 (+2, -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 (+13, -0) (Diff)
/source/blender/compositor/intern/COM_Converter.cpp (+4, -0) (Diff)
/source/blender/editors/space_clip/tracking_ops.c (+5, -2) (Diff)
/source/blender/editors/space_node/drawnode.c (+36, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+23, -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 (+2, -0) (Diff)