# Converter: Map Range

## Overview

 Function Remaps a number so that it falls within a specified range Nearest C4D equivalent Xpresso Range Mapper node

Suppose you have a range of values - the radius of particles, for example. You know that these values range from 1 to 10. You'd like to use them as an input to some other node - e.g. the Fac input of a Color Ramp node. But that value needs to be in the range 0 to 1. How do you convert the radius into such a value?

This is the purpose of the Map Range node. You first specify the range the values currently have - in the above example, that would be 1 to 10. Then you specify the range you would like them to have - in this example, 0 to 1. You set these values into the node and the remapped result is output.

Be aware that the ranges might not output exactly what you might think. In the above example, a radius of 1 would be output as zero; a radius of 10 would be output as 1. That is as expected. For a radius of 5 you might expect it would be output as 0.5, but actually it would be 0.444 recurring. This is unlikely to cause any problems unless you are testing for specific values.

## Settings

Note: a * symbol next to the name indicates the parameter also has an input port. A # symbol indicates that the parameter can only be changed with an input node, not in the node itself.

The node has a variety of algorithms for calculating the remapped value. The default is Linear, which produces a straight correspondence between the original and remapped values. Stepped Linear will quantize the result, so producing a stepped interpolation. The other algorithms produce smoothed interpolation between values.

The options are:

• Linear
• Stepped Linear
• Smooth Step
• Smoother Step

### Clamp

Suppose you specify that the current range of values is from 1 to 10. What happens if a value falls outside this range?

If this switch is checked, the output result is clamped between the 'To Min' and 'To Max' values - that is, it will not fall outside these values. If the switch is unchecked, it may do so, which may or may not matter, depending on what you are doing with the result.

### Value *

The value to be remapped'.

### From Min *, From Max *

The current range of values that 'Value' will fall within.

### To Min *, To Max *

The desired range of values that 'Value' will have after remapping.

### Steps *

This is used when 'Interpolation Type' is set to 'Stepped Linear'. It is the number of steps to use when performing the interpolation, so a higher value will result in a smoother range while a lower value will cause a greater degree of quantization.

## Output

### Result

The remapped value.