[Bf-codereview] Tiles: Map Range Node (issue 6850047)

dfelinto at gmail.com dfelinto at gmail.com
Wed Nov 14 04:40:54 CET 2012


Reviewers: bf-codereview_blender.org, jbkkavt,

Description:
This node allows the user to convert an input value range into a
destination range.

One important use case is to easily map the z channel from its original
range in real world meters (i.e.: 0 - 150) to a more usable range of 0-1
(or similar) for use as a matte for colorization or filtering
operations.

Currently there are two options to acchieve this

a) through the use of the normalize node, however this node is not
animation safe since the color values will jump whenever a close or far
away object enters on frame

b) through the use of the map value node which is based on scaling and
offsetting of the original values. This is an unintuitive method that
requires a large amount of trial and error

Sample test file (after patch):
http://www.pasteall.org/blend/17478

Screenshot:
http://www.pasteall.org/pic/40381

Patch by Daniel Salazar (idea, tests) and me (implementation).

Please review this at https://codereview.appspot.com/6850047/

Affected files:
   source/blender/blenkernel/BKE_node.h
   source/blender/blenkernel/intern/node.c
   source/blender/compositor/CMakeLists.txt
   source/blender/compositor/intern/COM_Converter.cpp
   source/blender/compositor/nodes/COM_MapRangeNode.cpp
   source/blender/compositor/nodes/COM_MapRangeNode.h
   source/blender/compositor/operations/COM_MapRangeOperation.cpp
   source/blender/compositor/operations/COM_MapRangeOperation.h
   source/blender/editors/space_node/drawnode.c
   source/blender/makesrna/RNA_access.h
   source/blender/makesrna/intern/rna_nodetree.c
   source/blender/makesrna/intern/rna_nodetree_types.h
   source/blender/nodes/CMakeLists.txt
   source/blender/nodes/NOD_composite.h
   source/blender/nodes/composite/nodes/node_composite_mapRange.c




More information about the Bf-codereview mailing list