MaterialX export from Blender shader nodes #112864
Labels
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
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112864
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
As part of Hydra render engine support (#110765 ), we want to be able to render Cycles and EEVEE shaders in Hydra render engines. For this a conversion from Blender shader nodes to MaterialX nodes was implemented in #111765.
This implementation is incomplete, not all nodes are currently supported. This tasks is meant to keep track of the progress. Some nodes may not be possible to export. For this we should add some indicator in the user interface.
Native support for editing MaterialX nodes in Blender is important functionality as well, but not part of the initial implementation.
Tasks
steps
,clamp
,smooth step
inputs for Map Range node (#114635)Nodes
Legend
🟢 Implemented
🟡 Partially implemented
🟠 Default value
🔴 Not implemented
Input
Output
Color
Converter
Shader
Texture
Vector
Other
Re:#111765 (comment), I had a go at trying to add a function to the Python API that allows for writing MaterialX materials to disk and came up with this: https://projects.blender.org/blender/blender/compare/main...expenses:export-materialx. It works pretty well for my needs. Further improvements would be to return a proper MaterialX Python structure instead.
@expenses that seems useful, could be made into a PR. It should not use
hydra::cache_or_get_image_file
though since that will write image files to a Hydra cache directory, rather than next to the mtlx files. Probably also would want an option not to write any image files at all.I reviewed https://projects.blender.org/blender/blender/compare/main...expenses:export-materialx and didn't see the usage of
hydra::cache_or_get_image_file
, what are the next steps to contribute?@expenses do you know if it's possible to write a mtlx without external images if they are using them? That seems a feature enhancement to truncate the nodes that uses images.
Unless its expected that we will be able to export all current and future Eevee/Cycles nodes, it would be neat if we could get some kind of indicator in Blenders UI as to which nodes are supported and not.
It could be either:
a little icon in the nodes "titlebar" (the colored area at the top of each node)
or
some text indicating support status (like "MaterialX: Supported"/"MaterialX: Partial Support"/"MaterialX: Unsupported") when you hover the node).
@ernest.lee hey, sorry I don't know MaterialX so well. What I've written works for my use cases but I'm not in a position to polish it to a mergeable state, sorry.
Hello,
The noise texture outputs a colored noise at the factro node.
blender/blender-addons#105266
It would be great to have some way to support the "time" and "frame" Application Nodes from MaterialX.
(https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/Specification/MaterialX.Specification.md#application-nodes)
My understanding is that currently, people have to type "#frame" into a Value node in Blender to get "frame", and "#frame/60" to get "time". Not sure if that would be a good heuristic to export them in this way, or have special nodes instead.
Currently, I believe what happens is that this graph:
results in Blender exporting the MaterialX graph every frame with the new settings, leading to really low frame rates in Hydra viewport.