This patch adds a new Map Range node that linearly remaps an input
value from a range to another. This node is similar to the compositor's
Map Range node.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- map-range-node (branched from master)
- Build Status
Buildable 4397 Build 4397: arc lint + arc unit
Event Timeline
Comment Actions
Looks great, just one minor comment.
| intern/cycles/render/nodes.cpp | ||
|---|---|---|
| 5268–5272 | These socket names should be from_min, from_max, ... the convention is to use snake case instead of camel case here. | |
Comment Actions
This can go into master.
From a suggestion by @Ray Molenkamp (LazyDodo), I think it would be important to add a Clamp option for this node.
It doesn't have to be done as part of this patch, but would be good to add after since it's probably what you want at least half the time.
Comment Actions
To clamp the output to the [0, 1] range? We have a dedicated Clamp node for this, will add a patch for it next.
Comment Actions
I guess to clamp to To Min and To Max. I agree, it makes sense to have this option in this node (at least it makes much more sense than in the math node).