GSoC 2024: Draft: Redesigning the Color Ramp and Enum support in all Node Editors
Name:
Noah Pinales
Contact:
Email: [email protected]
Blender Chat Name: @Noah-Pinales
Blender Developer Account: @Noah-Pinales
Blender Forum Account: @Noah_Pinales
GitHub: @noahpin
Personal Website: https://noahp.xyz/
Synopsis
The Color Ramp Node is a versatile node used in many workflows in Blender. However, it comes with several downsides, including the inability to externally edit the color and position values of the various chips via a Socket. In addition to this, I would like to bring the Menu Switch feature present in the Geometry Node editor to Shader and Compositing nodes, for use in node-group based workflows in both editors.
Benefits
This project benefits Blender in several key areas. First and foremost, the Color Ramp node is one that has needed a face lift for a while. By implementing Color and Position sockets, the Color Ramp node will be able to adapt to more Node Group workflows, especially as groups become larger and more complicated, with many different ramps in the group. In addition to this, I see benefit in sharing colors between ramps with different handle positions, which could be a useful feature in some procedural workflows.
As far as Enumeration goes, It has proven itself useful in the Geometry Nodes editor, and would be a welcome addition to the Shader and Compositing editors, especially when used in tandem with complex node groups, so the less shader-inclined users can easily modify node group settings without dealing with complicated inputs or diving into the group itself. This goes for the addition of Color Ramp socket properties, as well.
Deliverables
For deliverables, there are two main deliverables I would like to accomplish. First and foremost would be the Overhaul of the Color Ramp node. As part of this overhaul, I will include Color and Position sockets for each color handle on the ramp, all under a collapsible panel which is open by default. In addition to this, I would like to explore potentially adding new interpolation modes to the Color Ramp, such as Oklab.
The second deliverable would be porting the Enumeration functionality present in Geometry Nodes to the Shader and Compositing editor, adding the Menu Switch node and Menu input type.
Project Details
Color Ramp Overhaul:
The primary goal of this proposal would be to overhaul the Color Ramp node. This would involve adding a new Color and Position socket for each handle, and dynamically updating the sockets when the ramp preview is modified, and vice versa. In addition to this, Color positions would have to automatically sort by position size in the sockets, to align with the ramps preview. As you add/remove handles, similarly to how the Color Ramp currently operates, each appropriate color and position socket would update and add or remove the new socket. Each color and position socket would be underneath a “Color Handles” panel, with the panel open by default to allow for easy access to the color properties, but can be collapsed as the ramp becomes more complex. In addition to this, I would like to add an interaction to the Color Ramp, where double clicking on a Handle automatically opens a Color Input window, where you can modify its color directly. This solves the issue of having one dedicated color input, when the Color Handles panel is collapsed.
In addition to this, I would look into adding Oklab interpolation to the Color Ramp panel. This mode of interpolation would operate on top of the RGB color space. This new mode would require some more research into how exactly interpolation is calculated.
Here is a mockup of the new Color Ramp node.
Menu Switch & Enumeration:
This second goal of the proposal should hopefully not be as challenging to implement, considering the groundwork has already been laid out in issue #113445. I would like to bring the Menu Switch functionality from Geometry Nodes into the Shader and Compositing editors. This would add the new Menu Switch node, and the Menu socket type. In addition to this, the menu switch node would have properties in the side panel which allow for it’s enumerable sockets to be added or removed, and renamed. Functionally, it would operate the exact same way as the node does in the Geometry nodes editor, but it would only support the socket types in the Shader and Compositing editors: (boolean, vector, integer, shader, float, color) for Shader, and (vector, float, color) for Compositing.
Project Schedule
Community Bonding Period:
-
Meet mentor & improve proposal and scope with their guidance
-
Discuss potential UI/UX experiences with the Design Team
Week 1-4
- Overhaul the Color Ramp node
- Add Color and Position sockets to the node under a new Panel
- Double Click interaction on the ramp chips
- Auto sorting, addition, and removal of each handle socket and position
Week 5
- Research & Implement Oklab interpolation to the Color Ramp node
Week 6
- Test & Bugfix new Color Ramp sockets and Interpolation
- This is a node that is used across three different editing workflows, and as such it should work flawlessly in all 3.
- Document new Color Ramp node
Week 7-8
- Implement the Menu Switch node in the Shader editor
- Implement the new Menu socket type in the Shader editor
- Implement the sidebar interaction on the Menu Switch node to add enumerable sockets to the node
Week 9
- Implement the Menu Switch node in the Compositing editor
Week 10-11
- Bugfix the new Menu Switch nodes, write documentation for its use in the Shader and Compositing editors, Refine
Week 12
- Padding for delays & further finalization
- Final Evaluation
Bio
I am Noah Pinales, an undergraduate Computer Science student and Product Design Minor at the University of Southern California. In addition to this, I am also a freelance graphic designer and 3d artist.
I have used Blender extensively in my day-to-day for nearly 5 years now, and run a freelance business rendering Mechanical Keyboards using Blender. As such, I have a deep understanding of Blender’s various features, especially the shader graph.
On my own time, I have created several web-applications, from a WebGL based pixel art drawing application, to a very rudimentary vector editing application. I have strong experience in Java, JavaScript, Python, and C#. While I am still learning C++, I have a strong understanding of core programming fundamentals through my experience in other languages, including a good understanding of Object Oriented programming. I am also a quick learner, which has proven useful in navigating Blender’s code.
I believe that I am the best candidate for this project because of how actively I use the features I intend to improve. Many times in my usage of Blender, I have desired to expose the parameters of the Color Ramp node to a Group Node setting, and as such I am incredibly passionate about seeing this feature come to life.
Here are two pull requests I have created recently, both regarding adding interpolation options to various Compositor nodes. From my experience in these pull requests, I have a deeper understanding of the various features a node has, and better knowledge of how they render their UI, which will be integral to my project.
They are both WIP, and I intend to do more work in adding interpolation support to more Compositor nodes.
Thanks for taking the time to read this proposal!