[Bf-cycles] Cycles range mapping math node

gandalf3 zzyxpaw at gmail.com
Sat Jun 11 09:20:04 CEST 2016

```If I'm not mistaken, in such a case as you describe (where the max is a
known constant and the min is 0), all that's needed is a single division
math node.

It's worth noting that a normalize node like the compositor has would
also cover this use-case (and other, more complex situations
<http://blender.stackexchange.com/q/34582/599> as well)

On 06/11/2016 12:03 AM, Mohamed Sakr wrote:
> @ gandalf3, well, consider any thing like particle radius or particle
> index, it ranges from 0 to a value > 1
> with a node like this, you can remap the values of all particles to
> 0-1, which will help the user use color ramp more efficiently "as he
> knows that the range is 0-1, not by trial and error testing.."
>
> same for any other texture, like volume textures that got values > 1,
> remapping them would be handy.
> @ carlo, your range mapping is more general, my idea is more toward a
> normalize node "that takes a texture and normalize to the texture max
> value".
>
> On Sat, Jun 11, 2016 at 6:18 AM, gandalf3 <zzyxpaw at gmail.com
> <mailto:zzyxpaw at gmail.com>> wrote:
>
>     This is doable with a node group, but a built in node to match the
>     compositor would be nice.
>
>     However, what can't be done with a node group is a *normalize*
>     node (like the compositor), as this requires calculating the min
>     and max values, which AFIAK can't be done with math nodes. How
>     feasible would it be to implement such a node?
>
>
>     On 06/10/2016 07:21 PM, Mohamed Sakr wrote:
>>     Hi,
>>
>>     is there a range mapping math node in Cycles?
>>     consider a texture input "or any attribute", it is an array of
>>     data, ranging [start, end], this node will do a pre-calculation
>>     to a new texture using the required range [newStart, newEnd].
>>
>>     this will help a lot.
>>     I can do it, just need a hint on: where to write the new
>>     functions "which files/functions that are related to writing a
>>     new node".
>>
>>     and any suggestions would be helpful.
>>
>>     cheers,
>>     Mohamed Sakr
>>
>>
>>     _______________________________________________
>>     Bf-cycles mailing list
>>     Bf-cycles at blender.org <mailto:Bf-cycles at blender.org>
>>     https://lists.blender.org/mailman/listinfo/bf-cycles
>
>
>     _______________________________________________
>     Bf-cycles mailing list
>     Bf-cycles at blender.org <mailto:Bf-cycles at blender.org>
>     https://lists.blender.org/mailman/listinfo/bf-cycles
>
>
>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> https://lists.blender.org/mailman/listinfo/bf-cycles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20160611/78203355/attachment.htm
```