1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
.. _bpy.types.ShaderNodeMapRange:
.. Editor's Note: This page gets copied into:
.. - :doc:`</modeling/geometry_nodes/utilities/math/map_range>`
.. --- copy below this line ---
**************
Map Range Node
**************
.. figure:: /images/node-types_ShaderNodeMapRange.webp
:align: right
:alt: Map Range Node.
The *Map Range* node remaps a value from a range to a target range.
Inputs
======
Value/Vector
The input value or vector to be remapped.
From Min
The lower bound of the range to remap from.
From Max
The higher bound of the range to remap from.
To Min
The lower bound of the target range.
To Max
The higher bound of the target range.
Steps
The number of values allowed between *To Min* and *To Max* when using *Stepped Linear* interpolation.
A higher value will give a smoother interpolation while lower values will progressively quantize the input.
Properties
==========
Data Type
Map Range supports both Float and Vector data types. Changing the data type will
also update the sockets to reflect the data type chosen.
Interpolation Type
The mathematical method used to transition between gaps in the numerical inputs.
:Linear: Linear interpolation between From Min and From Max values.
:Stepped Linear: Stepped linear interpolation between From Min and From Max values.
:Smooth Step: Smooth Hermite edge interpolation between From Min and From Max values.
:Smoother Step: Smoother Hermite edge interpolation between From Min and From Max values.
Clamp
If enabled, the output is clamped to the target range.
Outputs
=======
Result/Vector
The input value after remapping.
Examples
========
The *Noise Texture* node outputs a value in the range [0, 1].
We can use the *Map Range* node to remap this value into the range [-1, 1].
.. figure:: /images/render_shader-nodes_converter_map-range_example.jpg
Example of Map Range node.
|