Node previews in the shader editor #110353

Open
opened 2023-07-21 19:05:02 +02:00 by Colin Marmond · 1 comment
Member

Here is the task for the Google Summer of Code 2023.

I'll try to keep this task updated because it will be more convenient than describing the project in each patches.

Few useful links :
Link to the weekly reports
Link to the feedback thread

Patches:

Patch Status What's inside
#108001 Merged Nodes: Move preview images to an overlay
#110064 Merged Use ImBuf instead of a raw buffer for compositor previews
#110065 Merged (Experimental) The main patch implementing the previews
#110725 WIP Individual nodes refresh
#110945 Merged Add ability to preview output nodes
#110949 Merged Hide the node preview button when the overlays are disabled
#110958 Merged use flat previews for shader nodes by default
#111040 Under Review Nodes: Limit the size of the previews
#111041 Merged Nodes: stop the shader preview job when changing the viewed nodetree
TODO list for the patch #110065
  • Better handle which node can be previewed
  • Deal with displacement (for shader nodes only ? for no nodes ?)
  • Support rendering output nodes with AOVs (currently the function can not handle it)
  • Start preview job when a node is toggled on (not only for the first time)
  • Use ImBuf for preview drawing (depends on #110064)
  • Fix a leak in the preview job functions (IMPORTANT)
  • Be explicit about Volume node support
  • Remove the ability to preview the material output node and simplify the routing process
  • Refresh previews when shape/engine is changed
  • Unexpected behavior with PrincipledBSDF and eevee
  • Hide previews with workbench

Designs:

Task Status What's inside
#110651 Agreed Refresh shader node previews per updated nodes

Here are the other things to do after the main functionalities are merged (roughly sorted by importance):

  • Crash with muted node groups (#121032)
  • Redraw when toggling the node preview so that the job can start
  • Fix bugs with AOV #109683
  • Stop preview job when disabling node previews (last one disabled) and when exiting a node-group #111041
  • AOV display scene at back
  • Toggling shader node previews should not affect the material preview nor the compositor previews
  • Decide the design for the max UI size of the previews #111040
  • Add ability to use lazy allocation for render when using R_BUTS_PREVIEW (maybe add another flag)
  • AOV output node has a preview button, but doesn't work because there is no output socket. Hide it like Material Output, or use the input socket? #110945
  • Remove the ugly uses of BKE_ntree_update_main_tree, and try to use more appropriate functions
  • Rename some callback handles in render_types.h:166
  • Hide the preview button when the overlay settings have the previews disabled (node_is_previewable) #110949
  • Improve the socket detection of the previewed nodes (is_default_link_socket ) #110945
  • Use a default 2D shape for preview, and add a toggle for using the material preview scene #110958
  • Darken the preview when it is outdated for more than X ms
  • Fix texture coordinates (e.g. gradient texture node)

Non code TODOs:

Known limitations:

  • Volume nodes are not supported yet, and will probably not be in the future.
  • Non-shader node previews dont show up with a background, it will be the case in a future patch.
  • There are still some confusing behaviours when toggling node previews (will be fixed in a future patch changing a bit the event structure).
    • When enabling the preview, it doesn't show immediately due to the need of a redraw.
    • When disabling all nodes, preview rendering is still running in the background.
## Here is the task for the Google Summer of Code 2023. I'll try to keep this task updated because it will be more convenient than describing the project in each patches. Few useful links : [Link to the weekly reports](https://devtalk.blender.org/t/gsoc-2023-shader-editor-node-preview-weekly-reports/29359?u=kdaf) [Link to the feedback thread](https://devtalk.blender.org/t/gsoc-2023-add-a-shader-preview-node-feedback/28334?u=kdaf) Patches: | Patch | Status | What's inside | | - | - | - | | #108001 | Merged | Nodes: Move preview images to an overlay | | #110064 | Merged | Use ImBuf instead of a raw buffer for compositor previews | | #110065 | Merged (Experimental) | The main patch implementing the previews | | #110725 | WIP | Individual nodes refresh | | #110945 | Merged | Add ability to preview output nodes | | #110949 | Merged | Hide the node preview button when the overlays are disabled | | #110958 | Merged | use flat previews for shader nodes by default | | #111040 | Under Review | Nodes: Limit the size of the previews | | #111041 | Merged | Nodes: stop the shader preview job when changing the viewed nodetree | <details> <summary>TODO list for the patch #110065</summary> - [x] Better handle which node can be previewed - [x] Deal with displacement (for shader nodes only ? for no nodes ?) - [x] Support rendering output nodes with AOVs (currently the function can not handle it) - [x] Start preview job when a node is toggled on (not only for the first time) - [x] Use ImBuf for preview drawing (depends on #110064) - [x] Fix a leak in the preview job functions (IMPORTANT) - [x] Be explicit about Volume node support - [x] Remove the ability to preview the material output node and simplify the routing process - [x] Refresh previews when shape/engine is changed - [x] Unexpected behavior with PrincipledBSDF and eevee - [x] Hide previews with workbench </details> Designs: | Task | Status | What's inside | | - | - | - | | #110651 | Agreed | Refresh shader node previews per updated nodes | ### Here are the other things to do after the main functionalities are merged (roughly sorted by importance): - [ ] Crash with muted node groups (#121032) - [ ] Redraw when toggling the node preview so that the job can start - [x] Fix bugs with AOV #109683 - [ ] Stop preview job when disabling node previews (last one disabled) and when exiting a node-group #111041 - [ ] AOV display scene at back - [ ] Toggling shader node previews should not affect the material preview nor the compositor previews - [x] Decide the design for the max UI size of the previews #111040 - [ ] Add ability to use lazy allocation for render when using `R_BUTS_PREVIEW` (maybe add another flag) - [x] AOV output node has a preview button, but doesn't work because there is no output socket. Hide it like Material Output, or use the input socket? #110945 - [ ] Remove the ugly uses of `BKE_ntree_update_main_tree`, and try to use more appropriate functions - [ ] Rename some callback handles in `render_types.h:166` - [x] Hide the preview button when the overlay settings have the previews disabled (`node_is_previewable`) #110949 - [x] Improve the socket detection of the previewed nodes (`is_default_link_socket `) #110945 - [x] Use a default 2D shape for preview, and add a toggle for using the material preview scene #110958 - [ ] Darken the preview when it is outdated for more than X ms - [ ] Fix texture coordinates (e.g. gradient texture node) Non code TODOs: - Update the [user documentation](https://docs.blender.org/manual/en/latest/compositing/introduction.html#saving-your-composite-image) [images](https://projects.blender.org/blender/blender-manual/src/branch/main/manual/images) - Prepare some doc for [this](https://docs.blender.org/manual/en/latest/editors/shader_editor.html) page too Known limitations: - Volume nodes are not supported yet, and will probably not be in the future. - Non-shader node previews dont show up with a background, it will be the case in a future patch. - There are still some confusing behaviours when toggling node previews (will be fixed in a future patch changing a bit the event structure). - When enabling the preview, it doesn't show immediately due to the need of a redraw. - When disabling all nodes, preview rendering is still running in the background.
Colin Marmond added the
Type
Design
Interest
Render & Cycles
labels 2023-07-21 19:05:02 +02:00
Colin Marmond self-assigned this 2023-07-21 19:05:02 +02:00
Iliya Katushenock added the
Interest
Nodes & Physics
Interest
User Interface
labels 2023-07-21 19:07:00 +02:00
Brecht Van Lommel added
Module
Render & Cycles
Type
To Do
and removed
Interest
Render & Cycles
Type
Design
labels 2023-07-28 17:27:57 +02:00

There is an issue with this and node groups: #111832

There is an issue with this and node groups: #111832
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#110353
No description provided.