Page MenuHome

Design: Shading: Extend Clamp and Map Range nodes to work with Vectors
Confirmed, NormalPublicDESIGN

Description

I'd like to make these nodes work with vector inputs and outputs.

It's unclear to me as the the best way of doing this.

Some options:

  • Separate Nodes : Create separate versions of these nodes with Vector sockets.
  • Dynamic : Use a dynamic socket. This is better from a UX perspective but how do we show this? For these two nodes, they are pretty pointless without a value input so the edit control could be hidden. The node then operates accordingly depending on the input link.

  • Mode Switch : Add vector input and output sockets and add a mode switch to hide the unwanted input socket.
  • Double Sockets : Add vector input and output sockets and depending what is connected. For vector only input, Vector > Float & Vector. For float only input, Float > Float & Vector. If both inputs are connected do Float > Float and Vector > Vector.

For the combined cases, the node would output and show both Value and Vector.

Event Timeline

Added initial patch: D6726 Map Range Node only
This adds an additional Vector output and changes Float input to a Vector. For backwards compatibility, it doesn't currently convert RGBA sockets to BW.

Brecht Van Lommel (brecht) changed the subtype of this task from "Report" to "Design".Mon, Feb 3, 12:10 PM
Campbell Barton (campbellbarton) changed the task status from Needs Triage to Confirmed.Wed, Feb 12, 8:29 AM