NPR: Shader Node Traits #130192
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#130192
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pragma37/blender:npr-shader-node-traits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The NPR branch needs a way to tell whether the node tree is a group or an NPR tree for correct polling in the UI.
This follows a similar approach to
GeometryNodeAssetTraits
.There's still the problem that any node group can still be added to any shader tree type (for example, it's possible to add a Material node group to a World node tree).
This trait system could eventually be used to detect which node groups have tree-type-specific nodes and allow adding them only to compatible trees.
It is too bad that instead of just use
bNodeTreeType
to different kinds of node trees in general there is another one kind of tree typing just to different shader node trees...For now this is an
npr-prototype
-only thing, but I would appreciate a quick look from @JacquesLucke or @HooglyBoogly, to ensure I'm not doing anything terrible.Geometry nodes work the same way. 🤔
We still need a way to share shader node groups between different shader tree types, so I'm not sure different
bNodeTreeType
s would make things better.In any case that would require a huge refactor that is out of the goals of the NPR prototype.
Just to make sure, nodes use only
bNodeType::poll
to check if node group/separate built-in node can be placed in some node tree or not. Assets traits (geometry_node_asset_traits
) is the way to say if geometry node tree can be runned as modifier/tool/operator/... . So this is likeRenderTime
/BakeTime
shader difference. This mainly used by drag and drop and asset browser rahter then node editor.Overall, it seems like this approach could work, but it's not obvious to me that this is the right way to go yet.
I don't have a fully formed opinion on it yet, sry.
It would be quite nice to reduce the different tree types we have instead of creating more different kinds, but we don't know how to do that exactly yet.
@ -1259,6 +1259,20 @@ void do_versions_after_linking_400(FileData *fd, Main *bmain)
version_legacy_actions_to_layered(bmain);
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 404, 6)) {
Seems like the versioning code should also initialize the type for all the node trees embedded in materials, world, etc?
This already happens in the
node_tree_set_type
call fromntree_blend_read_after_liblink
, which runs beforedo_versions_after_linking
.Ok, that's fine, this doesn't have to be the final design.
I mainly wanted to know if you saw something that could explode badly.
We still have plenty of time until we start looking into merging NPR features into main.
As long as we have different contexts where some nodes are supported and others aren't we need some kind of classification.
At best we can "implement" them as no-ops so at least shaders compile, but there's no meaningful way to support the Principled BSDF in the World shader, for example.
I mean you can do the same thing in flat list of types and in type system where each type have some its internal property, only used by it,, it is only about generalization of the code to maintain\